[GH-ISSUE #1425] [Windows, RTX 5090 32 GB, NVFP4 fork] ple: --ple-io direct streams the n-gram table at ~34 MB/s while the SSD does 1.4 GB/s - fresh long prompts prefill ~5x slow; cold passes can trip the #29 watchdog #576

Closed
opened 2026-11-04 01:44:10 +07:00 by bsakaguchi · 4 comments
Owner

Originally created by @RichardFreml on GitHub (Oct 7, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/1425

Summary

On Windows, layer 1's PLE (n-gram) table is read from the SSD on every fresh prompt. With the
default --ple-io direct, unbuffered reads only reach ~34 MB/s while the same SSD does
1.4–1.7 GB/s sequentially. Because that I/O is on the prompt path, a real (diverse) conversation
prefills at ~1,240 tok/s while a synthetic filler prompt of the same length prefills at
~6,500–7,300 tok/s (its n-grams repeat → cached rows → no I/O), with the GPU idle during the stalls.

Switching to --ple-io mmap fixes the warm case (6,037 tok/s, disk 0) because the OS page
cache holds the table pages across requests, but the first cold pass still streams at ~156 MB/s
and can trip the #29 no-progress watchdog (engine self-terminates, request errors, server reloads).

Environment

  • Engine: 0.1.40-nvfp4.3, fork sergqwer/strata-nvfp4
    (based on upstream 0.1.40), backend cuda, arch sm_120.
  • GPU: RTX 5090 32 GB (1×, --layer-split n/a).
  • Host: AMD Ryzen Threadripper 3970X (32C/64T, Zen 2, no AVX-512), 128 GB RAM, Windows.
  • Disk: GIGABYTE GP-GSM2NE3100TNTD NVMe 1 TB — ~1,400–1,670 MB/s sequential (observed at model load).
  • Model: Qwen3.8-Flash-Next NVFP4 pack; models/ple-fp8.gguf = 47.68 GiB (320,001,536 × 160 n-gram table).
  • Config: parallel: 2 × 524,288 ctx, YaRN ×2, --kv int8 --kv-resident 32768,
    --ple-gguf models/ple-fp8.gguf, --batch-mtp, --conversation-cache-mib 0.
  • --ple-io: default (direct) unless stated.

Reproduction

  1. Use (or restart) the engine and send a fresh, real long prompt whose n-grams have never been
    read — e.g. a ~168k-token coding-agent session history. (A synthetic repetitive filler will
    not reproduce; see measurements.)
  2. Watch disk read (Windows: psutil.disk_io_counters(), e.g. disk_read_mb in /metrics).
  3. With --ple-io direct: during the prompt pass CPU ~3 %, GPU 0–4 %, power ~27 W, and
    disk read ~34 MB/s sustained; prefill ~1,240 tok/s. Periodically the request hangs and the
    engine aborts: no progress for 60 s … (reading the prompt (batched): layer 1 of the prompt chunk from token 8248) → exit 3221226505.
  4. With --ple-io mmap: a warm repeat of the same session runs disk=0, GPU 100 %,
    6,037 tok/s. A cold pass streams at ~156 MB/s and can still trip the watchdog.

Expected Behavior

A fresh long prompt should prefill at roughly the same order as a cached/repetitive one, and the
no-progress watchdog should not fire on I/O-bound prompt reads.

Actual Behavior

  • --ple-io direct: PLE cold reads ~34 MB/s (unbuffered), GPU idle → prefill ~1,240 tok/s
    on a 168k real session vs ~7,300 tok/s for filler.
  • --ple-io mmap: warm 6,037 tok/s (disk 0), but cold ~156 MB/s and a 60 s no-progress abort.
  • Same disk does 1.4–1.7 GB/s sequentially (model load), so the disk is not the limit — the
    read mode is
    .

Measurements (7. 10. 2026)

scenario prefill disk read
real 168k session, --ple-io direct 1,240 tok/s 34 MB/s (3.8 GB over the pass)
real 168k session, --ple-io mmap, warm cache 6,037 tok/s 0
synthetic 233k fresh prompt, --ple-io mmap, cold 1,725 tok/s 156 MB/s (14.6 GB)
synthetic filler (repetitive n-grams) 6,500–7,300 tok/s 0

Per-second psutil sample during a direct stall (state=reading):

cpu=3.0%  gpu_util=0%  gpu_power=27W  disk_read=34.7 MB/s   <- held for ~10 s per chunk
...
gpu_util=100%  gpu_power=316W  pcie_rx=46 GB/s  disk_read=0.03   <- then the compute burst

Stall report (engine 0.1.40), same class as #29:

strata serve: no progress for 60 s during a request (reading the prompt (batched):
              layer 1 of the prompt chunk from token 8248) - stopping the engine ...
  expert pool: 0 of 0 jobs claimed, 31 of 31 workers parked, 31 sleeping
  host idle for 133717 ms
  wrote the thread stacks to ...strata-stall-8592.dmp

Analysis

docs/NVFP4.md says layer 1 adds 16 rows of the n-gram table per token and the table "stays on
the SSD (16 page reads a token either way)"
, and lists the PLE read path as "plan v0.3 P2"
(--ple-io direct|mmap|ram). On this Windows host direct (= unbuffered) is pathologically slow
(~2.4 % of the disk's sequential rate), while mmap reaches ~156 MB/s cold and ~0 MB/s warm.
Upstream already carries "unbuffered loads on Windows (#357, #362)", so this may be a known
class. Note --ple-io ram (lock the whole table in RAM) is documented Linux/macOS only — a
Windows box with 128 GB can't use it, and the table (47.68 GiB) would not fit the ~32 GiB free anyway.

Additional Context

  • Workaround: --ple-io mmap — warm sessions ~6,000 tok/s, disk 0. Documented locally.
  • A/B --ple-row-cache (8M rows = 720 MB vs default 1M): no difference
    (cold/warm 2,985/6,788 vs 3,230/6,784) → the OS page cache does the work, row-cache is redundant.
  • Related issues: #1407 (expert file tier streaming, same watchdog #29 class; Linux/AMD),
    #1341 (--pipeline-windows >100k deadlock, #29), #29 (the watchdog), #357/#362 (unbuffered Windows).

Questions

  1. Is ~34 MB/s expected for --ple-io direct on Windows, or is the unbuffered path a bug there?
  2. Should an I/O-bound prompt read be able to trip the 60 s no-progress watchdog (i.e. is I/O time
    counted as "no progress")?
  3. Is Windows support for --ple-io ram (or an equivalent "keep the hot table region in RAM") planned?
Originally created by @RichardFreml on GitHub (Oct 7, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/1425 ## Summary On Windows, layer 1's **PLE (n-gram) table** is read from the SSD on every fresh prompt. With the default `--ple-io direct`, **unbuffered** reads only reach **~34 MB/s** while the same SSD does **1.4–1.7 GB/s** sequentially. Because that I/O is on the prompt path, a real (diverse) conversation prefills at **~1,240 tok/s** while a synthetic filler prompt of the same length prefills at **~6,500–7,300 tok/s** (its n-grams repeat → cached rows → no I/O), with the GPU idle during the stalls. Switching to **`--ple-io mmap`** fixes the warm case (**6,037 tok/s, disk 0**) because the OS page cache holds the table pages across requests, but the **first cold pass still streams at ~156 MB/s** and can trip the `#29` no-progress watchdog (engine self-terminates, request errors, server reloads). ## Environment - **Engine:** `0.1.40-nvfp4.3`, fork [`sergqwer/strata-nvfp4`](https://github.com/sergqwer/strata-nvfp4) (based on upstream **0.1.40**), backend cuda, arch `sm_120`. - **GPU:** RTX 5090 32 GB (1×, `--layer-split` n/a). - **Host:** AMD Ryzen Threadripper 3970X (32C/64T, Zen 2, **no AVX-512**), **128 GB RAM**, Windows. - **Disk:** GIGABYTE GP-GSM2NE3100TNTD NVMe 1 TB — **~1,400–1,670 MB/s sequential** (observed at model load). - **Model:** Qwen3.8-Flash-Next NVFP4 pack; `models/ple-fp8.gguf` = **47.68 GiB** (320,001,536 × 160 n-gram table). - **Config:** `parallel: 2` × 524,288 ctx, YaRN ×2, `--kv int8 --kv-resident 32768`, `--ple-gguf models/ple-fp8.gguf`, `--batch-mtp`, `--conversation-cache-mib 0`. - **`--ple-io`:** default (`direct`) unless stated. ## Reproduction 1. Use (or restart) the engine and send a **fresh, real long prompt** whose n-grams have never been read — e.g. a ~168k-token coding-agent session history. (A synthetic *repetitive* filler will **not** reproduce; see measurements.) 2. Watch disk read (Windows: `psutil.disk_io_counters()`, e.g. `disk_read_mb` in `/metrics`). 3. With **`--ple-io direct`**: during the prompt pass CPU ~3 %, GPU **0–4 %**, power ~27 W, and **disk read ~34 MB/s sustained**; prefill ~1,240 tok/s. Periodically the request hangs and the engine aborts: `no progress for 60 s … (reading the prompt (batched): layer 1 of the prompt chunk from token 8248)` → exit `3221226505`. 4. With **`--ple-io mmap`**: a **warm** repeat of the same session runs `disk=0`, GPU 100 %, **6,037 tok/s**. A **cold** pass streams at ~156 MB/s and can still trip the watchdog. ## Expected Behavior A fresh long prompt should prefill at roughly the same order as a cached/repetitive one, and the no-progress watchdog should not fire on I/O-bound prompt reads. ## Actual Behavior - `--ple-io direct`: PLE cold reads ~**34 MB/s** (unbuffered), GPU idle → prefill **~1,240 tok/s** on a 168k real session vs **~7,300 tok/s** for filler. - `--ple-io mmap`: warm **6,037 tok/s** (disk 0), but cold ~**156 MB/s** and a 60 s no-progress abort. - Same disk does **1.4–1.7 GB/s** sequentially (model load), so **the disk is not the limit — the read mode is**. ## Measurements (7. 10. 2026) | scenario | prefill | disk read | |---|---:|---:| | real 168k session, `--ple-io direct` | 1,240 tok/s | 34 MB/s (3.8 GB over the pass) | | real 168k session, `--ple-io mmap`, **warm cache** | **6,037 tok/s** | **0** | | synthetic 233k fresh prompt, `--ple-io mmap`, **cold** | 1,725 tok/s | 156 MB/s (14.6 GB) | | synthetic filler (repetitive n-grams) | 6,500–7,300 tok/s | 0 | Per-second `psutil` sample during a `direct` stall (state=`reading`): ``` cpu=3.0% gpu_util=0% gpu_power=27W disk_read=34.7 MB/s <- held for ~10 s per chunk ... gpu_util=100% gpu_power=316W pcie_rx=46 GB/s disk_read=0.03 <- then the compute burst ``` Stall report (engine 0.1.40), same class as #29: ``` strata serve: no progress for 60 s during a request (reading the prompt (batched): layer 1 of the prompt chunk from token 8248) - stopping the engine ... expert pool: 0 of 0 jobs claimed, 31 of 31 workers parked, 31 sleeping host idle for 133717 ms wrote the thread stacks to ...strata-stall-8592.dmp ``` ## Analysis `docs/NVFP4.md` says layer 1 adds **16 rows of the n-gram table per token** and the table *"stays on the SSD (16 page reads a token either way)"*, and lists the PLE read path as **"plan v0.3 P2"** (`--ple-io direct|mmap|ram`). On this Windows host `direct` (= unbuffered) is pathologically slow (~2.4 % of the disk's sequential rate), while `mmap` reaches ~156 MB/s cold and ~0 MB/s warm. Upstream already carries **"unbuffered loads on Windows (#357, #362)"**, so this may be a known class. Note `--ple-io ram` (lock the whole table in RAM) is documented **Linux/macOS only** — a Windows box with 128 GB can't use it, and the table (47.68 GiB) would not fit the ~32 GiB free anyway. ## Additional Context - **Workaround:** `--ple-io mmap` — warm sessions ~6,000 tok/s, disk 0. Documented locally. - **A/B `--ple-row-cache`** (8M rows = 720 MB vs default 1M): **no difference** (cold/warm 2,985/6,788 vs 3,230/6,784) → the OS page cache does the work, row-cache is redundant. - **Related issues:** #1407 (expert **file tier** streaming, same watchdog #29 class; Linux/AMD), #1341 (`--pipeline-windows` >100k deadlock, #29), #29 (the watchdog), #357/#362 (unbuffered Windows). ## Questions 1. Is ~34 MB/s expected for `--ple-io direct` on Windows, or is the unbuffered path a bug there? 2. Should an I/O-bound prompt read be able to trip the 60 s no-progress watchdog (i.e. is I/O time counted as "no progress")? 3. Is Windows support for `--ple-io ram` (or an equivalent "keep the hot table region in RAM") planned?
Author
Owner

@Niko1221 commented on GitHub (Oct 8, 2026):

Thank you, this is a useful measurement. The batched unbuffered reads in 0.1.41 (#1323) are for the expert stager, not for the PLE table, so they do not change the 34 MB/s you see. --ple-io direct reads a few rows per token at random without the OS cache, and your finding that a diverse prompt reads about 5 times slower than a filler prompt (whose rows repeat and stay cached) fits that.

Two questions: does it reproduce on the stock 0.1.40.3 engine (your numbers are from the NVFP4 fork), and can you use --ple-io ram? The table is 28.8 GB and you have 128 GB of RAM, so --ple-io ram keeps it resident and removes the stall at the cost of that RAM (docs/DETAILS.md, #605). If a stock run shows the same rate, a batched or read-ahead PLE read in the style of #1323 is what to look at, and that is the next thing to test on Windows.

<!-- gh-comment-id:6059699145 --> @Niko1221 commented on GitHub (Oct 8, 2026): Thank you, this is a useful measurement. The batched unbuffered reads in 0.1.41 (#1323) are for the expert stager, not for the PLE table, so they do not change the 34 MB/s you see. `--ple-io direct` reads a few rows per token at random without the OS cache, and your finding that a diverse prompt reads about 5 times slower than a filler prompt (whose rows repeat and stay cached) fits that. Two questions: does it reproduce on the stock 0.1.40.3 engine (your numbers are from the NVFP4 fork), and can you use `--ple-io ram`? The table is 28.8 GB and you have 128 GB of RAM, so `--ple-io ram` keeps it resident and removes the stall at the cost of that RAM (docs/DETAILS.md, #605). If a stock run shows the same rate, a batched or read-ahead PLE read in the style of #1323 is what to look at, and that is the next thing to test on Windows.
Author
Owner

@Niko1221 commented on GitHub (Oct 10, 2026):

Thank you for the measurements and the per-second sample. v0.1.42 measures the problem instead of assuming it: at start, with the default --ple-io direct, the engine reads a few batches of random table rows through the same batched reader a prompt chunk uses (under 0.6 s) and prints the rate. Below 15,000 rows/s (about 60 MB/s of 4 KiB reads; your 34 MB/s is about 8,500) it switches to --ple-io mmap and says so; an explicit --ple-io direct is kept and only gets a warning. On a healthy drive it prints PLE direct read probe: N rows/s (fine) and stays direct (our B70 VM: 163,660 rows/s). STRATA_PLE_PROBE=1 turns the probe off. This does not fix the cold-pass mmap rate you saw (156 MB/s), only the 40-100x gap; --ple-io ram is still the way to take disk reads off the prompt path when the RAM exists. We changed the engine, not setup, because only the engine can do the unbuffered reads. Could you confirm on the NVFP4 fork's drive that the probe reads slow and picks mmap, and send the printed rate?

<!-- gh-comment-id:6099590363 --> @Niko1221 commented on GitHub (Oct 10, 2026): Thank you for the measurements and the per-second sample. v0.1.42 measures the problem instead of assuming it: at start, with the default `--ple-io direct`, the engine reads a few batches of random table rows through the same batched reader a prompt chunk uses (under 0.6 s) and prints the rate. Below 15,000 rows/s (about 60 MB/s of 4 KiB reads; your 34 MB/s is about 8,500) it switches to `--ple-io mmap` and says so; an explicit `--ple-io direct` is kept and only gets a warning. On a healthy drive it prints `PLE direct read probe: N rows/s (fine)` and stays direct (our B70 VM: 163,660 rows/s). `STRATA_PLE_PROBE=1` turns the probe off. This does not fix the cold-pass mmap rate you saw (156 MB/s), only the 40-100x gap; `--ple-io ram` is still the way to take disk reads off the prompt path when the RAM exists. We changed the engine, not setup, because only the engine can do the unbuffered reads. Could you confirm on the NVFP4 fork's drive that the probe reads slow and picks mmap, and send the printed rate?
Author
Owner

@RichardFreml commented on GitHub (Oct 11, 2026):

Confirmed on the same Windows box (RTX 5090 32 GB, Threadripper 3970X, same NVMe), now on upstream 0.1.42, with the
IQ3_S n-gram table (28.8 GB; not the NVFP4 ple-fp8, so this shows it is the Windows unbuffered path, not the pack):

strata generate: WARNING: --ple-io direct measures slow here (6641 rows/s, about 27 MB/s of random 4 KiB reads): a prompt can spend minutes reading layer 1 and trip the stall watchdog (#1425, #1629). --ple-io mmap was 40-100x faster on such drives; --ple-io ram needs the RAM for the table

The probe reads 6,641 rows/s ≈ 27 MB/s, well below your 15,000 threshold, so it would pick --ple-io mmap (I
passed an explicit --ple-io direct just to make it print). This reproduces the ~34 MB/s from my original report on a
different table/model. In production I keep the table in RAM (--ple-io ram), so we are unaffected; the probe is a
good safety net for runs that do not.

(NVFP4 fork note: I no longer run the fork's model — we migrated to upstream + IQ3_S — so this is measured with the
current model on the same drive.)

<!-- gh-comment-id:6106405728 --> @RichardFreml commented on GitHub (Oct 11, 2026): Confirmed on the same Windows box (RTX 5090 32 GB, Threadripper 3970X, same NVMe), now on upstream **0.1.42**, with the IQ3_S n-gram table (28.8 GB; not the NVFP4 `ple-fp8`, so this shows it is the Windows unbuffered path, not the pack): ``` strata generate: WARNING: --ple-io direct measures slow here (6641 rows/s, about 27 MB/s of random 4 KiB reads): a prompt can spend minutes reading layer 1 and trip the stall watchdog (#1425, #1629). --ple-io mmap was 40-100x faster on such drives; --ple-io ram needs the RAM for the table ``` The probe reads **6,641 rows/s ≈ 27 MB/s**, well below your 15,000 threshold, so it would pick `--ple-io mmap` (I passed an explicit `--ple-io direct` just to make it print). This reproduces the ~34 MB/s from my original report on a different table/model. In production I keep the table in RAM (`--ple-io ram`), so we are unaffected; the probe is a good safety net for runs that do not. (NVFP4 fork note: I no longer run the fork's model — we migrated to upstream + IQ3_S — so this is measured with the current model on the same drive.)
Author
Owner

@Niko1221 commented on GitHub (Oct 13, 2026):

Thanks for the report. To keep the tracker current we are closing issues older than three days: 0.1.44 is out with a long list of fixes, and many older reports are covered by it or by 0.1.43.1.

If this still happens on 0.1.44, please leave a comment here with your engine log (and the version line it prints), and we will reopen it. A new issue that links this one works too.

<!-- gh-comment-id:6156091946 --> @Niko1221 commented on GitHub (Oct 13, 2026): Thanks for the report. To keep the tracker current we are closing issues older than three days: [0.1.44](https://github.com/Niko1221/Strata/releases/tag/v0.1.44) is out with a long list of fixes, and many older reports are covered by it or by 0.1.43.1. If this still happens on 0.1.44, please leave a comment here with your engine log (and the version line it prints), and we will reopen it. A new issue that links this one works too.
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#576
No description provided.