mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #4781] [Engine] 0.1.54 prompt rate drop on a 20 GB Ada card: the auto expert cache is too small, --vram-reserve-mib 1536 restores it (A/B) #2195
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#2195
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 @pietroMastro92 on GitHub (Oct 31, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/4781
The 0.1.54 prompt-rate drop on a 20 GB card is the expert-cache sizing, and
--vram-reserve-mib 1536brings it backContext: #4281 was closed with "post the numbers again when they change". They changed, and this one has a cause
and a fix rather than just numbers, so it goes in its own issue.
Symptom. On this RTX 4000 Ada 20 GB (Windows 11, 255 GiB RAM, Qwen3.8-Flash-Next IQ3_S, context 393216):
0.1.52 read a 20K prompt at ~1,600 tok/s, 0.1.54 at ~1,430 measured the same day, with the 3,8K prompt and the
decode unchanged. I first blamed the attention-batch commit; that was wrong.
A/B, alternating engine loads, 4 fresh nonced prompts per point (the "warm" column is the median of the last
two, the first one pays the cold read):
--vram-reserve-mib 1536--vram-reserve-mib 2048What it looks like is happening. With no reserve, 0.1.54 leaves 5.414 MiB of VRAM free at load
(
vram_free_mibin/metrics) and sizes the cache to 3.429 MiB. Giving it an explicit 1536 MiB reserve makes itkeep more, not less, cache (4.112 MiB, 1.742 -> 2.090 slots) and the prompt rate returns to 0.1.52's level and
stops oscillating. 2048 goes the other way (2.577 MiB, 1.250 tok/s). So somewhere in the auto sizing there is a
threshold this card falls just under, and it is worth a look: 0.1.52 sat at 3.571 and was fine, 0.1.54 at 3.429
is not, and 4.112 is fine again.
Two things that are not the cause (so nobody chases them):
STRATA_PROMPT_ATTN_OLD=1: 905 tok/s at 20K, -36%. The old attention is worse, so it is not a regression inthe new one.
--vram-elastic: 1.109 tok/s with the same oscillation, no help.sampled with
\GPU Adapter Memory(*)\Shared Usageevery 250 ms during a 16,2K prompt on 0.1.54, it is flat(68.066 -> 68.067 MB, dedicated 14.970 -> 14.975), so on this box nothing spills into shared memory while a
prompt is read.
What I would ask. Is the auto cache sizing in 0.1.54 leaving headroom it does not need on a 20 GB card? If
that is a deliberate change, a note in the release would help; if not, this card class (20 GB, ~7% of the experts
resident) is a good test case because the cliff is between 3,4 and 4,1 GiB of cache.
Everything was measured on v0.2.8 with engine 0.1.54, fresh prompts with a nonce, the rate read from the engine's
own
prompt N tokens = ... read in Z msline, decode unchanged at 47-50 tok/s throughout.@github-actions[bot] commented on GitHub (Oct 31, 2026):
Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing:
Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment
/reopen.Details: CONTRIBUTING.md
@github-actions[bot] commented on GitHub (Oct 31, 2026):
Thanks, this follows the format now.
@Niko1221 commented on GitHub (Oct 31, 2026):
Thank you for the A/B and for ruling out the other causes. 0.2.8 keeps an extra 256 MiB free after the expert cache (it fixes cards ending under the free-memory line the engine warns about), which is about the cache difference you saw. We could not reproduce the drop, because we have no 20 GB card, and we cannot yet explain why
--vram-reserve-mib 1536gives a larger cache than the automatic choice. Could you post the engine start log for the automatic run and for the 1536 run? The lines we need are "expert cache auto: ...", any "only N MiB free once the slots are written", "prompt path borrows N cache slots" and "prompt chunk auto". Until we have looked at it,--vram-reserve-mib 1536works on your card.@pietroMastro92 commented on GitHub (Oct 31, 2026):
Thanks for getting back to me, and for the 0.2.8 note about the extra 256 MiB. Here are the start logs you asked for, both on 0.2.9 with engine 0.1.55, same machine (RTX 4000 Ada 20 GB, Windows 11, Qwen3.8 IQ3_S, 393216 ctx), one variable changed (the reserve), engine restarted between the two runs, nothing else running.
The automatic run (no
--vram-reserve-mib)Final:
expert_cache_mib 3429,vram_free_mib 5414.The
--vram-reserve-mib 1536runFinal:
expert_cache_mib 4112,vram_free_mib 0.What the two logs say, in case it helps
prompt chunk autochanges with it: 5120 -> 6912 tokens, and the borrow goes 1522 -> 1865 slots. Since the chunk and the borrow scale together, the cache's own numbers look like a consequence of the chunk the prompt path decided on, not the other way round.vram_free_mib 0(my card is then full, which is why I keep 1536 and not 2048: at 2048 the cache comes out at 2577 and the 20K prompt rate drops back). The warning "add --vram-reserve-mib 2048" wants to reserve more, but on this card it produces a smaller usable cache and 0 free either way.So on my card the sequence seems to be: explicit reserve -> smaller initial cache -> fewer shrink rounds -> bigger prompt chunk -> bigger borrow -> bigger final cache. If that is the intended interaction, a sentence in the docs would help; if it is not, the auto path shrinking four times where the explicit one shrinks twice is the thing to look at.
Prompt rate on the same prompts (fresh nonced prompts, 4 each, median of the last 2, read from the engine's own line): 20K 1139 auto against 1588 with 1536; 3.8K 1250 against 1262. Decode unchanged at 47-50 tok/s.