mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #5317] [Engine] The expert arena's RAM check ignores a reserved hugetlb pool and falls back to --mmap-experts (0.2.10+) #3170
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#3170
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 @erikash on GitHub (Nov 5, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/5317
Since 0.2.10 (the #4846 change), the engine compares the expert arena's size with MemAvailable before loading it. The arena is mapped with
MAP_HUGETLBwhen a pool is reserved, but pages reserved invm.nr_hugepagesdon't count in MemAvailable. So on a host that reserved a pool exactly for the arena, the check always finds the RAM "short". The engine then falls back to the file source plus a RAM copy. The pool sits unused, and the RAM copy takes what's left of the host's memory.Setup:
ghcr.io/niko1221/strata:0.2.11-cuda13(engine 0.1.57), Linux in Docker, one RTX 3090, a 157 GiB VM,FAMILY=unsloth MODEL=UD-Q5_K_XL(arena 91.62 GiB). Before the start,vm.nr_hugepages=47450(2 MB pages, 92.7 GiB), andHugePages_Freeis 47450.What happens (
strata.engine.log):Afterwards,
HugePages_Freeis still 47450 (the pool was never touched), andfree -gshows 0 GiB available on the host. The experts come from a SATA drive (0.45 GB/s in the prefill plan).With
STRATA_ARENA_RAM_FALLBACK=0(changing nothing else), it logs the warning and loads the arena into the pool, as on 0.2.9:Now
HugePages_Freeis 541 and the host has 50 GiB available. Decode is 98-101 / 80-82 / 75-76 tok/s (code / explain / story), and a 19.6K prompt reads at about 2,200 tok/s.Expected: when the arena will go to hugetlb pages,
arena_ram_verdict(include/strata/core/ple_residency.hpp) should count the free pool (HugePages_Free × Hugepagesize) toward what's available, or check that the pool covers the arena. Either way, a reserved pool shouldn't trigger the fallback or the 20 s wait.Workaround:
STRATA_ARENA_RAM_FALLBACK=0. That's fine when the pool is known to cover the arena, but it also turns off the protection #4846 added for hosts that really are short.