Repository navigation
perf(umbp): ask for transparent hugepages on the anonymous DRAM tier - #679
Merged
Merged
Conversation
MAP_HUGETLB needs a reserved pool, so on hosts running HugePages_Total=0 the tier silently falls back to base pages. A 1 TiB tier is then 268 M of them, and both the prefault and the hipHostRegister that follows are charged per page -- tier registration dominates standalone startup and has been measured taking 604 s to 1528 s for the same 1 TiB on the same fleet. Those hosts do have THP in madvise mode, which means the kernel will back the range with 2 MiB pages -- 512x fewer entries -- but only when asked, and nothing asked. madvise(MADV_HUGEPAGE) runs before any faulting so the population itself lands in huge units, and is skipped for hugetlb backings, which are already huge and would reject it with EINVAL. Not fatal when the advice fails: the mapping stays correct, just backed by base pages. UMBP_DRAM_TRANSPARENT_HUGEPAGES=0 restores the old behaviour. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
This was referenced Dec 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
hipHostRegisterof the DRAM tier dominates standalone-server startup, and it ischarged per page.
MAP_HUGETLBneeds a reserved pool, so on a host runningHugePages_Total=0thetier falls back to base pages — a 1 TiB tier is 268 M of them. Those hosts do have
THP in
madvisemode, which means the kernel will back the range with 2 MiB pages(512x fewer entries) but only when asked, and nothing asked.
One
madvise(MADV_HUGEPAGE)before any faulting, so the population itself lands inhuge units. Skipped for hugetlb backings, which are already huge and reject it with
EINVAL.Measured
MI355X, 1.5 TB tier, one binary with only
UMBP_DRAM_TRANSPARENT_HUGEPAGESflipped,run
offfirst so theonarm does not get the cleaner host:hipHostRegisterThe prefault itself barely moves (130 s vs 142 s); the win is entirely in the
registration, so this does not scale the whole startup by 2.47x.
Same ratio as an earlier measurement on a 512 GiB tier (98.5 s -> 36.4 s, 2.71x).
Notes
pages, and the warning is logged once.
UMBP_DRAM_TRANSPARENT_HUGEPAGES=0restores the old behaviour.🤖 Generated with Claude Code