mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#576
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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 does1.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 mmapfixes the warm case (6,037 tok/s, disk 0) because the OS pagecache holds the table pages across requests, but the first cold pass still streams at ~156 MB/s
and can trip the
#29no-progress watchdog (engine self-terminates, request errors, server reloads).Environment
0.1.40-nvfp4.3, forksergqwer/strata-nvfp4(based on upstream 0.1.40), backend cuda, arch
sm_120.--layer-splitn/a).models/ple-fp8.gguf= 47.68 GiB (320,001,536 × 160 n-gram table).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
read — e.g. a ~168k-token coding-agent session history. (A synthetic repetitive filler will
not reproduce; see measurements.)
psutil.disk_io_counters(), e.g.disk_read_mbin/metrics).--ple-io direct: during the prompt pass CPU ~3 %, GPU 0–4 %, power ~27 W, anddisk 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)→ exit3221226505.--ple-io mmap: a warm repeat of the same session runsdisk=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/son 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.read mode is.
Measurements (7. 10. 2026)
--ple-io direct--ple-io mmap, warm cache--ple-io mmap, coldPer-second
psutilsample during adirectstall (state=reading):Stall report (engine 0.1.40), same class as #29:
Analysis
docs/NVFP4.mdsays layer 1 adds 16 rows of the n-gram table per token and the table "stays onthe 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 hostdirect(= unbuffered) is pathologically slow(~2.4 % of the disk's sequential rate), while
mmapreaches ~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 — aWindows box with 128 GB can't use it, and the table (47.68 GiB) would not fit the ~32 GiB free anyway.
Additional Context
--ple-io mmap— warm sessions ~6,000 tok/s, disk 0. Documented locally.--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.
#1341 (
--pipeline-windows>100k deadlock, #29), #29 (the watchdog), #357/#362 (unbuffered Windows).Questions
--ple-io directon Windows, or is the unbuffered path a bug there?counted as "no progress")?
--ple-io ram(or an equivalent "keep the hot table region in RAM") planned?@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 directreads 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 ramkeeps 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.@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 mmapand says so; an explicit--ple-io directis kept and only gets a warning. On a healthy drive it printsPLE direct read probe: N rows/s (fine)and stays direct (our B70 VM: 163,660 rows/s).STRATA_PLE_PROBE=1turns the probe off. This does not fix the cold-pass mmap rate you saw (156 MB/s), only the 40-100x gap;--ple-io ramis 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?@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):The probe reads 6,641 rows/s ≈ 27 MB/s, well below your 15,000 threshold, so it would pick
--ple-io mmap(Ipassed an explicit
--ple-io directjust to make it print). This reproduces the ~34 MB/s from my original report on adifferent table/model. In production I keep the table in RAM (
--ple-io ram), so we are unaffected; the probe is agood 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.)
@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.