mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #1910] [Regression] Prefill 35-55% slower on v0.1.42 vs v0.1.41 on dual 2080 Ti (cold long prefix) #755
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#755
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 @wszhoho on GitHub (Oct 11, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/1910
What do you want to do?
Report a prefill throughput regression between v0.1.41 and v0.1.42 on dual-GPU CUDA hardware, in the hope that it is a fixable regression rather than an intended trade-off.
Environment
Measured prefill (cold 40K prefix)
--no-prefill-borrowSTRATA_SPLIT_OWN=1STRATA_ROUTE_TAIL_SKIP=0So on this hardware v0.1.42 is 35–55% slower than v0.1.41 for a cold long prefix, and none of the exposed knobs (
--no-prefill-borrow,STRATA_SPLIT_OWN=1,STRATA_ROUTE_TAIL_SKIP=0) restores v0.1.41 speed. This suggests a lower-level regression in the prefill path (e.g. the BF16 prefill change, chunk scheduling, or the per-card weight/session split) rather than a single settable option.Question for the maintainers
Was v0.1.42's prefill path changed in a way that could explain this on small-VRAM dual-GPU layer-split setups (22 GB total)? If so, is there an intended opt-in/opt-out equivalent to v0.1.41's behavior that we are missing?
(Not a criticism — just flagging the regression so it can be triaged. Happy to provide more measurements or a reproducible script.)
@wszhoho commented on GitHub (Oct 11, 2026):
Quick note following the commit by Maddox Wong: on his gfx1100 (RX 7900 XT, 24 GB, AMD) the interleaved 4K pairs show v0.1.42 about +2% ahead of v0.1.41, so the prefill regression does not reproduce there.
The regression we reported is specific to NVIDIA CUDA + small-ish VRAM + a dual-GPU layer split. We believe it is tied to the prefill borrow path: in
generate.cpp(~L2048-2112) the borrow decision is governed bySTRATA_SPLIT_OWN, and on small-VRAM cards (reserve_mib * 100 > 12 * total_mib) the code forcesown = false, i.e. it borrows experts from the other card for every request stream and copies them back. With each card already holding nearly all of its experts, that per-request borrow/copy is expensive for a cold long prefix.--no-prefill-borrow: ~565STRATA_SPLIT_OWN=1: ~530STRATA_ROUTE_TAIL_SKIP=0: ~794 (still far below 0.1.41)None of the exposed knobs restore v0.1.41 speed, which is why we suspect a lower-level regression in the prefill path rather than a single option. Happy to run any test config or capture engine logs to help narrow it down.
@wszhoho commented on GitHub (Oct 11, 2026):
Update: root cause located — v0.1.42 mmaps the whole PLE shard and re-reads it during decode
I traced this further on the same hardware (dual RTX 2080 Ti 11 GB, 62 GiB RAM, IQ3_S / GSQ-RCO, 256K context). The regression is not only in cold prefll; decode also reads the disk and runs slower on v0.1.42.
The telling A/B (identical minimal config, same 200-token request)
*-00002-of-00002.gguf, 27 GB,per_layer_token_embd.weight)/proc/<pid>/mapsshows v0.1.42 maps the entire 27 GB second shard read-only; v0.1.41 does not map it. The engine then touches that mapping during decode, soread_bytesclimbs by ~253 MB per request (mostly hitting the OS page cache / standby list, but constantly pulling pages).ngram.cpp(the PLE reader) is byte-identical between the two tags — the difference is in howgenerate.cpploads/maps the PLE shard on the native path.Below are two live dashboard reads while a session was decoding. Same model, same machine — the disk-read column shows the difference: v0.1.41 is at ~0.1 MB/s, v0.1.42 at ~410 MB/s during prefll.
v0.1.41

v0.1.42

