[PR #1109] [CLOSED] docs(hip): GPU_PINNED_MIN_XFER_SIZE=1048576 stopped our gfx1030 mmap-experts stalls (#267, #649) #3033

Closed
opened 2026-11-04 02:05:04 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/1109
Author: @YamineRL
Created: 10/6/2026
Status: ❌ Closed

Base: main ← Head: docs/gfx1030-pinned-xfer-v2


📝 Commits (1)

  • 57c1406 docs(hip): GPU_PINNED_MIN_XFER_SIZE=1048576 for gfx1030 --mmap-experts stalls (#267, #649)

📊 Changes

2 files changed (+24 additions, -0 deletions)

View changed files

📝 docs/AMD_HIP.md (+19 -0)
📝 docs/TROUBLESHOOTING.md (+5 -0)

📄 Description

Re-opens #920. The 2026-10-06 history cleanup closed that PR automatically, so this is the same docs commit cherry-picked onto the new main. One conflict was resolved: the new #835 FP16 bullet in docs/AMD_HIP.md stays, and the #267/#649 bullet sits after it.

New: an A/B run on release v0.1.40.1

I removed the variable and ran the same box again (RX 6800 16 GB, gfx1030, ROCm 7.2.4, 31 GiB RAM, IQ3_XXS, --mmap-experts, unit with MemoryMax=28G, release v0.1.40.1 at 82f46a8; its engine reports 0.1.40 because v0.1.40.1 changed only the Python server). It used random prompts of 2k, 8k and 16k words, 400 tokens out each.

  • 2k and 8k words: fine (prompt 7983 tokens ... 209.7 tok/s, 400 generated ... 12.7 tok/s).
  • 16k words: stalled, and no request after it ran.
strata serve: no progress for 60 s during a request (reading the prompt (batched): layer 18 of the prompt chunk from token 0) - stopping the engine so the server starts it again (issue #29)
strata serve: stall report (engine 0.1.40): stage "reading the prompt (batched): layer 18 of the prompt chunk from token 0" for 818 s; 0 layers served since the last finished step (0 = stopped, more = slow)
  expert pool threads: w0=sleeping w1=sleeping w2=sleeping w3=sleeping w4=sleeping; host idle for 841520 ms
  threads waiting on the disk (state D): 0 of 31
  memory: 14180 MiB resident, 262 MiB in swap, 20852 MiB RAM available

GPU use was 0% and VRAM was full during the stall. The engine did not restart by itself after 818 s. I stopped the unit. With the variable set, this box has had zero stalls since 2026-10-04.

The engine already has the cure, for one mode only

src/program/generate.cpp:1515 sets GPU_PINNED_MIN_XFER_SIZE=1000000 (MiB) when STRATA_ARENA_MMAP=1. The comment there names the same mechanism my first post guessed at: ROCclr locks pageable sources of 1 MiB or more in place as a GPU userptr. --mmap-experts does not set STRATA_ARENA_MMAP, so it does not get that default. My 1048576 has the same effect as your 1000000: both are far above any copy, so ROCclr always stages.

A one-line code follow-up is possible: also apply that default when --mmap-experts is on. I have not done it in this PR. It stays docs only unless you want the code change.

Related: #267, #649.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/1109 **Author:** [@YamineRL](https://github.com/YamineRL) **Created:** 10/6/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `docs/gfx1030-pinned-xfer-v2` --- ### 📝 Commits (1) - [`57c1406`](https://github.com/Niko1221/Strata/commit/57c1406db962db2d8697970b2983811ffb638900) docs(hip): GPU_PINNED_MIN_XFER_SIZE=1048576 for gfx1030 --mmap-experts stalls (#267, #649) ### 📊 Changes **2 files changed** (+24 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `docs/AMD_HIP.md` (+19 -0) 📝 `docs/TROUBLESHOOTING.md` (+5 -0) </details> ### 📄 Description Re-opens #920. The 2026-10-06 history cleanup closed that PR automatically, so this is the same docs commit cherry-picked onto the new `main`. One conflict was resolved: the new #835 FP16 bullet in `docs/AMD_HIP.md` stays, and the #267/#649 bullet sits after it. ## New: an A/B run on release v0.1.40.1 I removed the variable and ran the same box again (RX 6800 16 GB, gfx1030, ROCm 7.2.4, 31 GiB RAM, IQ3_XXS, `--mmap-experts`, unit with `MemoryMax=28G`, release v0.1.40.1 at 82f46a8; its engine reports 0.1.40 because v0.1.40.1 changed only the Python server). It used random prompts of 2k, 8k and 16k words, 400 tokens out each. - 2k and 8k words: fine (`prompt 7983 tokens ... 209.7 tok/s, 400 generated ... 12.7 tok/s`). - 16k words: stalled, and no request after it ran. ``` strata serve: no progress for 60 s during a request (reading the prompt (batched): layer 18 of the prompt chunk from token 0) - stopping the engine so the server starts it again (issue #29) strata serve: stall report (engine 0.1.40): stage "reading the prompt (batched): layer 18 of the prompt chunk from token 0" for 818 s; 0 layers served since the last finished step (0 = stopped, more = slow) expert pool threads: w0=sleeping w1=sleeping w2=sleeping w3=sleeping w4=sleeping; host idle for 841520 ms threads waiting on the disk (state D): 0 of 31 memory: 14180 MiB resident, 262 MiB in swap, 20852 MiB RAM available ``` GPU use was 0% and VRAM was full during the stall. The engine did not restart by itself after 818 s. I stopped the unit. With the variable set, this box has had zero stalls since 2026-10-04. ## The engine already has the cure, for one mode only `src/program/generate.cpp:1515` sets `GPU_PINNED_MIN_XFER_SIZE=1000000` (MiB) when `STRATA_ARENA_MMAP=1`. The comment there names the same mechanism my first post guessed at: ROCclr locks pageable sources of 1 MiB or more in place as a GPU userptr. `--mmap-experts` does not set `STRATA_ARENA_MMAP`, so it does not get that default. My 1048576 has the same effect as your 1000000: both are far above any copy, so ROCclr always stages. A one-line code follow-up is possible: also apply that default when `--mmap-experts` is on. I have not done it in this PR. It stays docs only unless you want the code change. Related: #267, #649. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-04 02:05:04 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#3033
No description provided.