mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #3659] [Engine] nv_defaults for sm_89 (Ada): the sm_86 switch set pays on an RTX 4000 SFF Ada 20 GB - scope agreement before a default change #1511
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#1511
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 @ctr-137 on GitHub (Oct 21, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/3659
Problem
src/core/nv_defaults.cppgives its bitwise decode switch set to sm_86 and sm_60 cards only. An sm_89 (Ada) card gets the empty table — the code path atmj == 8 && mn == 6simply does not match it. On our RTX 4000 SFF Ada 20 GB (70 W cap, Hetzner host, i5-13500) we measured that the full sm_86 set as a whole pays on sm_89, and we would like maintainer agreement to add an sm_89 branch before opening the PR (CONTRIBUTING: a change to a default is agreed in an issue first).Measured (same hardware and workload, every changed setting named)
Five
strata bench runstandard-v1 draft.1 runs on one machine on 2026-10-21, fresh engine per run, same build (0.1.46.2), same serving flags (--spec 4 --spec-min-p 0.5 --mtp --max-context 262144 --kv int8 --kv-resident 32768 --expert-cache auto --prefill auto --vision cpu --pool-workers 9), model Qwen3.8-Flash-Next GSQ-RCO IQ3_XXS:nv_defaults.cppwith an addedmj == 8 && mn == 9branch; nothing exported): 66.33 / 60.81 / 55.46 — the gain reproduces, so the default path works, not just the environment trickcomplete, 12/12 sanity each; prompt rates unchangedRaw runs: the folders
bench/results/2026-10-21-standard-rtx-4000-sff-ada-generation-*proposed in the benchmark report PR (linked below when opened).Proposed behavior
sm_89branch innv_default_envcarrying the nine sm_86 switches unchanged, withSTRATA_SM89_PERF=0as its off switch (mirroring the sm_86/sm_60 gates; a switch the user set is kept as before).nv_defaults.cppcheckscc_major_of(major) == 8); with an sm_89 table it would misname the architecture and name the wrong gate. The change also makes the line print the table it actually applied.docs/DETAILS.mdandinclude/strata/core/nv_defaults.hppupdated with the sm_89 row and these numbers.ctr-137/Strataengine-nv-defaults-sm89, two commits: code + docs) — the PR follows on your go.Tradeoffs, honestly
Related: the benchmark report (same hardware, five protocol runs) and #3453 / #3452 (an RTX 4070's IL tables and benchmark, a second sm_89 data point from a different contributor).
@fioruccione commented on GitHub (Oct 28, 2026):
Another Ada data point for this, and a different shape: two cards on a layer split instead of one.
2x RTX 4060 Ti 16 GB (sm_89, PCIe 4.0 x8),
--layer-split auto(K=23), Threadripper PRO 3975WX, 128 GB DDR4-2667, Linux. Stratav0.2.7.1(46c152a1) built here, CUDA 12.6. Qwen3.8-Flash-Next UD-IQ4_XS, MTP--spec 4,STRATA_PROMPT_ATTN_IMMA=1andSTRATA_HC_UPMIX=1in both arms. It's my work machine: an office assistant that reads long documents, and Codex.I set the same nine switches as #4290 through the config's
envsection. Nothing else changed. Order B E F F E B (F was a VRAM test for #3976, left out here), a fresh server for every start, 2 rounds per start plus one at T=0.7.For context, on this machine 0.2.7.1 without the switches is level with 0.1.45. I don't see the drop from #4410 here.
Passed: 6 starts, 0 failed requests. The only error-like line in the engine log is the mlock note below.
Not run:
strata bench run, KL or the quality suite, and a patchednv_defaults.cppbranch. I only tried the environment variables.Limits: one machine, two rounds per start. At T=0 the answer text changes even between two starts of the same config, so I can't say anything about exactness from the answers.
I've moved my production to 0.2.7.1 with these nine on.
Side note: 0.2.7.1 prints
PLE table mlock failed (Cannot allocate memory; raise ulimit -l)here. 0.1.45 didn't.I did this with an AI coding assistant: it wrote the scripts and helped me read the engine code. I ran everything on my machine and checked the numbers.
@ctr-137 commented on GitHub (Oct 29, 2026):
Thanks for the extra data point - this is a useful second Ada shape (2-card layer split on RTX 4060 Ti 16 GB) and it lines up with your earlier single-card result.
I will fold both of your runs into the scope comparison. So far they both show the nine switches paying on sm_89, but I still want to see whether the same benefit holds on other Ada cards and power/thermal limits before proposing a default change - one machine class doing well is necessary, not sufficient.
Side note on the PLE table mlock failed (Cannot allocate memory; raise ulimit -l) message: that looks like a per-process locked-memory limit rather than an engine regression; worth comparing ulimit -l between the two versions if you have not already.
Thanks again for measuring and sharing the methodology; that makes the comparison credible.
@fioruccione commented on GitHub (Oct 29, 2026):
Thanks. One correction so the comparison stays clean: I haven't posted a single-card run. The single-card Ada result in this issue is yours (RTX 4000 SFF Ada); mine is only the 2-card layer split above.
mlock: you're right, it's the locked-memory limit, not an engine regression. Both versions have the same mlock code. What changed is the PLE residency policy: on this machine 0.1.45 read the PLE table directly from the file (
PLE direct read probe ... (fine)in all 39 starts), while 0.2.7.1 chooses--ple-io ram("the table is 26.8 GiB, the expert arena still to fill 55.4 GiB and 108.8 GiB of RAM is available") and then tries to lock it.RLIMIT_MEMLOCKof the engine process here is 16,860,569,600 bytes (15.7 GiB), smaller than the 26.8 GiB table, so the lock fails and the table stays in RAM unlocked.STRATA_PLE_AUTO_RAM=0or--ple-io directgive the old behaviour. I haven't changed the limit and haven't measured any speed effect of it.Power and thermals, from the same B/E runs (nvidia-smi samples taken during decode, about 240 per start and card):
Two values per cell are the two starts of each arm. Power goes up by about 1-2 W a card, the clocks don't move and the temperatures are the same. Both cards stay at roughly 43-55% of their 165 W limit, so this machine is neither power- nor thermal-limited and says nothing about a power-limited Ada card.
Stability: since the switch on 28/10 the production server has served more than 300 real requests with the nine on (office assistant, Codex and a CAD agent). The engine log shows no errors apart from the mlock note and the low-VRAM warning on CUDA1 that I described in #3976.
strata bench runon the same config passed 12 of 12 sanity checks (#4595).If they help, I can add two things that aren't measured yet:
tools/dgx_quality24.py, 24 greedy prompts, gate flags), with and without the nine, to see whether they are still bit-exact on Ada;I did this with an AI coding assistant: it read the engine code and logs and drafted this text. I checked the numbers.
@ctr-137 commented on GitHub (Oct 29, 2026):
Thanks for the correction and the added numbers - the comparison is clearer for it.
I'll adjust my notes on the single-card result: the sm_89 data point I posted is only the RTX 4000 SFF Ada, and yours is the two-card layer split.
The mlock explanation matches what you found:
RLIMIT_MEMLOCKbeing 15.7 GiB against a 26.8 GiB PLE table is the whole cause, and--ple-io directrestoring the old path is consistent with it. I'll mentionSTRATA_PLE_AUTO_RAM=0as the documentation note rather than implying an engine regression.The power/thermals data is useful: on this kind of non-limited card the nine switches cost about 1-2 W per card, no clock or temperature change, so the regression on a power-limited card (if any) still needs the 100 W cap measurement. On stability, the production data point is strong enough for me to keep the scope at "env opt-in first; defaults only after a power-limited or thermally constrained case is checked".
I'd very much appreciate both of the extra runs you offered:
dgx_quality24.py, 24 greedy prompts, with and without the nine), for exactness.I'll fold those results into #3659 as they come in before proposing anything as a default. Thanks for the careful methodology.
@fioruccione commented on GitHub (Oct 29, 2026):
Both runs, same machine and build as before: 2x RTX 4060 Ti 16 GB (sm_89),
--layer-split auto(K=23 in every start), v0.2.7.1 (46c152a1), CUDA 12.6, UD-IQ4_XS, MTP--spec 4,STRATA_PROMPT_ATTN_IMMA=1andSTRATA_HC_UPMIX=1in both arms. B = without the nine, E = with the nine; nothing else differs between the two configs. A fresh server for every start.1. Identity gate, at the normal 165 W limit.
tools/dgx_quality24.py(24 greedy prompts, 96 tokens each), unchanged, driven by a small wrapper that runs four starts in the order B E B E. The only thing the wrapper adds is theAuthorizationheader: the tool doesn't send one, and with anapi_keyin the config the server refuses its requests.rm -rf /, positional encodings, process power, ISO-8601 regex, 0.1+0.2).ConclusionvsFinal Conclusion), through the middle (acquired indefinitelyvsheld indefinitely), to 96% into the answer (the regex). Both versions read as correct answers. That looks like small numeric differences flipping a token at some point, not a fault, but I haven't checked which of the nine does it. Running them one at a time would answer that.2. B/E with both cards capped at 100 W (
nvidia-smi -pl 100, the lowest limit they accept). Order B E E B, same requests as my run above.Summary: on sm_89 the nine still pay at 100 W (+4.7 to +6.9% at T=0, against +7.8 to +12.2% at 165 W), but they change the greedy output on 11 of 24 prompts. If the bar for a default is exactness, they don't pass as a set here. If equivalent quality is enough, KL or the quality suite would be the next step, and I haven't run them.
I did this with an AI coding assistant: it wrote the wrapper and the scripts and drafted this text. I ran everything on my machine and checked the numbers.
@fioruccione commented on GitHub (Oct 30, 2026):
Hi @ctr-137,
While running the tests you asked for, I also wanted to measure how much the CPU contributes to Strata's performance.
I ran another experiment on my P620, changing only the CPU pool workers from 30 to 15 and 8.
As I expected, the difference is significant: coding decode dropped from 81.6 to 64.1 tok/s, while prefill remained practically unchanged.
I've shared the full results in #4610.
This is exactly the point I've been trying to make: Strata's performance isn't just about the GPUs. The CPU, system RAM bandwidth, PCIe links, NUMA topology and how the engine distributes the workload all play their part.
I suspect system RAM bandwidth is another important factor, especially when the CPU handles experts that aren't resident in VRAM.
If you're interested, I could test this directly by lowering the DDR4 frequency in the BIOS and repeating the same benchmarks. That would help us understand how much of the CPU-side performance depends on memory bandwidth rather than just processing power.
My goal is to understand how the entire hardware platform contributes to Strata's performance, not simply compare GPUs or token/s numbers. This could also help us make better hardware upgrade decisions.
I'm really enjoying these experiments and exchanging results with you. 😄
Thanks again!
@fioruccione commented on GitHub (Nov 4, 2026):
@ctr-137 I offered you the RAM bandwidth run here and then only posted it in #4610, so closing the loop. I did not lower the DDR4 in the BIOS in the end: a small memcpy program on the other cores took about 75 of the ~115 GB/s while the pool ran on its own cores. That is contention for the memory controllers, not slower RAM, so only an approximation. Decode moved −2 to −8%, prefill −2%, the hit rate not at all. On this box, with the experts RAM-resident on two cards, the CPU's cores matter a lot more than its memory bandwidth. The full table, with the 100 W cap and the VRAM overclock next to it: https://github.com/Niko1221/Strata/issues/4610#issuecomment-6522206154
Since then I also ran one card against two and the IQ3_S quant (https://github.com/Niko1221/Strata/issues/4610#issuecomment-6642881834), plus a correction where my reading of the CPU kernels went too far (https://github.com/Niko1221/Strata/issues/4610#issuecomment-6643267746). Nothing in them changes what I posted here on the nine.