For this low-VRAM dual-2080-Ti setup, v0.1.41 is the practical choice: it does not map the PLE shard, reads ~31 MB per request, and decodes at 37.6 tok/s. Happy to provide more traces or test a fix if you'd like (e.g. keeping the PLE table resident or reading it row-bounded like v0.1.41) — I can test patches on this box.
@Niko1221 commented on GitHub (Oct 11, 2026):
Thank you for the careful numbers and for listing what you already tried.
We could not reproduce it so far. A cold 27,300-token prompt, 0.1.41 against 0.1.42, 5 interleaved pairs each, same output: 2x Radeon AI PRO R9700 IQ3_S +4.3% and +1.1% (with ~11 GB-class caches), 2x RTX A4000 IQ3_XXS 0.0%, +0.4% (10.9 GB per card), -0.1% (--max-context 262144), 0.0% (--resident-experts). We have no Turing card. Between the two versions these CUDA-side changes could act differently on 11 GB 2080 Tis: the automatic layer split avoids one- or two-layer stages and a small cache now limits every card's prompt chunk (#1616), each stage's lend region is sized and pinned separately, and a GEMM shape that cuBLAS refuses now falls back to another algorithm.
Could you post, from both versions' start-up logs: the
layer split ... runs layersline, theprompt chunkline, anylendandborrowed slotslines; and one 0.1.42 (or 0.1.43) run with the split 0.1.41 chose forced via--layer-split K? That tells us whether the split or chunk choice is the difference.@0sy commented on GitHub (Oct 11, 2026):
Edit: Nevermind, not Strata related. UnRaid uses fuse layer - once I mounted the direct path vs symlink, the mem got allocated correctly.
Sorry
_Additional info. Running Strata 0.1.42 containerized on UnRaid 7.3.2.
128gb system ram, dual rtx 3060 12gb vram, for a total of 24gb vram.
Strata v0.1.42, Linux Docker on Unraid, IQ3_S, dual RTX 3060,
128 GiB RAM, --ulimit memlock=-1.
With --ple-io ram:
Size: 28125136 kB
Rss: 0 kB
Locked: 0 kB
VmFlags: rd mr mw me lo
Mlocked: 352 kB
Unevictable: 3424 kB
The VMA receives VM_LOCKED, but none of the PLE pages are resident.
The success log therefore does not establish that the table was populated._
@wszhoho commented on GitHub (Oct 12, 2026):
Here is the data you asked for, plus the disk-read measurement that pins down the regression.
Environment (unchanged)
build/strata--spec 2 --spec-min-p 0.5 --max-context 262144 --kv int8 --kv-resident 32768 --pipeline-windows 2 --trim-stage-weights --layer-split 24 --vision)Lines you asked for (identical across 0.1.41 / 0.1.42 / 0.1.43)
The split (24/24), chunk size (8192) and borrow slots (2438/2175) are byte-for-byte identical across all three tags.
0.1.43 forced via --layer-split 24 (your suggested test)
Ran 0.1.43 with an explicit
--layer-split 24. Prefill still does not recover:139 tok/s vs 0.1.41's 833 tok/s — the split is not the difference.
Cold long-prefix comparison (same 12K-token prompt)
I measured disk reads for the 0.1.43
--layer-split 24run via/proc/<pid>/ioacross one cold 12,099-token request: read_bytes went from 56,006,696,960 to 71,188,267,008 → +15,181,570,048 bytes (~14 GB). That is the engine touching the mmap'd PLE shard (*-00002-of-00002.gguf, 27 GB) during the request — 0.1.41 does not map that shard and reads ~31 MB.Summary
/proc/<pid>/mapsobservation earlier.Happy to run any other config (e.g.
--ple-io ram) or capture more traces."@wszhoho commented on GitHub (Oct 12, 2026):
Correction on the disk-read numbers in my previous comment. For rigor:
0.1.41 ~31 MBand0.1.43 (--layer-split 24) ~14 GBare both measured on the same cold 12,099-token prefill via/proc/<pid>/io(read_bytes 56.0G → 71.2G, +15.2 GB for 0.1.43).0.1.42 ~253 MBfigure I listed came from a different measurement — a 200-token decode request read_bytes delta (RSS 49.5→56.1 GB,/proc/<pid>/mapsshowing 0.1.42 maps the whole 27 GB PLE shard while 0.1.41 does not). It was not the cold 12K prefill read_bytes.I have not separately measured the 12K cold-prefill read_bytes for 0.1.42. Its config lines are identical to 0.1.43 (both use
--ple-io mmap,STRATA_ROUTE_TAIL_SKIP=7, same KV-streaming numbers), so I expect its cold-prefill disk read to be essentially the same order as 0.1.43's. Happy to measure it directly if that helps pin the magnitude.The core finding stands regardless: 0.1.41 reads ~31 MB and does not map the PLE shard; 0.1.42/0.1.43 map the 27 GB shard and read far more during requests.
@wszhoho commented on GitHub (Oct 12, 2026):
Resolution found:
--ple-io directrestores v0.1.43 prefill to v0.1.41 levels on this SATA SSDThis confirms #2040's diagnosis for an ordinary SATA SSD (Kingston SA400S3): the 15k rows/s "direct is healthy" auto-switch threshold is NVMe-calibrated, so on a plain SATA drive the engine auto-switches
--ple-iotommap, and that mmap of the whole PLE shard is what kills cold long-prefill.What I ran
Same hardware as before (2 × RTX 2080 Ti 11 GB, 62 GiB RAM, IQ3_S/GSQ-RCO, 256K). Engine v0.1.43 with the explicit flag added to the otherwise-identical production config:
The engine logs the expected warning for this drive but keeps direct as requested:
Cold long-prefill results (real generated prompts,
reading the promptlines)--ple-io direct--ple-io directSo on this drive
directis indeed the faster mode (>5x over mmap), exactly the opposite of what the auto-switch assumed — matching #2040's point.Wanted
If possible, could the NVMe-only auto-switch be made to either:
so users on SATA drives get
directautomatically without needing to add--ple-io directby hand.Thanks for the great work — flagging this as resolved on our end via the explicit flag.