mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #1250] [Linux][RTX 3080 12 GB, 62 GB RAM] 0.1.40.1 start OOMs the host while allocating the page-locked expert copy (IQ2_XS); 0.1.31 starts fine #515
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#515
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 @Absolutely-not-a-coder on GitHub (Oct 6, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/1250
Summary
On a 62 GB Linux box with a 12 GB RTX 3080, 0.1.40.1 is OOM-killed during start with IQ2_XS at 262K context. The same model, config and machine start and serve fine on 0.1.31 (service peak 47.7 GiB). The low-RAM modes don't avoid it.
--resident-experts,--resident-budget-gib 26and--resident-budget-gib 26 --pcie-frac 0all reachsession is up (engine 0.1.40)with the GPU cache filled. Each then dies whileFileExpertSourceallocates its page-locked cache complement. In those three runs it was a host-wide OOM (global_oom), even thoughMemAvailablewas 54 GB a few seconds earlier.Environment
v0.1.40.1(82f46a8),STRATA_PORTABLE=ON,CMAKE_CUDA_ARCHITECTURES=86,GGML_NATIVE=OFF+ AVX2/FMA/F16C, CUDA 13.0.88, ggml 3cf0325. Runtime CUDA libs come from the venv'snvidia/cu13(13.0.96) vialib_dirs.tools/iq_pack.py(noexperts.bin). Shard 1 (39.2 GB, experts) is on a SATA SSD (ext4); shard 2 (28.8 GB, PLE) is on NVMe. MTP draft enabled.MemoryHigh=54G MemoryMax=56G MemorySwapMax=0 LimitMEMLOCK=infinity OOMScoreAdjust=500. Nothing else large runs on the host: about 2.5 GB anon outside the engine, with the GPU's other tenant stopped.Engine arguments (from the server config):
What happens
GPU 0: NVIDIA GeForce RTX 3080, compute capability 8.6, while "loading the experts into RAM (about 39 GB)"STRATA_READ_AHEAD=0LimitMEMLOCK=infinity--resident-expertsFileExpertSource: allocating 32.35 GiB page-locked cache complement--resident-budget-gib 26FileExpertSource: allocating 26.00 GiB page-locked cache complement--resident-budget-gib 26 --pcie-frac 0/proc/meminfoevery 5 s (MiB),--resident-expertsrun:Kernel log, budget +
--pcie-frac 0run:The engine log before the kill (resident run) looks normal:
session is up (engine 0.1.40),pre-filled 3250 of 3250 slots from the profile in 29.8 s,token graph hit path: 3250 resident experts. Then:What it looks like (a guess, not verified)
The page-locked complement is committed as shmem much faster than the kernel gives back the ~30 GB of clean file cache left by reading the GGUF shards. Either that cache can't be reclaimed at that moment (mapped and in use?), or the pinned allocation path doesn't wait for reclaim. The 4 GiB headroom check (
STRATA_RESIDENT_HEADROOM_GIB) passes becauseMemAvailablecounts that cache as available, and it doesn't see a cgroupmemory.maxeither.Possible mitigations: allocate and pin the complement in chunks, letting reclaim catch up (or
posix_fadvise(DONTNEED)the shard ranges already copied); size the budget againstmemory.maxwhen running in a cgroup; and treat an allocation that can't be satisfied as "fall back to the mapped mode" rather than faulting pages until the OOM killer runs.I can rerun with
STRATA_RSS_TRACE=1or anything else that helps. This box also runs other services, so I'd rather not trigger more global OOMs blind.@perronemirko commented on GitHub (Oct 6, 2026):
could you please provide the output of the log ? I have similar issue a week ago ( I have 4090 RTX CMAKE_CUDA_ARCHITECTURES=89
I solved by compiling with CUDA 12.8 with proprietary nvidia-driver-610,
export CC=/usr/bin/gcc-10
export CXX=/usr/bin/g++-10
ninja --version => 1.10.1
@Absolutely-not-a-coder commented on GitHub (Oct 6, 2026):
Thanks! Logs below, with paths shortened to placeholders. Nothing is cut after the last line: the process is killed right there. The server log just stops at "almost ready ...".
On the toolchain: this is CUDA 13.0.88 with GCC 13.3.0 (Ubuntu 24.04's default) and driver 595.91.07. The 0.1.31 build that starts fine on this same box used the same toolchain, so I doubt that's the cause here. What runs out is host RAM, not VRAM: the kill comes during the page-locked RAM allocation. I can try a CUDA 12.8 build if the maintainers think it's relevant.
engine + server logs:
--resident-expertsrun, then the default run@perronemirko commented on GitHub (Oct 6, 2026):
Are you sure that CUDA 13.0.88 is compatible with driver 595.91.07
@Absolutely-not-a-coder commented on GitHub (Oct 7, 2026):
Yes. CUDA 13.0 needs driver 580 or newer on Linux, and 595.91.07 is newer than that. The same driver runs the 0.1.31 build of this engine on this box (same toolchain, same model) without problems, along with other CUDA 13 workloads.
One thing I found since, in fairness to everyone's time: overnight this machine logged a kernel memory corruption. Two unrelated kernel pointers were damaged by the same single flipped bit (bit 41), and the second one crashed the kernel. It runs 4× DDR5 at the XMP profile (6000 MT/s, 2 DIMMs per channel), which is beyond what this platform reliably supports. I doubt it explains the OOMs: six of six starts failed at the same step, and the memory accounting is consistent each time, which reads like accounting, not corruption. Still, I'll take the RAM back to stable speeds, run a memory test, then re-run 0.1.40.1 and report back before asking anyone to dig further.
@Absolutely-not-a-coder commented on GitHub (Oct 7, 2026):
Possibly the same root cause as #771. This box has THP
enabled=madviseanddefrag=madvise, and our build is the same82f46a8(v0.1.40.1) as the latest report there. As far as I can tell, the 0.1.40 fix skips the arena'sMADV_HUGEPAGEonly when THP is[always], so withmadvisethe arena faults still go into direct reclaim and compaction. That fits what we saw: the default-mode start sat at "still starting" for about 9 minutes, and every failure came during the arena/complement allocation, with tens of GB of page cache not being given back (MemFree under 1 GB, Cached about 53 GB).When I re-test after fixing the RAM, I'll try
STRATA_NO_ARENA_THP=1first, then THPnever, and post the results here.@Niko1221 commented on GitHub (Oct 7, 2026):
Thanks for the memory trace. We could not reproduce the kernel's behaviour on our machines, so 0.1.40.2 guards the allocation instead of fixing a known cause: before page-locking the expert copy the engine hands back the cached pages of the model files it has mapped; if the really free RAM still does not cover the copy, it takes the pages in 1 GiB steps while the RAM available (cgroup limits included) stays above the headroom, page-locks what it has and keeps the rest resident but pageable, with a warning
only N of M GiB could be page-locked. The answers are the same; only the CPU copies of the pageable part are slower. Tested under 32 GB cgroups with the whole copy, half of it and none of it page-locked. STRATA_PIN_GUARD=0 turns the guard off, STRATA_PIN_RESERVE_GIB=N sets the RAM that must stay free. Could you try 0.1.40.2 on your box and attach the engine log if it still dies?@Niko1221 commented on GitHub (Oct 13, 2026):
Thanks for the report. To keep the tracker current we are closing issues older than three days: 0.1.44 is out with a long list of fixes, and many older reports are covered by it or by 0.1.43.1.
If this still happens on 0.1.44, please leave a comment here with your engine log (and the version line it prints), and we will reopen it. A new issue that links this one works too.