[GH-ISSUE #5414] [Engine] a long prompt stalls 60 s in "reading the prompt (batched)" - 9 times in 5,927 requests #3234

Open
opened 2026-11-07 14:39:03 +07:00 by bsakaguchi · 6 comments
Owner

Originally created by @sxk5315 on GitHub (Nov 6, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/5414

Summary

On Windows with a two-GPU layer split, a long prompt sometimes stops making progress in reading the prompt (batched) and the engine's own watchdog ends it after 60 s ("no progress for 60 s ... issue #29"). It has happened 9 times in 5,927 completed requests over 14 days of continuous use, always with 74K–118K tokens already read, and always with very little VRAM and a large part of the process paged out.

Two of the nine are on 0.1.57, the rest on 0.1.54, so it is not new in either.

Environment

GPU 2 × Tesla V100-SXM2-16GB (16 GB VRAM each, sm_70), no NVLink, PCIe 3.0 x16 both
RAM 128 GiB
OS Windows 10 Pro 19045
CPU Xeon E5-2686 v4, 18C/36T, no AVX-512 (kernels run on AVX-2)
Driver 553.74
Engine 0.1.57 (BUILD.json: commit 0bdcef4682c5, archs 60,61,70,75,80,86,89, cuda 12.9)
Source 0.2.11
Model Qwen3.8-Flash-Next IQ3_S, native experts pack (~50 GB), MTP drafter

Engine arguments:

--pack ...\iq3_s --native ...\00001-of-00002.gguf --ple-gguf ...\00002-of-00002.gguf
--expert-profile ...\expert-profile.bin --expert-cache auto --prefill auto:32768
--spec 4 --spec-min-p 0.7 --mtp ...\mtp\rt --max-context 262144 --kv int8
--vram-reserve-mib 1536 --kv-resident 20480 --conversation-cache-mib 8192 --vision
--pipeline-windows 2

layer split auto puts CUDA0 then CUDA1 (K = 25 / 48 depending on the window). Startup reports expert cache 4329 slots, 8.26 GiB of VRAM and 496 MiB of VRAM free with everything loaded (it warns that this is below its 1024 MiB line, and suggests --prefill auto:8192).

The stall report (0.1.57, verbatim)

strata serve: no progress for 60 s during a request (reading the prompt (batched), done up to token 73895) - stopping the engine so the server starts it again (issue #29)
strata serve: stall report (engine 0.1.57): stage "reading the prompt (batched), done up to token 73895" for 60 s; 0 layers served since the last finished step (0 = stopped, more = slow)
  VRAM free when this request began: 1438 MiB
  expert pool: epoch 11177786, batch epoch 11177786: 51 of 51 jobs claimed, 51 done; 16 of 16 workers parked, 16 sleeping; mode 0
  expert pool threads: w0=sleeping w1=sleeping ... w15=sleeping
  verify window (last window, not the current stage): 4 tokens at position 131721, host at layer step 25; the GPU rang 25; flags: served 25, plan (A) 25, copies (B) 25
  memory: 37792 MiB resident, 92438 MiB committed, 34207 MiB RAM available; 34628533 page faults so far
  2 s later:
  expert pool: ... 51 of 51 jobs claimed, 51 done; 16 of 16 workers parked, 16 sleeping; mode 0
  expert pool threads: w0=sleeping ... w15=sleeping
  verify window (last window, not the current stage): 4 tokens at position 131721, host at layer step 25; the GPU rang 25; flags: served 25, plan (A) 25, copies (B) 25
  memory: 37792 MiB resident, 92438 MiB committed, 34208 MiB RAM available; 34628534 page faults so far
  wrote the thread stacks to D:\Strata\strata-stall-15084.dmp (attach it to the issue)
strata: released the verify window's GPU waits (#267): the GPU finished in 0 ms

Nothing at all moves in those 60 s: the expert pool finished all 51 jobs, all 16 workers are asleep, and page faults grew by 1 in 2 s. So the host thread is parked on a wait, not computing.

Note for whoever reads this: the verify window (last window, not the current stage) line is the previous request's window (position 131721 belongs to the 131,792-token request that completed just before). It says so itself. I first took served 25 / plan 25 / copies 25 for the stall point — it is not, and it sent me down the --pipeline-windows / drafter path for a day. position never advances across the two samples.

The nine stalls

# time engine stage done up to token VRAM free at start resident / committed
1 10-31 00:23 0.1.54 mtp draft: waiting for the GPU -1 — 1588 MiB 33852 / 68789
2 11-04 20:50 0.1.54 reading the prompt (batched) 81,177 1434 MiB 39321 / 91633
3 11-05 20:42 0.1.54 reading the prompt (batched) 93,753 1672 MiB 31076 / 84771
4 11-05 21:16 0.1.54 reading the prompt (batched) 102,057 1434 MiB 8419 / 85367
5 11-05 21:33 0.1.54 reading the prompt (batched) 86,111 1432 MiB 39683 / 91883
6 11-05 23:38 0.1.54 reading the prompt (batched) 97,731 1434 MiB 11593 / 88572
7 11-06 01:00 0.1.54 reading the prompt (batched) 98,708 1438 MiB 38131 / 91747
8 11-06 16:29 0.1.57 reading the prompt (batched) 117,105 1444 MiB 40495 / 92510
9 11-06 17:09 0.1.57 reading the prompt (batched) 73,895 1438 MiB 37792 / 92438

Rate: 9 / 5,927 requests = 0.15 %, or 9 / 3,706 requests with a prompt ≥ 70K tokens = 0.24 %.

Two constants across all nine:

  • VRAM free when this request began is 1432–1672 MiB, i.e. just above the reserve. The engine itself calls 496 MiB free after loading a warning condition.
  • Committed memory is 2–10× resident: at stall #4 the process had 8.4 GB resident and 85.4 GB committed (90 % paged out), with 26–34 M page faults accumulated. This box is a 128 GiB machine running agents that keep several 100K+ token conversations alive.

The prompts themselves are mostly prompt-cache hits with a small tail read, which is the shape an agent turn has here:

118891 tokens = 118843 reused + 48 read in 1465 ms
127547 tokens = 127504 reused + 43 read in 1153 ms
127283 tokens = 127225 reused + 58 read in 1839 ms
129866 tokens = 129823 reused + 43 read in 993 ms

So the common case is "reuse almost the whole prompt, read a few dozen new tokens". The done up to token values above do not fall exactly on a reuse boundary of a completed request (only #5 is within 3 tokens of one, 86108), so I can't claim the stall is at the reuse→new-token handover; I have no token count for the stalled request itself since it never finished.

Ruled out

  • Not a slow path. 0 layers served in 60 s, all pool workers asleep, page faults +1 in 2 s.
  • Not #5147 / #5149. That pair is a drafter deadlock in the --pipeline-windows window loop (generate.cpp, mtp.prefill(..., false) beside a stage-0 window). This stall's stage is named in src/prefill/prefill.cpp and that file contains no mtp. call at all (the only drafter prefill is generate.cpp:12423, guarded by !batched). #5149 also only adds serve_stage0_to_end() in generate.cpp and is still open — 0.2.11 has no trace of it.
  • Not a link problem. Both cards sit at PCIe 3.0 x16 in the samples, and ECC uncorrectable / retired pages / replays are all 0.
  • Not reproducible on demand. 0.15 % of requests, so I cannot bisect a flag on a single run.

Files

strata-stall-15084.dmp.gz — 274 KB, gzipped; the 0.1.57 stall #9 (73,895 of 73,902 tokens).

Two more exist from earlier stalls (strata-stall-15264.dmp 1.9 MB, strata-stall-3820.dmp 423 KB); the rest are 0 bytes. Ask and I will attach those as well.

What I am trying now

--pipeline-windows 2 → 0, to rule that flag in or out as a contributor (it is confounded: it was turned on the same day the engine went 0.1.44.1 → 0.1.52, and every stall since is on 0.1.52+). I'll report back with a day of data either way.

If the intended answer is "lower --prefill so the verify buffers don't fight the expert cache" or "this is the memory guard", tell me which knob you want measured and I'll run it — the machine is dedicated to this workload and I can hold a configuration for days.

Originally created by @sxk5315 on GitHub (Nov 6, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/5414 ## Summary On Windows with a two-GPU layer split, a long prompt sometimes stops making progress in `reading the prompt (batched)` and the engine's own watchdog ends it after 60 s ("no progress for 60 s ... issue #29"). It has happened **9 times in 5,927 completed requests over 14 days of continuous use**, always with 74K–118K tokens already read, and always with very little VRAM and a large part of the process paged out. Two of the nine are on 0.1.57, the rest on 0.1.54, so it is not new in either. ## Environment | | | |---|---| | GPU | 2 × Tesla V100-SXM2-16GB (**16 GB VRAM** each, sm_70), no NVLink, PCIe 3.0 x16 both | | RAM | **128 GiB** | | OS | **Windows 10 Pro 19045** | | CPU | Xeon E5-2686 v4, 18C/36T, no AVX-512 (kernels run on AVX-2) | | Driver | 553.74 | | Engine | 0.1.57 (`BUILD.json`: `commit 0bdcef4682c5`, archs `60,61,70,75,80,86,89`, cuda 12.9) | | Source | 0.2.11 | | Model | Qwen3.8-Flash-Next IQ3_S, native experts pack (~50 GB), MTP drafter | Engine arguments: ``` --pack ...\iq3_s --native ...\00001-of-00002.gguf --ple-gguf ...\00002-of-00002.gguf --expert-profile ...\expert-profile.bin --expert-cache auto --prefill auto:32768 --spec 4 --spec-min-p 0.7 --mtp ...\mtp\rt --max-context 262144 --kv int8 --vram-reserve-mib 1536 --kv-resident 20480 --conversation-cache-mib 8192 --vision --pipeline-windows 2 ``` `layer split auto` puts CUDA0 then CUDA1 (K = 25 / 48 depending on the window). Startup reports `expert cache 4329 slots, 8.26 GiB of VRAM` and `496 MiB of VRAM free with everything loaded` (it warns that this is below its 1024 MiB line, and suggests `--prefill auto:8192`). ## The stall report (0.1.57, verbatim) ``` strata serve: no progress for 60 s during a request (reading the prompt (batched), done up to token 73895) - stopping the engine so the server starts it again (issue #29) strata serve: stall report (engine 0.1.57): stage "reading the prompt (batched), done up to token 73895" for 60 s; 0 layers served since the last finished step (0 = stopped, more = slow) VRAM free when this request began: 1438 MiB expert pool: epoch 11177786, batch epoch 11177786: 51 of 51 jobs claimed, 51 done; 16 of 16 workers parked, 16 sleeping; mode 0 expert pool threads: w0=sleeping w1=sleeping ... w15=sleeping verify window (last window, not the current stage): 4 tokens at position 131721, host at layer step 25; the GPU rang 25; flags: served 25, plan (A) 25, copies (B) 25 memory: 37792 MiB resident, 92438 MiB committed, 34207 MiB RAM available; 34628533 page faults so far 2 s later: expert pool: ... 51 of 51 jobs claimed, 51 done; 16 of 16 workers parked, 16 sleeping; mode 0 expert pool threads: w0=sleeping ... w15=sleeping verify window (last window, not the current stage): 4 tokens at position 131721, host at layer step 25; the GPU rang 25; flags: served 25, plan (A) 25, copies (B) 25 memory: 37792 MiB resident, 92438 MiB committed, 34208 MiB RAM available; 34628534 page faults so far wrote the thread stacks to D:\Strata\strata-stall-15084.dmp (attach it to the issue) strata: released the verify window's GPU waits (#267): the GPU finished in 0 ms ``` Nothing at all moves in those 60 s: the expert pool finished all 51 jobs, all 16 workers are asleep, and page faults grew by 1 in 2 s. So the host thread is parked on a wait, not computing. Note for whoever reads this: the `verify window (last window, not the current stage)` line is **the previous request's window** (position 131721 belongs to the 131,792-token request that completed just before). It says so itself. I first took `served 25 / plan 25 / copies 25` for the stall point — it is not, and it sent me down the `--pipeline-windows` / drafter path for a day. `position` never advances across the two samples. ## The nine stalls | # | time | engine | stage | done up to token | VRAM free at start | resident / committed | |---|---|---|---|---:|---:|---:| | 1 | 10-31 00:23 | 0.1.54 | `mtp draft: waiting for the GPU -1` | — | 1588 MiB | 33852 / 68789 | | 2 | 11-04 20:50 | 0.1.54 | `reading the prompt (batched)` | 81,177 | 1434 MiB | 39321 / 91633 | | 3 | 11-05 20:42 | 0.1.54 | `reading the prompt (batched)` | 93,753 | 1672 MiB | 31076 / 84771 | | 4 | 11-05 21:16 | 0.1.54 | `reading the prompt (batched)` | 102,057 | 1434 MiB | 8419 / 85367 | | 5 | 11-05 21:33 | 0.1.54 | `reading the prompt (batched)` | 86,111 | 1432 MiB | 39683 / 91883 | | 6 | 11-05 23:38 | 0.1.54 | `reading the prompt (batched)` | 97,731 | 1434 MiB | 11593 / 88572 | | 7 | 11-06 01:00 | 0.1.54 | `reading the prompt (batched)` | 98,708 | 1438 MiB | 38131 / 91747 | | 8 | 11-06 16:29 | 0.1.57 | `reading the prompt (batched)` | 117,105 | 1444 MiB | 40495 / 92510 | | 9 | 11-06 17:09 | 0.1.57 | `reading the prompt (batched)` | 73,895 | 1438 MiB | 37792 / 92438 | Rate: 9 / 5,927 requests = 0.15 %, or 9 / 3,706 requests with a prompt ≥ 70K tokens = 0.24 %. Two constants across all nine: - **`VRAM free when this request began` is 1432–1672 MiB**, i.e. just above the reserve. The engine itself calls 496 MiB free after loading a warning condition. - **Committed memory is 2–10× resident**: at stall #4 the process had 8.4 GB resident and 85.4 GB committed (90 % paged out), with 26–34 M page faults accumulated. This box is a 128 GiB machine running agents that keep several 100K+ token conversations alive. The prompts themselves are mostly prompt-cache hits with a small tail read, which is the shape an agent turn has here: ``` 118891 tokens = 118843 reused + 48 read in 1465 ms 127547 tokens = 127504 reused + 43 read in 1153 ms 127283 tokens = 127225 reused + 58 read in 1839 ms 129866 tokens = 129823 reused + 43 read in 993 ms ``` So the common case is "reuse almost the whole prompt, read a few dozen new tokens". The `done up to token` values above do not fall exactly on a reuse boundary of a completed request (only #5 is within 3 tokens of one, 86108), so I can't claim the stall is at the reuse→new-token handover; I have no token count for the stalled request itself since it never finished. ## Ruled out - **Not a slow path.** 0 layers served in 60 s, all pool workers asleep, page faults +1 in 2 s. - **Not #5147 / #5149.** That pair is a drafter deadlock in the `--pipeline-windows` window loop (`generate.cpp`, `mtp.prefill(..., false)` beside a stage-0 window). This stall's stage is named in `src/prefill/prefill.cpp` and that file contains **no `mtp.` call at all** (the only drafter prefill is `generate.cpp:12423`, guarded by `!batched`). #5149 also only adds `serve_stage0_to_end()` in `generate.cpp` and is still open — 0.2.11 has no trace of it. - **Not a link problem.** Both cards sit at PCIe 3.0 x16 in the samples, and ECC uncorrectable / retired pages / replays are all 0. - **Not reproducible on demand.** 0.15 % of requests, so I cannot bisect a flag on a single run. ## Files [strata-stall-15084.dmp.gz](https://github.com/user-attachments/files/34489945/strata-stall-15084.dmp.gz) — 274 KB, gzipped; the 0.1.57 stall #9 (73,895 of 73,902 tokens). Two more exist from earlier stalls (`strata-stall-15264.dmp` 1.9 MB, `strata-stall-3820.dmp` 423 KB); the rest are 0 bytes. Ask and I will attach those as well. ## What I am trying now `--pipeline-windows 2` → `0`, to rule that flag in or out as a contributor (it is confounded: it was turned on the same day the engine went 0.1.44.1 → 0.1.52, and every stall since is on 0.1.52+). I'll report back with a day of data either way. If the intended answer is "lower `--prefill` so the verify buffers don't fight the expert cache" or "this is the memory guard", tell me which knob you want measured and I'll run it — the machine is dedicated to this workload and I can hold a configuration for days.
Author
Owner

@github-actions[bot] commented on GitHub (Nov 6, 2026):

Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing:

  • Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other], then a short description. Example: "[Engine] decode stops after 2 minutes".
  • Add your graphics card with its VRAM, your RAM and your operating system.

Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment /reopen.

Details: CONTRIBUTING.md

<!-- gh-comment-id:6689560888 --> @github-actions[bot] commented on GitHub (Nov 6, 2026): Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing: - [ ] Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other], then a short description. Example: "[Engine] decode stops after 2 minutes". - [ ] Add your graphics card with its VRAM, your RAM and your operating system. Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment `/reopen`. Details: [CONTRIBUTING.md](https://github.com/Niko1221/Strata/blob/main/CONTRIBUTING.md)
Author
Owner

@github-actions[bot] commented on GitHub (Nov 6, 2026):

Thanks, this follows the format now.

<!-- gh-comment-id:6689674228 --> @github-actions[bot] commented on GitHub (Nov 6, 2026): Thanks, this follows the format now.
Author
Owner

@undrtkr commented on GitHub (Nov 6, 2026):

@sxk5315

try --no-prefill-borrow

<!-- gh-comment-id:6695984060 --> @undrtkr commented on GitHub (Nov 6, 2026): @sxk5315 try --no-prefill-borrow
Author
Owner

@sxk5315 commented on GitHub (Nov 7, 2026):

@sxk5315

try --no-prefill-borrow

Tried it on 0.1.57, 2×V100-SXM2-16GB, IQ3_S (50 GB pack). It does remove the borrow/refill window, but prefill collapsed: a 77,396-token cold read went from 49 s (1,624 tok/s) to 503 s (154 tok/s), CUDA1 cache 3,667 → 2,812 slots. Too expensive for a 16 GB card with a 50 GB pack — the chunk shrinks and every chunk re-streams its experts. Reverted. I'll keep --pipeline-windows 0 for now and report whether the stall returns.

<!-- gh-comment-id:6702048026 --> @sxk5315 commented on GitHub (Nov 7, 2026): > [@sxk5315](https://github.com/sxk5315) > > try --no-prefill-borrow Tried it on 0.1.57, 2×V100-SXM2-16GB, IQ3_S (50 GB pack). It does remove the borrow/refill window, but prefill collapsed: a 77,396-token cold read went from 49 s (1,624 tok/s) to 503 s (154 tok/s), CUDA1 cache 3,667 → 2,812 slots. Too expensive for a 16 GB card with a 50 GB pack — the chunk shrinks and every chunk re-streams its experts. Reverted. I'll keep --pipeline-windows 0 for now and report whether the stall returns.
Author
Owner

@udqe commented on GitHub (Nov 7, 2026):

Same bug class you were pointed away from, measured from the other side: on a fully-auto-filled 24 GB pair, --no-prefill-borrow is not a workaround - it manufactures the #2065 paging condition this issue is about. Numbers, then the negative control.

Our shape. 2x RTX 4090 (24 GB, sm_89) Windows 11, engine 0.1.57 throughout (quoted boots all 0.1.57-windows-x86_64-cuda), main engine with fixed --layer-split 22, --expert-cache auto --prefill auto (chunk 8192), --vram-reserve-mib 2048 --vram-reserve-later-mib 972 --pipeline-windows 2, two quant arms on the same box (UD-IQ4_XS-v31 and UD-Q4_K_XL). Both arms run the borrow - the boot line, IQ4 arm:

strata serve: the prompt path borrows 1908 CUDA0 cache slots (4.21 GiB)
strata serve: CUDA1 prompt path borrows 1786 of its 7126 slots (4.21 GiB)
strata serve: 1704 MiB of VRAM free with everything loaded
strata serve: CUDA1: 1060 MiB of VRAM free with everything loaded

Negative control first, because the denominator is comparable to yours: 9 stalls / 5,927 - we have 0 / 6,920. Three engine logs on this rig (IQ4 arm 380 requests, Q4 arm 6,508 + 32), grep-equivalent over all of them for no progress for 60 s|stall report and watchdog|stopping the engine: zero occurrences in any. Long prompts run here (295K-token cold prefills at 75.5 s as the tuned benchmark), so the stage your watchdog names does get exercised. If the borrow path itself were the trigger, this box should have hit it by now.

Then the offered test: one variable per boot, --no-prefill-borrow added, everything else identical, 24 GB cards. The plan changes at start-up in a way we did not expect:

strata serve: the prompt path allocates its own buffers (too few cache slots to borrow)

With nothing to borrow, auto still fills the card - the cache lands at 6,440 / 6,391 slots (14.18 / 15.07 GiB) versus the borrow-enabled plan's 5,867 - and the prompt buffers have nowhere free to go. VRAM free with everything loaded reads 571 MiB (CUDA0), and two requests later the engine prints its own warning, twice:

strata serve: WARNING: only 540 MiB of VRAM free at the start of this request (below 1024 MiB): ... (#2065)

The same 324 MiB-start warning follows. So on 24 GB the flag does not "remove the borrow/refill window" cleanly - it moves the card into exactly the low-free state #2065 describes, which is the state your stall report is investigating.

The measured cost, same ladder both sides:

borrow (baseline boot) --no-prefill-borrow
66K cold read ~20 s 40-41 s x2.05
295K cold A/B 77.7 / 80.3 s 191.9 / 195.4 s x2.45-2.47
warm 6x5 pool median 2,449.5 ms 2,442.5 ms unchanged
needle suite 4/4 4/4 unchanged
expert cache 5,867 (plan) 5,312 (plan) -555
free at request start 1,704 / 1,060 MiB 540 / 324 MiB WARN x2 vs 0

Your 16 GB collapse and ours agree in kind and roughly in magnitude: the flag trades prefill for a card that has no room left, and the slower the prompt, the longer the window where #2065 conditions exist. Where I would look next is not the borrow itself - both our arms run it continuously without a stall - but what is different before the borrow matters: your --prefill auto:32768 chunk on 16 GB cards, the mixed IQ3_S pool, and sm_70.

If a 24 GB-class arm would help the bisect (borrow kept with a 32768 chunk, or borrow off with --vram-reserve-mib 2560 as the warning advises, one variable per boot), this box is set up to run either in a few minutes; the flag goes in and comes out of the config between boots.

(ai-assisted; all lines quoted from this box's logs, boots timestamped in our notes; probe reverted, baseline config byte-restored)

<!-- gh-comment-id:6706894710 --> @udqe commented on GitHub (Nov 7, 2026): Same bug class you were pointed away from, measured from the other side: on a fully-auto-filled 24 GB pair, `--no-prefill-borrow` is not a workaround - it manufactures the #2065 paging condition this issue is about. Numbers, then the negative control. **Our shape.** 2x RTX 4090 (24 GB, sm_89) Windows 11, engine 0.1.57 throughout (quoted boots all `0.1.57-windows-x86_64-cuda`), main engine with fixed `--layer-split 22`, `--expert-cache auto --prefill auto` (chunk 8192), `--vram-reserve-mib 2048 --vram-reserve-later-mib 972 --pipeline-windows 2`, two quant arms on the same box (UD-IQ4_XS-v31 and UD-Q4_K_XL). Both arms run the borrow - the boot line, IQ4 arm: ``` strata serve: the prompt path borrows 1908 CUDA0 cache slots (4.21 GiB) strata serve: CUDA1 prompt path borrows 1786 of its 7126 slots (4.21 GiB) strata serve: 1704 MiB of VRAM free with everything loaded strata serve: CUDA1: 1060 MiB of VRAM free with everything loaded ``` **Negative control first, because the denominator is comparable to yours: 9 stalls / 5,927 - we have 0 / 6,920.** Three engine logs on this rig (IQ4 arm 380 requests, Q4 arm 6,508 + 32), `grep`-equivalent over all of them for `no progress for 60 s|stall report` and `watchdog|stopping the engine`: zero occurrences in any. Long prompts run here (295K-token cold prefills at 75.5 s as the tuned benchmark), so the stage your watchdog names does get exercised. If the borrow path itself were the trigger, this box should have hit it by now. **Then the offered test: one variable per boot, `--no-prefill-borrow` added, everything else identical, 24 GB cards.** The plan changes at start-up in a way we did not expect: ``` strata serve: the prompt path allocates its own buffers (too few cache slots to borrow) ``` With nothing to borrow, `auto` still fills the card - the cache lands at 6,440 / 6,391 slots (14.18 / 15.07 GiB) versus the borrow-enabled plan's 5,867 - and the prompt buffers have nowhere free to go. `VRAM free with everything loaded` reads 571 MiB (CUDA0), and two requests later the engine prints its own warning, twice: ``` strata serve: WARNING: only 540 MiB of VRAM free at the start of this request (below 1024 MiB): ... (#2065) ``` The same 324 MiB-start warning follows. So on 24 GB the flag does not "remove the borrow/refill window" cleanly - it moves the card into exactly the low-free state #2065 describes, which is the state your stall report is investigating. The measured cost, same ladder both sides: | | borrow (baseline boot) | `--no-prefill-borrow` | | |---|---:|---:|---| | 66K cold read | ~20 s | 40-41 s | **x2.05** | | 295K cold A/B | 77.7 / 80.3 s | 191.9 / 195.4 s | **x2.45-2.47** | | warm 6x5 pool median | 2,449.5 ms | 2,442.5 ms | unchanged | | needle suite | 4/4 | 4/4 | unchanged | | expert cache | 5,867 (plan) | 5,312 (plan) | -555 | | free at request start | 1,704 / 1,060 MiB | **540 / 324 MiB** | WARN x2 vs 0 | Your 16 GB collapse and ours agree in kind and roughly in magnitude: the flag trades prefill for a card that has no room left, and the slower the prompt, the longer the window where #2065 conditions exist. Where I would look next is not the borrow itself - both our arms run it continuously without a stall - but what is different before the borrow matters: your `--prefill auto:32768` chunk on 16 GB cards, the mixed IQ3_S pool, and sm_70. If a 24 GB-class arm would help the bisect (borrow kept with a 32768 chunk, or borrow off with `--vram-reserve-mib 2560` as the warning advises, one variable per boot), this box is set up to run either in a few minutes; the flag goes in and comes out of the config between boots. (ai-assisted; all lines quoted from this box's logs, boots timestamped in our notes; probe reverted, baseline config byte-restored)
Author
Owner

@sxk5315 commented on GitHub (Nov 7, 2026):

Thanks — this is the strongest data point on the thread so far, and the negative control is exactly what was missing. It settles two things, I think one inference needs correcting for our box, and our logs add one line of evidence that narrows the bisect further.

What it settles

--no-prefill-borrow is not a workaround here either. We measured it on 2x V100 16 GB (engine 0.1.57, same --prefill auto:32768): a 77K cold prefill went from 49 s / 1,624 tok/s to 503 s / 154 tok/s (~10x), and we reverted it. Our boot line matches yours verbatim: the prompt path allocates its own buffers (too few cache slots to borrow) (strata-noborrow.log:58). Your 2.05x / 2.45x on 24 GB and our ~10x on 16 GB agree in kind; sm_70 / 16 GB / a 32K chunk just makes the penalty much worse. Your unchanged warm pool and needle suite also fit a prefill-path-only cost.

The borrow itself is not the trigger. 0 stalls in 6,920 requests across two quant arms, including 295K cold prefills, is a solid negative control. We have nothing that contradicts it, and we have dropped the borrow from the list of suspects.

One correction: #2065 is not the state our stall happens in

The run in this issue is strata-iq3_s-direct.json (borrow on, --ple-io direct, --vram-reserve-mib 1536, --max-context 262144). Its log contains zero occurrences of WARNING: only N MiB of VRAM free at the start of this request. Boot lines:

strata serve: 1588 MiB of VRAM free with everything loaded
strata serve: CUDA1: 1464 MiB of VRAM free with everything loaded

and the stall report itself prints VRAM free when this request began: 1438 MiB. System RAM was ~65.9 GiB free under --ple-io direct (no 26.8 GiB PLE table pinned). So the stall occurs with both VRAM and RAM comfortably clear of the #2065 threshold. The 48 #2065 warnings in our older strata-iq3_s.log come from earlier configs, not this run. I agree the flag pushes a 24 GB card into that state and your warning lines are a useful catch in general — but for this report it would send the bisect down the wrong path.

What the stall report actually shows

The 60 s watchdog fires while nothing is busy (strata-direct.log:100-105, 77,396-token prompt):

conversation cache: parked 77435 tokens in 1344.1 ms; parked=1 bytes=1657681344 evictions=0 reused_kv_bytes=0
no progress for 60 s during a request (reading the prompt (batched), done up to token 77389) - stopping the engine ...
  VRAM free when this request began: 1438 MiB
  expert pool: epoch 1398 ... 51 of 51 jobs claimed, 51 done; 16 of 16 workers parked, 16 sleeping; mode 0
  expert pool threads: w0=sleeping ... w15=sleeping; host idle for 223505 ms

7 tokens short of the end; every job done, every worker asleep, host idle for 223 s. That is a completion/synchronisation deadlock at the tail of a batched prefill, not slowness, paging or resource contention. Two other stalls in our logs name different stages but the same shape — verify window: waiting for the GPU to finish the window (flags A/B/M raised) 4 and mtp draft: waiting for the GPU -1 — which points at a lost GPU→host completion signal rather than one stage's kernel. A 75K prompt also stalled at 75334/75339 with all 16 workers sleeping during a separate long-context run, after the conversation cache had accumulated 4.6-5.5 GB with evictions.

Where your intuition is most useful: --prefill auto:32768

There is source support for why this is the first variable to test. docs/DETAILS.md:1309-1314 says the 32768 ceiling is automatic only on a single NVIDIA card of sm_80 or above, that a layer split keeps 8192, and that a RAM guard steps 32768 -> 16384 -> 8192 when RAM cannot cover the extra loan — but that --prefill N, auto:N and STRATA_PREFILL_AUTO_MAX are never changed. Our box is sm_70, 2x16 GB in a layer split, with an explicit auto:32768: that overrides all three guards and runs a path the source designs for sm_80+ single cards. docs/DGX_SPARK_LINUX.md:43 measures the automatic 8192 as only 2-6% slower on NVIDIA, so the cost of testing it is small. Mixed IQ3_S is the other difference you named; we have no A/B on that yet.

On the 24 GB arm

Yes please, if you have the time — but the useful run is borrow kept with the chunk forced to 32768 (--prefill auto:32768), since your bare --prefill auto on a layer split already resolves to 8192 and would not isolate our difference. One variable per boot, as you say. sm_89 + 24 GB may well not reproduce it; that result is useful too. I will run the complementary single-variable boot here (change only auto:32768 -> auto, repeat the 77K cold prefill) and post prefill tok/s and stall count.

(ai-assisted; every quoted line is from this box's engine logs; the docs/ claims are static source reading, not measurements; the chunk A/B has not been run yet.)

<!-- gh-comment-id:6709735349 --> @sxk5315 commented on GitHub (Nov 7, 2026): Thanks — this is the strongest data point on the thread so far, and the negative control is exactly what was missing. It settles two things, I think one inference needs correcting for our box, and our logs add one line of evidence that narrows the bisect further. ## What it settles **`--no-prefill-borrow` is not a workaround here either.** We measured it on 2x V100 16 GB (engine 0.1.57, same `--prefill auto:32768`): a 77K cold prefill went from 49 s / 1,624 tok/s to 503 s / 154 tok/s (~10x), and we reverted it. Our boot line matches yours verbatim: `the prompt path allocates its own buffers (too few cache slots to borrow)` (`strata-noborrow.log:58`). Your 2.05x / 2.45x on 24 GB and our ~10x on 16 GB agree in kind; sm_70 / 16 GB / a 32K chunk just makes the penalty much worse. Your unchanged warm pool and needle suite also fit a prefill-path-only cost. **The borrow itself is not the trigger.** 0 stalls in 6,920 requests across two quant arms, including 295K cold prefills, is a solid negative control. We have nothing that contradicts it, and we have dropped the borrow from the list of suspects. ## One correction: #2065 is not the state our stall happens in The run in this issue is `strata-iq3_s-direct.json` (borrow **on**, `--ple-io direct`, `--vram-reserve-mib 1536`, `--max-context 262144`). Its log contains **zero** occurrences of `WARNING: only N MiB of VRAM free at the start of this request`. Boot lines: ``` strata serve: 1588 MiB of VRAM free with everything loaded strata serve: CUDA1: 1464 MiB of VRAM free with everything loaded ``` and the stall report itself prints `VRAM free when this request began: 1438 MiB`. System RAM was ~65.9 GiB free under `--ple-io direct` (no 26.8 GiB PLE table pinned). So the stall occurs with both VRAM and RAM comfortably clear of the #2065 threshold. The 48 `#2065` warnings in our older `strata-iq3_s.log` come from earlier configs, not this run. I agree the flag pushes a 24 GB card into that state and your warning lines are a useful catch in general — but for this report it would send the bisect down the wrong path. ## What the stall report actually shows The 60 s watchdog fires while nothing is busy (`strata-direct.log:100-105`, 77,396-token prompt): ``` conversation cache: parked 77435 tokens in 1344.1 ms; parked=1 bytes=1657681344 evictions=0 reused_kv_bytes=0 no progress for 60 s during a request (reading the prompt (batched), done up to token 77389) - stopping the engine ... VRAM free when this request began: 1438 MiB expert pool: epoch 1398 ... 51 of 51 jobs claimed, 51 done; 16 of 16 workers parked, 16 sleeping; mode 0 expert pool threads: w0=sleeping ... w15=sleeping; host idle for 223505 ms ``` 7 tokens short of the end; every job done, every worker asleep, host idle for 223 s. That is a completion/synchronisation deadlock at the tail of a batched prefill, not slowness, paging or resource contention. Two other stalls in our logs name different stages but the same shape — `verify window: waiting for the GPU to finish the window (flags A/B/M raised) 4` and `mtp draft: waiting for the GPU -1` — which points at a lost GPU→host completion signal rather than one stage's kernel. A 75K prompt also stalled at 75334/75339 with all 16 workers sleeping during a separate long-context run, after the conversation cache had accumulated 4.6-5.5 GB with evictions. ## Where your intuition is most useful: `--prefill auto:32768` There is source support for why this is the first variable to test. `docs/DETAILS.md:1309-1314` says the 32768 ceiling is automatic only on a *single* NVIDIA card of sm_80 or above, that **a layer split keeps 8192**, and that a RAM guard steps 32768 -> 16384 -> 8192 when RAM cannot cover the extra loan — but that `--prefill N`, `auto:N` and `STRATA_PREFILL_AUTO_MAX` are **never changed**. Our box is sm_70, 2x16 GB in a layer split, with an explicit `auto:32768`: that overrides all three guards and runs a path the source designs for sm_80+ single cards. `docs/DGX_SPARK_LINUX.md:43` measures the automatic 8192 as only 2-6% slower on NVIDIA, so the cost of testing it is small. Mixed IQ3_S is the other difference you named; we have no A/B on that yet. ## On the 24 GB arm Yes please, if you have the time — but the useful run is **borrow kept with the chunk forced to 32768** (`--prefill auto:32768`), since your bare `--prefill auto` on a layer split already resolves to 8192 and would not isolate our difference. One variable per boot, as you say. sm_89 + 24 GB may well not reproduce it; that result is useful too. I will run the complementary single-variable boot here (change only `auto:32768` -> `auto`, repeat the 77K cold prefill) and post prefill tok/s and stall count. (ai-assisted; every quoted line is from this box's engine logs; the `docs/` claims are static source reading, not measurements; the chunk A/B has not been run yet.)
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#3234
No description provided.