mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #560] AMD/Linux desktop: default VRAM reserve (700 MiB) lets the driver evict ~24 GB to RAM, OOM kills kwin; --vram-reserve-mib 3072 fixes it #265
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#265
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 @icodebot on GitHub (Oct 2, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/560
Summary
On an AMD card under a Linux desktop (KDE Plasma 6, Wayland), the default
--vram-reserve-mib(700 MiB) left only 624 MiB of VRAM free with IQ3_XXS loaded. When anything on the desktop then needed GPU memory (the browser that--openlaunches, or a terminal app starting), the amdgpu driver evicted GPU buffers to system RAM (GTT): ~24.5 GB in about one second, on top of the ~42 GB Strata already holds in RAM. The kernel OOM killer then killed kwin_wayland and the desktop session crashed. The machine ran out of memory three times in 15 minutes (two of those crashed the desktop session; the GTT jump was captured on the last one). Re-running setup with--vram-reserve-mib 3072fixed it.Environment
db4f91a, engine 0.1.37, backendhip, ROCm 7.2.4--max-context 131072 --kv int8,--expert-cache autoWhat happened
With the default reserve:
A script logged
/proc/meminfoandmem_info_gtt_usedevery 0.5 s. Strata was idle at the time; the trigger was starting a desktop app:GTT went from 0.3 to 25 GB while Strata's own RSS did not grow. The 24.5 GB is about the size of the expert cache (14,862 slots, 24.16 GiB), so it looks like the cache was evicted to GTT, though I could not confirm whose buffers moved. Then:
Earlier the same thing happened right after
run-iq3_xxs.shopened the browser (--open):Killing the engine (SIGKILL at under 4 GB available) did not save the desktop; the OOM kills still came 40 s later.
Fix that worked
./setup.sh --setup --model IQ3_XXS --vram-reserve-mib 3072(setup now keeps the reserve on later runs):After that, Firefox and OpenCode started without any GTT growth (it stayed at ~0.1 GB), with 2.4 GB of VRAM free in use. Cost: 13,455 instead of 14,862 experts in VRAM; generation was still 70-87 tok/s with a 93-96% decode hit rate.
For comparison, the Coder (IQ1_M) left 2.4 GB free with the default reserve and never crashed.
Suggestions
--vram-reserve-mibis the fix for desktop crashes / OOM after the model loads.@Niko1221 commented on GitHub (Oct 3, 2026):
Thanks for the careful measurements. The GTT trace made the cause clear.
Fixed in 0.1.38, as a recommendation: on a Linux desktop with an AMD card, setup now suggests
--vram-reserve-mib 3072. After the start, when the engine reports less than 2 GB of VRAM free and the reserve is below 3072, the server window says the same, before--openlaunches the browser. INSTALL.md and docs/AMD_HIP.md describe the symptom (GTT growth, the OOM killer ending KWin/plasmashell) and this fix.We don't raise the reserve automatically. A headless box or a second card would lose ~2.3 GB of experts for nothing, and the engine can't reliably tell whether the card drives the screen.
./setup.sh --vram-reserve-mib 3072, as you found, keeps it for that model.