mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #4474] [Engine] v0.2.7.1 / engine 0.1.53: Excessive memory usage causes VRAM exhaustion and frequent request overflows #1999
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#1999
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 @janelu9 on GitHub (Oct 28, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/4474
v0.2.7.1 / engine 0.1.53: memory use has grown a lot — VRAM runs dry (0 MiB free) and requests constantly overflow
Summary
After upgrading to Control v0.2.7.1 with the local engine 0.1.53, the engine no longer fits in a 16 GB RTX 5080 the way the previous version did. The startup expert-cache auto-sizing overshoots the
--vram-reserve-mibbudget, and during serving the card is regularly found to have 0–264 MiB free at the start of a request, which triggers your own #2065 paging path (decode drops, windows stall). Host-side, the PLE tablemlocknow fails on every start.Environment
v0.2.7.1, commit46c152a,PRODUCT_VERSION = "0.2.7")BUILD.json: version0.1.53, archs[120], src7a4844f3e4e4f80a)--max-context 262144 --kv int8 --spec 4 --mtp rt --vision --vram-reserve-mib 700 --expert-cache auto --pool-workers 10 --control-vector-scaled …What I observe
Startup sizing overshoots the reserve, then thrashes. In one process the same sizing pass logs both lines, in this order:
i.e. it grows from 2712 to 3514 slots, well past the 700 MiB reserve. On the next start it instead has to undo it:
Across consecutive restarts with identical args, "VRAM free with everything loaded" swings between 101 MiB and 1144 MiB (101 / 1082 / 331 / 1144 …) — the sizing is not reproducible run to run, and at 101 MiB the engine itself warns
LOW: requests may stall.During serving the card is constantly full. 44 occurrences in one log file:
Values go as low as 0 MiB even though the config asks for
--vram-reserve-mib 700. Following the engine's own advice and raising the reserve just shrinks the expert cache and the card still ends up dry a few windows later.Host-side mlock now fails on every start:
(Host RAM is not the bottleneck — the memory guard reports 89+ GiB available — it looks like the locked-memory limit vs. the PLE table size.)
Once the engine died before the launcher marked it ready:
RuntimeError: the engine exited before it was ready.Expected vs actual
--vram-reserve-mib 700and--expert-cache auto, the total footprint (weights + KV int8 + MTP draft 950 MiB + expert cache) should respect the reserve, size deterministically, and leave requests above the 512 MiB paging floor.Questions
autoignore--vram-reserve-mibduring expansion?ulimit -lbump the intended fix for the PLEmlockfailure now, or should the engine fall back more gracefully?Happy to provide the full
strata-iq3_s.log(≈30k lines) or rerun with any flags you'd like.@github-actions[bot] commented on GitHub (Oct 28, 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
@Sorohna commented on GitHub (Oct 28, 2026):
strata-coder-iq1_m_022.log
strata-coder-iq1_m_026.log
strata-coder-iq1_m_027.log
strata-coder-iq1_m_0144.log
'afternoon .. same issue this morning while testing 0.2.7
CPU: i9-9900X / 128GB RAM
GPU: RTX 4090 24 GB VRAM
Engine: 0.1.52 / Strata 0.2.7
Model: Qwen3.8-Flash-Next Coder IQ1_M
--expert-cache auto
--vram-reserve-mib 1024
--max-context 524288
--kv int8
--kv-resident 32768
Auto sizing: 6254 slots
Actual cache: 8146 slots
Expert cache: 15.51 GiB
Final free VRAM: 760 MiB
The engine has crashed, and takes long to automatically recover (~15min) (( Free memory: 0 / SWAP: 8GB Full ))
Immediately beforehand, Strata was processing prompts around 187K tokens and was still generating responses.
Note1: I have set STRATA_DEFAULTS=026 because 0.2.7 performance are really ugly compared to previous releases at least until 0.2.2/0.1.47
Note2: I was trying --vram-reserve-mib 1024 to try to solve numerous warnings in engine logs :
WARNING: only 434 MiB of VRAM free at the start of this request
(below 512 MiB)
Note2b: Observed since 0ct 13th / Strata 0.1.44
Regards
@github-actions[bot] commented on GitHub (Oct 29, 2026):
Thanks, this follows the format now.
@Niko1221 commented on GitHub (Oct 29, 2026):
The jump from 2712 to 3514 slots is the same bytes (the auto count is in slots of the largest expert; the second pass packs the real, smaller blobs), and
PLE table mlock failedis the fallback working.What we reproduced (Linux, RTX A4000, 256K,
--vram-reserve-mib 700): the card ends 241 MiB under the reserve, because about 245 MiB (cuBLAS handles, prompt-path and verifier modules) are allocated after the cache and priced by nothing. Fixed on our side; the fix ships in the next update (0.2.8). The automatic cache now leaves the reserve plus 256 MiB: 715 MiB free instead of 459, about 100 fewer slots, decode 62.55 against 63.15 tok/s.Not reproduced: your swing of 101 to 1144 MiB between restarts. Please send the
strata trace:lines (STRATA_TRACE=1) from two starts with different free figures.@janelu9 commented on GitHub (Oct 29, 2026):
Reproduced the swing on 0.1.53 with
STRATA_TRACE=1: two back-to-back starts, same binary and args, final free 858 MiB vs 0 MiB (20:37 and 20:45 local, WSL2 + RTX 5080, same args as above).So the different free figures are not the VRAM presented at process start (identical in both runs) — the swing is amplified inside the startup path itself: the native-head phase leaves different amounts resident at the marks, the expert cache then sizes from that, and the prompt-path/cuBLAS allocations move in opposite directions (net free vs net allocate) — consistent with those allocations sizing themselves against whatever free they find at their moment, feeding back against the cache. The verifier step's 296 MiB was identical in both runs, matching the ~245 you priced in the 0.2.8 fix.
Happy to rerun on the 0.2.8 build when it ships. One follow-up question while you're in there: does the native-head transient also get marked (or avoided) by the fix, or only the prompt-path/verifier cost? That transient is where the run-to-run difference first appears.
@Niko1221 commented on GitHub (Oct 29, 2026):
Fixed in 0.2.8: the automatic cache now leaves the reserve plus 256 MiB, because about 245 MiB is allocated after the cache and nothing counted it. On the A4000 at 256K that is 715 MiB free instead of 459, about 100 fewer slots, and decode at 62.55 against 63.15 tok/s. Run
strata update. Closing. We could not reproduce the 101 to 1144 MiB swing you saw, so reopen with logs if it comes back.