Parent: #507. Cheap (est. 3-10%, low risk); do early.
Problem
The -r 1M random-key benchmark (and real skewed workloads) thrash the TLB: each GET touches a random table bucket + a random value, mostly TLB misses with 4 KiB pages. 2 MB huge pages cut the TLB-miss rate dramatically for the same coverage.
Mechanism / fix
madvise(MADV_HUGEPAGE) (transparent huge pages) on the per-shard table backing store + the value arenas, or allocate them from a huge-page-backed arena. Gate behind Linux + a config flag (default on where THP is available; a no-op elsewhere). This is a memory hint, so it does not touch ADR-0003 determinism.
Risk / notes
Acceptance
- Table/arena backed by huge pages on Linux (verify via /proc/PID/smaps AnonHugePages).
- No functional change; tests pass.
- A/B target: 3-10% GET on the random-key workload.
Parent: #507. Cheap (est. 3-10%, low risk); do early.
Problem
The
-r 1Mrandom-key benchmark (and real skewed workloads) thrash the TLB: each GET touches a random table bucket + a random value, mostly TLB misses with 4 KiB pages. 2 MB huge pages cut the TLB-miss rate dramatically for the same coverage.Mechanism / fix
madvise(MADV_HUGEPAGE)(transparent huge pages) on the per-shard table backing store + the value arenas, or allocate them from a huge-page-backed arena. Gate behind Linux + a config flag (default on where THP is available; a no-op elsewhere). This is a memory hint, so it does not touch ADR-0003 determinism.Risk / notes
Acceptance