mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #1964] V0.1.43 Decode performance degradation on 4070ti + 14700 + 64 RAM, Linux IQ3_XXS #783
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#783
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 @Hotcooler on GitHub (Oct 11, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/1964
Something changed in 43 that made decode on this setup to be about a third of what it was in 0.1.42.
Bench.sh output for v42:
v43:
"agent re-read tokens/session" jumps out. Though the range seems to be about the same.
Startup Json same for both:
Startup sh also the same for both:
Startup logs attached:
v43.log
v42.log
Suspected VRAM overflow with new changed, did not pan out, changing --vram-reserve-mib to 1000 did not produce better speeds.
@Hotcooler commented on GitHub (Oct 11, 2026):
It's STRATA_ADAPT_OVERLAP, with STRATA_ADAPT_OVERLAP=0 decode performance is restored.
v43 bench with STRATA_ADAPT_OVERLAP=0:
@nghia1930mmm-cmd commented on GitHub (Oct 11, 2026):
Sonca1999
@TheHubUser4860938 commented on GitHub (Oct 11, 2026):
Confirming the same regression on different hardware, and the same fix:
STRATA_ADAPT_OVERLAP=0.Machine: RTX 4090 24 GB, AMD Ryzen 7 9800X3D (8c/16t, 96 MiB L3), 62 GB RAM, Linux, engine 0.1.43 (CUDA 12, sm_89, locally compiled — source hash verified), model Qwen3.8-Flash-Next IQ3_S + SC117 + Q8 PLE,
--max-context 524288 --rope-scaling yarn --rope-scale 2 --kv k8v4 --pcie-frac 0.35 --adapt-every 1 --adapt-swaps 80 --adapt-decay 0.97 --spec 4 --mtp.Measured today, same day, same box, both on 0.1.43:
STRATA_ADAPT_OVERLAP=0Ruled out on the slow boot before finding it: expert-cache hit rate unchanged (82–84% both boots), PLE probe fine and direct (250k rows/s), no swap/major faults (engine VmSwap 0), GPU 3030 MHz with no throttle flags at 38 °C — but power draw only ~150 W at "100% util", which fits the per-layer copy stalls serializing the window. The boot banner was otherwise identical between 0.1.42 and 0.1.43 (same slots ±113, same draft layer, same features), so nothing else moved.
Worth noting for the gate discussion: this is an X3D part, so the host-side expert paths are about as fast as AM5 gets (96 MiB L3, and the
--prefill autoCPU share measured 2.3-3.4k tok/s on prompt reads) — the stall is in the copy/verify overlap itself, not in the CPU being slow to compute. The published win is A4000/P100 on PCIe 3.0 at 12–16 GB; a 4090 with a 47 GB arena in 62 GB RAM is the opposite regime, like your RTX 5070-Windows arm where it was turned off for losing 2.6%. Suggestion: whatever gate decides the Windows opt-out may deserve a measured probe on Linux too (like the PLE direct/mmap probe or the measured PCIe share), rather than a flat default on.Not tested here: answers (we trust the same-tokens claim, our identity check runs separately) and the
--prefill auto:32768/--kv-residentcombination from @Hotcooler's config — ours is plainauto. Both our boots useSTRATA_ADAPT_OVERLAP=0via the config"env"block from the next start onward.@oal commented on GitHub (Oct 11, 2026):
My issue #1975 might be the same issue. Feel free to close my issue.
@oal commented on GitHub (Oct 11, 2026):
I had GPT 6.1 Sol look into it. PR here: https://github.com/Niko1221/Strata/pull/1983 Could you see if this helps for you too?
@DamonFangCN commented on GitHub (Oct 12, 2026):
Confirming this regression and workaround on another Linux RTX 4090 system, with three alternating fresh-engine pairs on the same v0.1.43 binary. Related: #2010.
Environment / fixed settings
7.0.0-38-generic, NVIDIA driver595.91.07; local build using existing CUDA 13.4.1, sm89.7695859aa13afb248bdb4d36f9b2e95707db079d, no source patches.STRATA_ADAPT_OVERLAPunset (official Linux default, startup banner confirmed active) versusSTRATA_ADAPT_OVERLAP=0(verified in the actual native process environment).Protocol
A B A B A B, loading a fresh engine for every leg. All six engines used the same configuration, request order, temperature0, seed1234 and reasoning_effort=none. Other model requests could not reach the local test instance; no concurrent inference. No power/frequency/BIOS changes during the test.
Per leg: Chinese quicksort tutorial (512-token generation cap) three times, Python merge_sorted_lists function three times (256-token cap, actually110 tokens), one small JSON check, then the same cold32K/64K repository-excerpt marker fixtures with256 generated tokens each. Actual long input counts32508/65277, cached_tokens=0 in both arms. Short prompts reuse35/36 tokens on repeats2/3 equally. The expert cache was6710 slots /13043MiB in all six engines.
Decode results (tok/s)
Short rows: median of three requests inside each leg, then median of three legs. Long rows: one256-token generation per leg, median of three legs.
Per-pair values:
Prefill / cache / MTP / GPU observations
Workaround and scope
Adding only
"env": {"STRATA_ADAPT_OVERLAP": "0"}to the existing startup JSON restores most of our historical Decode performance, keeping350W, TAIL_SKIP7,192K and calibration unchanged. We are retaining v0.1.43 rather than rolling back.Historical v0.1.42 results were general156.9, code192.4,32K127.4,64K132.4 tok/s. Those had a different warm-up order and dynamic cache/output history, so they are context only, not a matched version A/B or proof that every remaining gap is caused by the release. The strong result here is the same-binary overlap switch A/B.
Example exact short prompts used:
All54 per-request raw measurements (CSV; no credentials or private paths)
@Niko1221 commented on GitHub (Oct 12, 2026):
Thank you both for the careful reports (Hotcooler, TheHubUser4860938), and for ruling out the cache hit rate, swap and clocks before narrowing it down to the overlap; that saved a lot of time. And thanks to oal for the root cause.
What happens: the decoding thread pins itself to one CPU. The CUDA driver starts its host-callback thread lazily, at the first cudaLaunchHostFunc, and that thread inherits the one-CPU mask. The adaptive overlap submits one callback per layer, so every layer's callback ran on the same CPU as the host's spin-wait: about 1000 us per callback instead of 4 us. We reproduced it on a 3060 box (0.1.43: 36 tok/s with the overlap on, 56 with STRATA_ADAPT_OVERLAP=0) and with a standalone test on a second box.
The fix is in 0.1.43.1 (out now) and has two parts, both exact (same swaps, same residency, same answers): the callback thread is now started before the host is pinned, and the overlap no longer uses a host function at all for the per-layer signal (it ends each layer's copies with a tiny stream-ordered copy into pinned memory). On the 3060 box: 36.5 -> 56.5 tok/s, 5/5 pairs, equal to overlap off; on a P100 the overlap stays a gain (+6% against off).
STRATA_ADAPT_OVERLAP=0 was the workaround; it is no longer needed, since 0.1.43.1 also makes the overlap opt-in. If you can, please try 0.1.43.1 and tell us the numbers with and without STRATA_ADAPT_OVERLAP=0 on your machines.
One more change in 0.1.43.1: after more reports (#2010) the overlap is opt-in again on every machine (
STRATA_ADAPT_OVERLAP=1turns it on, PR #2011). With the fix above, turning it on is safe on desktops again; please measure it on yours.@TheHubUser4860938 commented on GitHub (Oct 12, 2026):
Confirming 0.1.43.1 on the 4090 + 9800X3D box from my 0.1.43 report above — with the fix, the overlap is now a net gain here, not a stall.
Machine: RTX 4090 24 GB (driver 615.78.08), Ryzen 7 9800X3D (8c/16t), 62.4 GiB RAM, Linux (kernel 7.2.9), local build of v0.1.43.1 (tag commit
a0116b27, engine reports 0.1.43.1 in/metrics). Model Qwen3.8-Flash-Next GSQ-RCO IQ3_S + PLE,--max-context 393216 --rope-scaling yarn --rope-scale 1.5 --kv k8v4 --pcie-frac 0.35 --spec 4 --mtp --spec-min-p 0.70 --adapt-every 1 --adapt-swaps 80 --adapt-decay 0.97; expert cache 5043 slots / 9823 MiB, 47.0 GiB arena, 7 pool workers.Protocol: two layers, same binary, one variable. (1)
tools/strata_bench.py --longfull suite (chat ×9, fresh 4K/16K/32K prompts, 3 agent sessions, plus my own 512-token general / 256-token code / cold 32K-64K-128K + 256-token decode probes) on one boot per arm. (2) A six-engine alternating series in the style of @DamonFangCN: six fresh engines, strictly alternating=0/=1boots (A1 B1 A2 B2 A3 B3), each leg running the 512-token general prompt ×3 and the code prompt ×3 plus one cold 32K and one cold 64K generation. Temperature 0, reasoning off, unique tag per request, engine's owntimings, nothing else running during a measurement. Every arm verified in the actual engine process environment (/proc/<pid>/environ); the=1boots show the banneradaptive overlap signal: stream-ordered copies.Alternating legs (decode tok/s, medians):
=1is faster in 3/3 pairs on both short-prompt long-generation probes (general +8–22%, code +2–11%), and 10 of 12 rows overall. The two exceptions are pair 2's cold rows, which are single generations per leg — the cold 32K/64K rows are the noisiest in the set (90–130-token generations, acceptance swings); the full-suite pair tells the same story there with n=3: cold 32K 117.2 → 128.4 (+9.6%), 64K 124.8 → 131.8 (+5.6%), 128K 119.1 → 128.0 (+7.5%).Full suite (one boot per arm): chat decode 106.8 (94.1–127.3) → 124.3 (111.9–143.9), +16.4%; agent decode 131.0 → 141.0, +7.6%; agent turn TTFT 1.80 → 1.80 s. Prefill unchanged within noise (4K 2151 → 2222, 16K 4140 → 4143, 32K 4225 → 4183 tok/s), so the change is decode-only, as expected. MTP acceptance essentially equal (chat/general 83.5 → 82.4%, code 98.8 → 98.8%), so the gain is not an acceptance artifact. Agent cache hit 68.78 → 68.81%.
Caveats: leg A1's boot had light background work (my own tooling) and agreed with the clean A2 boot within 5% on every row, so I kept it as a pair member; the alternating order was A-B starting from a
=1boot that was already up. I trust the same-swaps/same-answers claim — my identity check runs separately.Bottom line: the 0.1.43 collapse (25 vs 110 tok/s on this box) is fixed — with 0.1.43.1,
STRATA_ADAPT_OVERLAP=1now beats=0here: 3/3 pairs on the short-prompt probes, +16% chat decode, +7–11% on cold long-context decode. I'm switching my config from=0to=1.@Hotcooler commented on GitHub (Oct 13, 2026):
Also confirming STRATA_ADAPT_OVERLAP=1 is now a net gain of about ~7-10% on chat decode, and 2-8% on agent decode. Confirmed gain on 3 runs each.
Example of one of the runs:
STRATA_ADAPT_OVERLAP=0
STRATA_ADAPT_OVERLAP=1