mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #2281] [0.1.43.1] 2× RTX 3090 CUDA layer split: decode −20.5% vs v0.1.43, and STRATA_ADAPT_OVERLAP=1 cannot re-enable the overlap ('off: not on a layer split') #918
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#918
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 @ben0112 on GitHub (Oct 13, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/2281
Environment
a0116b2, built from thev0.1.43.1tag tarball,project(strata VERSION 0.1.43.1), self-reportsstrata 0.1.43.1)7695859, the exact binary our production runs)cpuset 0-23,48-71,memlock unlimitedServing flags (identical for every arm, this is our production config verbatim):
Summary
On this machine v0.1.43.1 is ~20.5% slower than v0.1.43 on decode and ~10% slower on a long prompt, and no environment variable recovers it. This is the opposite direction from #2038 / #1964 / #1975 / #2010, where 0.1.43's adaptive overlap was the problem and 0.1.43.1 was the fix. For us the overlap (default on in 0.1.43) is a +28% win, and 0.1.43.1 loses that win while
STRATA_ADAPT_OVERLAP=1no longer turns it back on.Measured (official
tools/ab_engine.py, interleaved arms, order reversed each round)Each arm n=8 decode samples (4 requests × 2 rounds). Request set: 3 short chats + one 6,345-token long prompt, greedy,
--max-new 256.STRATA_ADAPT_OVERLAP=1OVERLAP=1+STRATA_ADAPT_SIGNAL=hostSTRATA_ADAPT_CALLBACK_WARMUP=1Per-request medians (arm 4 run, n=8 per cell):
The regression is repeatable and order-independent: round 0 vs round 1 (arms reversed) — V43 82.6 → 82.7, V431 64.3 → 66.5, OVL1 64.2 → 64.6. Not thermal/state drift.
Baseline sanity: the V43 binary is the one our production serves with, and production measures 72–86 tok/s on the same flags — so 82 tok/s is the true 0.1.43 number here, not a lucky run.
Key evidence: the overlap cannot be re-enabled in 0.1.43.1
Start-up log with
STRATA_ADAPT_OVERLAP=1explicitly set:…even though the same run logs
layer split across 2 GPUs: CUDA0, then CUDA1. So the overlap's code path in 0.1.43.1 is not reachable in this configuration, andSTRATA_ADAPT_SIGNAL=hostdoes not restore the 0.1.43 speed (65.3 vs 64.7 without it).This suggests the 20.5% is not the overlap itself but something else in the 0.1.43.1 range that is on our hot path. Our leading suspect from the commit list is
7bab660b"Prompt path: every pageable async host-to-device copy goes up through pinned bounce slots (#1996)" — at 7.9 GB/s PCIe with a 2-stage layer split, that is exactly the kind of change that could cost ~20%. We have not bisected this, so treat it as a hypothesis, not a finding.Ruled out
STRATA_ADAPT_SIGNAL(host callback restored: no change)STRATA_ADAPT_CALLBACK_WARMUP(no change)cwd, sameserve/server.py, onlyexe=differs--batch/--batch-mtp: we use neither (single request, noparallel)--batch-mtp, and the log shows--batch-groupsis not involved--ple-io ram, table locked in RAM in 2.5 s in both versionsImpact / decision
We are a production deployment on this exact hardware. We are staying on v0.1.43 and skipping 0.1.43.1 — giving up the fixes we would otherwise want (#2026
</tool_call>handling, #2040 PLE auto-mmap, the serve-side BGEN/crash-recovery fixes) because a 20.5% decode regression is not an acceptable trade.Ask
STRATA_ADAPT_OVERLAP=1 is off: not on a layer spliton a 2-stage CUDA layer split look correct to you? If the overlap is meant to be usable on a split, this may be a second bug on top of the regression.7695859(v0.1.43) and the 0.1.43.1 tag? We can run any interleaved A/B you want — we have the harness, the machine, and reproducible order-independent numbers (a full 3-arm × 2-round sweep takes ~26 minutes of exclusive GPU time).Raw data
Full JSONL (one row per request: round, arm, decode, prompt, prompt_n, completion n) available on request, as are the engine start-up logs for each arm.
@Niko1221 commented on GitHub (Oct 13, 2026):
Thank you for the careful numbers and for the offer of the harness.
To your question 1: the log line is correct, and it is not a second bug. The overlap has never run on a layer split. Its gate's first check is "not on a layer split" in v0.1.43 as well (same expression in
7695859aand in v0.1.43.1). v0.1.43 only printed the line when the variable was set, so a default 0.1.43 run on a split said nothing. I checked it on a 2-card split (2x RTX A4000): v0.1.43 with STRATA_ADAPT_OVERLAP=1 logsSTRATA_ADAPT_OVERLAP=1 is off: not on a layer split, exactly like your 0.1.43.1. So your V43 arm ran without the overlap too, and the 28% cannot come from it (it also needs adaptive swaps, and with 96 GB of VRAM your expert hit rate leaves almost nothing to swap). That is why OVL1/OVLH/OVLHW did not move anything.So the 20% is something else, and I could not reproduce it. On 2x A4000 (CUDA layer split, IQ3_XXS, default flags, 5 interleaved pairs) v0.1.43, v0.1.43.1 and v0.1.43.1 with STRATA_ADAPT_OVERLAP=1 decode within 0.6% of each other (story 72.1 / 72.2 / 71.8, code 82.6 / 82.2 / 82.7 tok/s) and prefill a 6K prompt at 1081 / 1082 / 1083 tok/s. UD-Q4_K_XL on the same split (streamed from SSD, 5 pairs) decodes equal as well. I also tried: every CPU busy (the CUDA callback thread started before host pinning on and off),
--ple-io ramwith the table locked, with and without the PLE prefetch hint. All equal. Our cards are 2x16 GB, so I cannot reproduce an all-resident 2x48 GB regime.To your question 2, there is no commit-level switch for #1996, but these three runs of the same v0.1.43.1 binary would split the suspects (one run each is enough to see 82 vs 65):
STRATA_ADAPT_CALLBACK_WARMUP=0(0.1.43.1 starts the CUDA host-callback thread before the host is pinned; your OVLHW arm set it to 1, which is already the default).--no-ple-prefetch(your config uses--ple-io ram; 0.1.43.1 added a per-row prefetch hint on the mapped table).STRATA_TEST_PAGEABLE=1(the pinned bounce slots of #1996 off).Please also send, for V43 and V431: the start-up logs (diffable),
STRATA_DECODE_TIMING=1output for one decode (the per-window verify / stage / GPU-wait split), the draft acceptance and expert hit rate per arm, and the cmake line each binary was built with (CUDA arch, ggml dir, compiler, CUDA 13.4 for both?). A different build of the two binaries would show as a difference there, and a stage time that grows on one card points at the hand-off.If one of the three toggles brings 82 tok/s back, that is the commit, and I will fix that one. Until then I would not skip 0.1.43.1 for the overlap's sake: on a layer split it changes nothing.
@ben0112 commented on GitHub (Oct 14, 2026):
Thank you — you were right on both counts, and your toggle 2 found it.
--no-ple-prefetchrestores the full speed.1. You were right about the overlap — my attribution was wrong
Accepted: the overlap never ran on a layer split in either build, so our V43 arm ran without it too, and the +28% I credited to it was wrong. I should have read the gate in v0.1.43's source instead of assuming "default on" meant "active on a split". Scratch that part of my report.
2. The two binaries were built the same way
Both
engine/strata, same machine, same toolchain — so a build difference is out:CMAKE_BUILD_TYPE/CMAKE_CUDA_ARCHITECTURESCMAKE_CUDA_COMPILER/CMAKE_CXX_COMPILER/usr/local/cuda/bin/nvcc//bin/c++cuda_13.4cuda_13.4STRATA_ENABLE_CUDA/STRATA_NATIVE_EXPERTSSTRATA_ISA_FLOOR/STRATA_PORTABLEGGML_NATIVE/GGML_CUDA/GGML_AVX2/GGML_AVX512Only
CMAKE_MAKE_PROGRAMandSTRATA_GGML_DIRdiffer, and only in their paths — the twothird_party/llama.cpptrees are byte-identical (diff -rqclean).3. Your toggle 2 is the fix:
--no-ple-prefetch, on its ownSame
ab-config.jsonfor every arm (24 args: 2×3090 layer split,--ple-io ram,--expert-cache auto,--spec 4,--kv-resident 32768,--max-context 262144); onlyexe=/xargs=/env differ. One fresh server per arm, n=4 requests (3 short chats + one 6,345-token prompt,--max-new 256, greedy).--no-ple-prefetchSTRATA_ADAPT_CALLBACK_WARMUP=0CALLBACK_WARMUP=0onlySTRATA_TEST_PAGEABLE=1STRATA_ADAPT_OVERLAP=1STRATA_ADAPT_SIGNAL=hostSo:
--no-ple-prefetchalone puts 0.1.43.1 back inside noise of 0.1.43 (−0.4%, and it is not worse on any individual request).STRATA_TEST_PAGEABLE=1does not recover it, so #1996 is not the cause.CALLBACK_WARMUP=0recovers about two-thirds of it on its own but adds nothing once the prefetch is off — i.e. the warmup is a second, smaller effect on the same host path, not the cause.4. Mechanism (your read was exactly right)
Our config is
--ple-io ram, so the PLE table ismlock'd and resident from start-up. 0.1.43.1 issues a per-rowPrefetchVirtualMemoryhint on the mapped table — sixteen rows per token, on the token path — which in this regime prefetches pages that are already locked in RAM. Pure overhead, and it shows up as a decode and prefill loss of the same order, which matches the D2/D3 rows above.It also explains why you cannot reproduce on 2×16 GB: at 96 GB of VRAM our decode expert-cache hit rate is 94.6% and the caches hold ~97.9% of the routed mass, so almost nothing is streamed and the PLE rows are the one remaining per-token host touch. On a 2×16 GB split the extra hint hides in the streaming noise.
Suggested fix: skip the per-row prefetch when the table came from
--ple-io ram(or more generally when the mapping is known locked/resident). We are happy to test a patch build.5. The data you asked for
Start-up logs: V43 and v0.1.43.1 arms are line-for-line identical except the engine path and the
--ple-io ramlock time (13.8 s vs 2.2 s on the first arm after a cold page cache) — samelayer split across 2 GPUs, samepcie_frac 0.22, sameK=24 ... caches hold 11776 of 24576 profiled pairs (~97.9% of the routed mass), sameKV streaming: 32768 of 262144 cells, same MTP draft load. Saved verbatim under/root/evidence/on the test container.Per-arm counters, same run:
Hit rates and draft acceptance are identical across arms, so this is not a cache or spec-decode difference — it is per-token host time.
STRATA_DECODE_TIMING=1output for V43 vs v0.1.43.1 is being collected now and I will paste the per-window verify/stage/GPU-wait split as soon as it is done.6. Where this leaves us
We are on this exact hardware in production. With
--no-ple-prefetchin the config, 0.1.43.1 becomes usable for us, so we can take the #2026 / #2040 / serve-side fixes after all. We are also about to test 0.1.44.1 on the same harness — I will report whether the per-row prefetch is still there and whether the new "keep every expert in RAM" rule does anything for a 2×48 GB, 176 GiB host.Thanks for pointing at the right knob instead of the one I guessed.
@ben0112 commented on GitHub (Oct 14, 2026):
One refinement after reading the code — and I think it makes the fix smaller than "special-case
--ple-io ram".On POSIX the per-row prefetch is one
madvise(MADV_WILLNEED)syscall per row, sixteen per token; on Windows the same code path is a singlePrefetchVirtualMemoryfor all sixteen. Fromsrc/kernels/ngram.cppin v0.1.44.1:and the note at line 624 confirms the intent was the Windows shape: "
PrefetchVirtualMemoryissues all sixteen in ONE call and lets them complete in parallel."The Windows call is explicitly described as "a hint that cannot change a value"; on Linux the equivalent is sixteen separate
madvisecalls per token, each takingmmap_lockon a process that is running 24 decode threads plus the CUDA callback thread. On a locked (--ple-io ram) mapping every one of those ranges is already resident, so the hint can only cost the syscall plus the lock contention — which is the shape of the loss (decode and prefill, no change in hit rates or draft acceptance).Caveat: this last paragraph is my reading of the code, not a measurement. If it is useful I can
strace -c -fone decode window on both versions and post the syscall counts, which would settle whether it is the syscall count or the prefetch itself. Happy to do that if you want the number.@ben0112 commented on GitHub (Oct 14, 2026):
Part 1 — two corrections to my own report (please read first)
1. "2× RTX 3090 48 GB" meant 48 GB in total, not 48 GB per card. The two cards are 24 GB each
(
nvidia-smi:24576 MiB×2). I wrote it the way we say it internally and it read as 96 GB. So:of the expert mass to be streamed, and the engine's own log confirms swapping is happening:
resident RAM: 45.18 GiB of experts in RAM, 15631 exchanged with the VRAM tier.hold for us, and it is the reason the OVL1/OVLH/OVLHW arms could not move anything.
thought, and I think the regime is reproducible for you.
2. "the exact binary our production runs" is wrong and I should not have written it.
The two v0.1.43 binaries are different builds of the same commit:
2b2079c1e22ec877a7087157018e95aeSame source commit
7695859, independently built 1.5 h apart. The A/B used the CT103 one.Part 2 — the three toggles: one of them is the answer
All five arms, same config, n=16 decode samples each (4 requests × 2 rounds, order reversed in
round 1),
tools/ab_engine.py,--rounds 2 --max-new 256 --long-words 6000:STRATA_ADAPT_CALLBACK_WARMUP=0--no-ple-prefetchSTRATA_TEST_PAGEABLE=1Per request, NOPF tracks V43 sample for sample:
--no-ple-prefetchrestores 100 % of the regression, on both rounds, and the long-prompt prefillcomes back slightly above V43 (1100.9 vs 1082.8).
STRATA_ADAPT_CALLBACK_WARMUP=0andSTRATA_TEST_PAGEABLE=1change nothing.Why this fits, and why your 2× A4000 could not see it
Our config is
--ple-io ram, and on this boxmemlockisunlimited, so the PLE table really islocked:
v0.1.43.1 added the per-row prefetch hint on the mapped table (you named it as suspect 2). If the
table is already resident and locked, that hint is pure overhead on our hot path. On a machine where
the table is not fully resident — smaller RAM, or no
mlock— the same hint is a win, which isexactly the direction that would hide the regression from your test bed.
This also explains why the overlap question was a red herring on both sides: on a layer split the
gate is closed in both versions, so V43 and V431 both ran without it, and the 28 % I attributed to it
in the original report was wrong.
Part 3 — what we are doing next
We are running the same A/B against v0.1.44.1 and will post that result here as well. Two
questions for you while we do:
mlocked, or is theoverhead expected? If it is expected, would you take a patch that skips the hint when
--ple-io ramsucceeded in locking the table?--ple-io mmap(nomlock) should behavelike our V431 arm; the same box with the table pinned should behave like NOPF. If you can hold the
table resident, you should be able to reproduce both sides.
Artifacts on request: start-up logs for every arm (diffable),
STRATA_DECODE_TIMING=1output for onedecode, draft acceptance and expert hit rate per arm, and the cmake line for each binary
(
CMAKE_CUDA_ARCHITECTURES=86,/usr/local/cuda/bin/nvcc, CUDA 13.4.92,/bin/c++, Release, ninja —identical for both).
Part 4 — v0.1.44.1 does not fix it either
Same box, same config, one interleaved round,
tools/ab_engine.py:v0.1.44.1 is in the same place as v0.1.43.1 (within noise of it, −19 % vs V43). The long-prompt
prefill is even lower than 0.1.43.1 in this round (520 vs 757), so 0.1.44/0.1.44.1 did not fix the
PLE-prefetch regression on a locked PLE table. The
--no-ple-prefetcharm of this same round is whatwe are waiting on to confirm the workaround still applies in 0.1.44.1; we will post it here.
Consequence for us: we stay on v0.1.43, or move to 0.1.44.1 with
--no-ple-prefetch, pending thatlast arm.
Part 5 — separate defect in
tools/ab_engine.pyitself (not about the regression)This one is worth its own issue; it is not related to the PLE work and it made our runs fail in a way
that looked like an engine bug.
Symptom. With 2+ arms and
--rounds 2, the second or later arm fails at startup:Cause. The per-arm teardown (v0.1.44.1
tools/ab_engine.py, lines ~119-125) only terminates thelauncher process:
serve/server.pystarts the engine as its child. When the launcher goes away the engine oftensurvives it, still holding both the GPU memory and ~125 GiB of host RAM. The next arm's server
then starts against a machine whose RAM and VRAM are still occupied and dies immediately — on this
48 GB box the python process is also OOM-killed (
rc=137).Minimal fix we applied locally (happy to send it as a PR if you want it):
Note it is intermittent — our first 5-arm × 2-round run on the same code completed cleanly, the
next two did not. A machine with more RAM headroom would likely never see it, which is probably why
it has gone unnoticed.
Reproduce: any A/B on a box where the engine's RSS is a large fraction of total RAM, with
--rounds 2and 2+ arms.Status note on Part 5: I applied the sweep-and-wait patch above to our local copy and the three-arm run that is going now is using it; I will confirm here whether it completed cleanly, which would be the reproducer you want.
@ben0112 commented on GitHub (Oct 14, 2026):
Final data — the workaround also fixes v0.1.44.1, and the harness patch is verified
Two follow-ups to the comment above.
1.
--no-ple-prefetchrestores v0.1.44.1 as wellSame box, same 24-arg config, one interleaved round, three arms (
tools/ab_engine.py), after the sweep patch below:--no-ple-prefetch)So on a locked (
--ple-io ram) PLE table:--no-ple-prefetchrecovers both paths fully, and in this round slightly better than v0.1.43 (prefill 1037.4 vs 1024.9).Consequence for us: we can move to v0.1.44.1 with
--no-ple-prefetchin the config, which means we get the #2026 / #2040 / serve-side fixes after all. If you would rather fix it in the engine, the one-line shape still looks like "do not issue the per-row hint when the table is locked/resident" — but the flag is enough for us in the meantime.2. The
ab_engine.pysweep patch is verifiedI applied the sweep-and-wait fix from Part 5 and re-ran the three-arm test above with it: all three arms started and completed (
ready in 211 s,253 s, …), where the same run without it died on arm 2 withRuntimeError: server exited with 1. That is the reprodu cer you asked for, and it also confirms the diagnosis: without the sweep,serve/server.py's engine child survives the launcher and holds both the VRAM and ~125 GiB of RAM.Two notes on our local patch, in case you take it upstream verbatim — both were mistakes I made first and had to fix:
"engine/strata"pattern for the sweep. The harness's own argv contains arm specs likeV43:exe=/opt/strata/engine/strata, sopkill -9 -f "engine/strata"kills the harness itself. Use"engine/strata --serve"(and"serve/server.py --engine").outin the wait loop. It is already the JSONL result handle opened earlier inmain(); assigningsubprocess.run(...).stdoutto it makes the nextout.write(...)raiseAttributeError: 'str' object has no attribute 'write', which looks like an engine failure but is not.Happy to send the whole thing as a PR if useful.
@ben0112 commented on GitHub (Oct 15, 2026):
Deployed in production — and it is faster than 0.1.43, not just equal
Following the data above we upgraded our production box (the same 2× RTX 3090, 176 GiB host, UD-Q4_K_XL, layer split,
--ple-io ram) to v0.1.44.1 with--no-ple-prefetch.--no-ple-prefetch:8080200 in 8.8 msThe cold-start comparison is like-for-like (both are the first request after a start): +18.5 %. The warm numbers are much higher, and I think the extra comes from 0.1.44's "keep every expert in RAM" rule — the hit rate moved 94.6 % → 99.2 % on this box, which the 48 GB of VRAM plus 176 GiB of host RAM can afford.
So the
--no-ple-prefetchflag is not a workaround that merely gets us back to parity: with it, 0.1.44.1 is the fastest of the three versions we have measured here. Thank you for pointing at suspect 2.Two operational notes from the upgrade, in case they are useful to anyone else:
serve/server.pymust move with the engine. Between 0.1.43 and 0.1.44.1 it grew 385,229 → 417,811 bytes, so swapping onlyengine/stratais not a valid upgrade. We installed the new version as a second tree (/opt/strata-01441) and pointed the service'sExecStartat it, leaving the old tree untouched — rollback is a one-lineExecStartchange./opt/strata/...hardcoded for the config, the engine log and the venv's python; after the upgrade it was happily sampling a frozen old log and reportingPARSE_FAIL. It now reads the tree from oneSTRATA_DIRvariable.Happy to send the
ab_engine.pysweep patch as a PR if you want it (it also needs the two notes from my last comment: do not use a bare"engine/strata"pattern, and do not reuse the nameout).@Niko1221 commented on GitHub (Oct 15, 2026):
Thanks for following this through to production, @ben0112. 0.1.44.1 with
--no-ple-prefetchon the same 2x RTX 3090 layer split is 85.8 tok/s cold against 72.4 on 0.1.43 (+18.5%), and 102-109 tok/s warm. So the decode drop is gone on your box, and I'm closing this. If it comes back on a later version, reply here with the server log and we'll reopen it.@thc1006 commented on GitHub (Oct 16, 2026):
TL;DR: on a ZFS root, the per-row
MADV_WILLNEEDhint inPleTable::gather_batchmakes ZFS read parts of the PLE table from disk on every prompt, even with--ple-io ram. On this machine (4x P100, IQ3_XXS, 0.1.44.1), each new ~16K-token prompt read 16-18 GB from disk and prefilled at 458-504 tok/s. With--no-ple-prefetch, it read 0.00 GB and prefilled at 704-709 tok/s.This is the same hint this issue found, measured on 0.1.44.1, with one more cost on ZFS: disk reads.
--no-ple-prefetchstill fixes it, so I am not asking to reopen. If you would rather track the ZFS side in a new issue, I can open one.Per new ~16K-token prompt, 0.1.44.1,
--ple-io ram, same binary:madvisecallszpl_fadvisecalls--no-ple-prefetch)How the hint reaches the disk:
gather_batchcallsmadvise(MADV_WILLNEED)once per row of a mapped table (--ple-io mmaporram). It checksg_ple_prefetchbut notimpl_->locked(ngram.cpp#L554-L577). The prompt path and the decode verify windows both make this call.vfs_fadvise(..., POSIX_FADV_WILLNEED)(mm/madvise.c#L261-L307).zpl_fadvisethen callsdmu_prefetchfor that range, even when the pages are already in the page cache (zpl_file.c#L943-L960).dmu_prefetchchecks only ZFS's own caches, so locked pages do not stop it. Each hint becomes an ARC prefetch of the 128 KiB record that holds the row. The ARC here is 8 GiB and the table is 26.8 GiB, so most of those records are read from disk again on every prompt.The call counts come from perf and ftrace on three more prompts of the same size: 16
madvisecalls per prompt token, and onezpl_fadviseand onedmu_prefetchfor each. ben0112 offered above to measure whether the cost is the syscall or the prefetch. Here, each call spent 92 µs on average insidezpl_fadvise.ben0112's report in #2571 says their model is on ZFS too. Their machine has much more RAM, so the cost there may be time in
zpl_fadvisemore than disk reads; I have not measured that. If your 2x A4000 machine does not use ZFS, that may be part of why the hint slowed their machine and not yours.A possible fix is the one ben0112 suggested above: skip the per-row hint when the table is locked. On Linux, only
hint()checksg_ple_prefetch(the other three checks are inside#if defined(_WIN32)). So for a locked table, that change should behave like--no-ple-prefetch, the "off" row above. If you post a patch, I will test it here with the same prompts.Environment and method
296b59d) and 0.1.43.1 (a0116b2), both built from source with CUDA 12.9.1 for sm_60, with the flags setup.py uses for a CUDA 12 build (Release,STRATA_EXPERIMENTAL_SM60=ON). The "on" and "off" rows above use the same 0.1.44.1 binary; only--no-ple-prefetchdiffers.zpl_fadviseas upstream 2.2.2), recordsize 128K, lz4. I setzfs_arc_maxto 8 GiB to leave RAM for the locked table and the experts. A larger ARC would change the disk numbers.--max-context 32768 --kv int8 --expert-cache auto --prefill 2048 --pool-workers 6 --batch-groups auto --vram-reserve-mib 1536 --ple-io ram --spec 4 --spec-min-p 0.5 --resident-experts --trim-stage-weights --no-kv-grow --conversation-cache-mib 8192, plus--no-ple-prefetchfor the "off" row.LimitMEMLOCK=infinity. Order of the runs: 0.1.43.1, 0.1.44.1, 0.1.44.1 with the hint on, 0.1.44.1, 0.1.43.1./sys/block/sda/sda4/stat(the pool's partition) before and after each request. ARC misses:prefetch_data_missesin/proc/spl/kstat/zfs/arcstats.perf stat -e syscalls:sys_enter_madvise -p <engine pid>, and the ftrace function profiler onvfs_fadvise,zpl_fadviseanddmu_prefetch(all CPUs; the time includes waits).dmu_prefetchthe same way. Master callsdmu_prefetch_user, the same prefetch with a cap on the bytes in flight.--ple-io mmap(where the hint is meant to help, #1984), and ben0112's machine.All numbers, and 0.1.44.1 against 0.1.43.1
Untraced prompts, one at a time (prefill rate as the engine reports it; disk = the pool's partition; misses = ARC prefetch misses):
Misses x 128 KiB match the disk reads (125,028 x 131,072 B = 16.39 GB).
Traced prompts (three other slices; perf counts the engine's system calls, ftrace counts on all CPUs, so the few
zpl_fadvisecalls in the "off" row need not be the engine's):madvise(engine)vfs_fadvisezpl_fadvisedmu_prefetchzpl_fadviseWith the hint on, the time inside
zpl_fadviseis about 24 s per prompt and TTFT is 9-12 s longer. The gather runs beside the GPU work, so only part of that time adds to TTFT.The engine's own
file tier I/O this request: the OS read ...line showed 0.59-1.05 GB per prompt with the hint on, against 16-18 GB read from the disk. Most of the reads are ZFS's asynchronous prefetch, which/proc/self/iodoes not charge to the engine (an earlier probe here put them on ZFS'sz_rd_intthreads). So that line does not show the size of the problem.0.1.43.1 shows the same. Earlier the same day, with the same three prompts but an earlier config (12,24,36 split,
--batch-groups 4, no conversation cache) and the whole-disk counter: 407-440 tok/s and 15.5-17.8 GB read per prompt with the hint, 670-682 tok/s and 0.00-0.04 GB without it.Short prompts (
tools/serve_load.py, 512 tokens out, total tok/s for 1 / 2 / 4 clients): hint on 32.9 / 59.4 / 100.5; off 35.6 / 60.3 / 100.2 and 33.9 / 60.4 / 100.6 (two fresh starts). There is only one run with the hint on, and the two "off" starts differ by 1.7 tok/s, so I would not read a decode difference into this.0.1.44.1 against 0.1.43.1, both with
--no-ple-prefetch, two fresh starts each (run order 0.1.43.1, 0.1.44.1, 0.1.44.1, 0.1.43.1; the hint-on run sat between the two 0.1.44.1 runs):Within about 1% everywhere except one-client short prompts, where two starts of the same version already differ by up to 1.7 tok/s. 0.1.44.1 is ahead in both pairs on the ~4.4K prompt (0.6-1.4%), and by less on the ~32K prompt and the four-prompt burst.
Server log lines (0.1.44.1, excerpt)
@ben0112 commented on GitHub (Oct 17, 2026):
I believe it's a ZFS arc issue competing for disk I/O and memory bandwidth.
秀吉 @.***>于2026年10月16日 周五21:43写道: