Skip to content

perf(umbp): ask for transparent hugepages on the anonymous DRAM tier - #679

Merged
maning00 merged 1 commit into
mainfrom
perf/umbp-tier-thp
Sep 17, 2026
Merged

maning00 merged 1 commit into
mainfrom
perf/umbp-tier-thp

Conversation

@maning00

Copy link
Copy Markdown
Contributor

hipHostRegister of the DRAM tier dominates standalone-server startup, and it is
charged per page.

MAP_HUGETLB needs a reserved pool, so on a host running HugePages_Total=0 the
tier falls back to base pages — a 1 TiB tier is 268 M of them. 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.

One madvise(MADV_HUGEPAGE) before any faulting, so the population itself lands in
huge 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_HUGEPAGES flipped,
run off first so the on arm does not get the cleaner host:

off on
hipHostRegister 242.4 s 98.2 s 2.47x
allocate + register (wall) 372 s 240 s 1.55x

The 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

  • Not fatal when the advice fails: the mapping stays correct, just backed by base
    pages, and the warning is logged once.
  • UMBP_DRAM_TRANSPARENT_HUGEPAGES=0 restores the old behaviour.
  • No change to what is mapped, how much, or what the caller sees.

🤖 Generated with Claude Code

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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant