NUMA: Cores, memory, and the distance between them
This article explains Non-Uniform Memory Access (NUMA) architecture, detailing how CPU cores and memory are organized into nodes where access time varies depending on the physical distance between a core and a memory bank. It covers the concepts of local vs. remote memory access, NUMA domains, and the performance implications of memory topology in modern multi-socket systems.
Background
NUMA (Non-Uniform Memory Access) is a hardware architecture used in modern multi-socket servers. Unlike older UMA designs where every CPU core has equal access to all memory, NUMA gives each CPU its own "local" memory bank. Accessing a different CPU's memory ("remote") is slower — hence the "non-uniform" label. This matters because performance-critical software (databases, OS kernels, game engines) can suffer major slowdowns if it doesn't explicitly manage where data is placed relative to which cores run the code. The article walks the reader from the historical single-core model through SMP (symmetric multiprocessing) to NUMA's trade-offs: more total memory bandwidth at the cost of latency penalties for cross-socket access.