mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #650] [CLOSED] pinned: back the Linux expert arena with transparent huge pages #2742
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#2742
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?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/650
Author: @anon761
Created: 10/3/2026
Status: ❌ Closed
Base:
main← Head:linux-arena-thp📝 Commits (1)
12a89bepinned: back the Linux expert arena with transparent huge pages📊 Changes
1 file changed (+20 additions, -2 deletions)
View changed files
📝
src/core/pinned.cu(+20 -2)📄 Description
What
Without a hugetlb pool (
vm.nr_hugepages=0, the default on most distros) the Linux expert arena falls back to a plain anonymous mapping with 4 KB pages:The CPU expert pool streams whole experts (3-4 MB each for the 4-5 bit GGUFs) out of that arena, so every expert walks ~750-1000 pages through the TLB, and pinning ~72 GiB with
cudaHostRegisterhas to lock ~18.8 M pages.This maps the fallback 2 MiB-aligned and
madvise(MADV_HUGEPAGE)s it, so THP inmadvisemode (the common distro default) backs it.STRATA_NO_LARGEPAGES=1keeps 4 KB pages, as on the hugetlb path. The log note says which one the arena got:Linux only; the Windows path and the hugetlb path are unchanged.
Measured
2x RTX 3090 (layer split auto), EPYC 7413 (24C, AVX2), Unsloth UD-Q4_K_XL (71.7 GiB of experts), 262K context,
--kv int8 --pcie-frac 0 --ple-io ram, engine at currentmain, same binary flags otherwise. Before =main, after = this branch./v1/modelssays loaded (several starts each)loaded 71.73 GiB at ...)--expert-cache 1200(CPU computes most misses), 4 runsSTRATA_DECODE_TIMING, same run)The read itself is unchanged, so the shorter start is most likely the driver registering 2 MiB pages instead of 4 KB ones. With the default cache the CPU pool has little to do on this box (~1 ms per window), so decode is within run-to-run noise there; where the CPU computes most misses the pool's time per expert drops ~4-5%.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.