AlgoMaster Logo

Huge Pages, NUMA, and ASLR

Low Priority36 min readUpdated August 14, 2026

A large in-memory database may start at a different virtual address each time, use 2 MiB pages for parts of its heap, and allocate memory closer to one CPU socket than another.

These behaviors come from three different mechanisms:

They often appear together in performance discussions, but they solve different problems.

  • Huge pages reduce address-translation overhead by covering more memory with each page-table and TLB entry.
  • NUMA means some physical memory is faster for a CPU to access than other memory.
  • ASLR randomizes virtual addresses across executions to make memory layouts harder to predict.

Huge pages affect mapping size, NUMA affects physical placement, and ASLR affects virtual placement.

Keeping these ideas separate makes their interactions much easier to understand.

This chapter explains the benefits and costs of huge pages, NUMA placement and policies, and ASLR-based address randomization, then shows how to observe their interactions and tune them through measurement.

Premium Content

Subscribe to unlock full access to this content and more premium articles.