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 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.