mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #1958] [Field Observation] Huge Pages does not improve performance #780
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#780
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 @tonydiep on GitHub (Oct 11, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/1958
Field observation — huge pages: the hugetlb arena works, and it changes nothing measurable (0.1.42, 4-GPU rig)
Posting as an observation. No bug to fix, no regression — the huge-page path is doing exactly what the header in
include/strata/core/pinned.hppsays it should, and on this machine that turns out not to matter.Rig: RTX 5060 Ti 16 GB (CUDA0) + RTX 3090 24 GB (CUDA3) + 2× RTX 3060 12 GB (CUDA1, CUDA2), no NVLink. Three of the four cards run PCIe 3.0 x4 (engine probes 3.1 GB/s,
pcie_frac 0.09); the 5060 Ti is x8 (14.0 GB/s,pcie_frac 0.38). 61 GiB host RAM (MemTotal 64249528 kB), single NUMA node.Model: Qwen3.8-Flash-Next, IQ3_XXS, 48 layers,
--max-context 262144 --kv q4_0,--expert-cache auto,--prefill auto,--spec 4 --spec-min-p 0.5,--mtp,--vision,--vram-reserve-mib 700,STRATA_PF_FUSED=1.Engine:
strata 0.1.42(binary built 2026-10-10 16:50).Layout, both arms:
"gpu": [0,1,3,2],"layer_split": "20,24,28"→ layers 0-19 (5060 Ti) / 20-23 / 24-27 (the 3060s) / 28-47 + head (3090). Caches 6352 / 2048 / 2048 / 8827 slots, 19275 of 24576 profiled pairs resident (78%), prompt chunk 6144 with the usual #448 clamp note.What I ran
One variable:
vm.nr_hugepages, set to 20480 (40.0 GiB of 2 MiB pages; the arena asks for 20464) while the engine was down, and released again afterwards. The pool has to be reserved with the engine stopped — 40 GiB does not fit next to a running engine — andMAP_HUGETLBis all-or-nothing, so a pool that comes up short fails the mapping rather than half-working.Same config, same split, one benchmark session, two measured boots:
vm.nr_hugepagesHarness: cold salted ~8.4k-token prefill (
max_tokens 1, temp 0) + 512-token gen, 3 runs × 3 reps, median of 9. Run-to-run spread inside one arm on this rig is ~1.3% prefill / ~7.9% gen, so −0.1% prefill and −0.6% gen is noise. Both arms PASS their own startup checks.The mapping really happened
Boot 1, 09:24:41 (no pool) — log line 26155:
Boot 2, 09:29:23 (pool reserved) — log line 26334:
Boot 3, 09:32:47, same config, pool released again — log line 26514, back to
MAP_HUGETLB unavailable ... vm.nr_hugepages=0. So the flip tracks the pool and nothing else.Corroborating host state during the hugetlb arm:
cudaHostRegister PORTABLE okon a hugetlb mapping, i.e. pinning the 2 MiB pages worked fine.AnonHugePages: 0while the default-mode engine is running: the fallback'sMADV_HUGEPAGErequest does not leave 2 MiB pages behind, because the arena iscudaHostRegister-pinned. So the no-pool arm genuinely ran on 4 KB pages — this was a real 4 KB vs 2 MB comparison, not THP vs hugetlb.Why it did nothing here
Practical conclusion for this class of machine: don't turn huge pages on. Zero measured gain, 40 GiB of RAM removed from the file cache, and a startup line that reads like an imminent OOM (below).
Scope note: the arena only exists in the default mode
Worth a line in the docs, because it decides where huge pages are a lever at all. With
--resident-expertsthere is no pinned arena:In the resident mode the engine builds a page-locked cache complement instead (
FileExpertSource: mapped pinned cache complement ready: resident 13.21 GiB, pinned 13.21 GiB in 10 s; page-locked and mapped) and reports0 blob reads from the file.pinned.cu'sMAP_HUGETLBpath never runs, so huge pages are a default-mode-only lever.Related:
STRATA_NO_LARGEPAGES=1is documented as the same-run A/B switch, and it is a good idea, but it cannot be used as the control on a box this size — a 40 GiB reserved pool plus a 40 GiB 4 KB-page arena needs ~86 GiB of a 61 GiB machine. The only safe comparison here was pool-off vs pool-on across two boots.@Niko1221 commented on GitHub (Oct 19, 2026):
Thanks for taking the time to report this.
We're resetting the tracker for 0.2.0-beta. There are more than 1,300 open issues and pull requests, too many for us to read properly, so we're closing everything that isn't being worked on right now. Closed here does not mean rejected.
To reopen it takes about two minutes:
/reopen. A check runs and either reopens the issue or lists what is still missing.The rules are in CONTRIBUTING.md.