
Performance
Bind Processes to NUMA Nodes With numactl --cpunodebind and --membind
Pin a process and its memory to one NUMA node with numactl --cpunodebind and --membind, compare it with --interleave and --preferred, and verify placement.
5 min read
Tag
4 posts

Pin a process and its memory to one NUMA node with numactl --cpunodebind and --membind, compare it with --interleave and --preferred, and verify placement.

Read a machine's NUMA nodes, per-node memory and distance matrix with numactl --hardware, then see caches and devices with lstopo from hwloc on Linux.

NUMA gives each CPU socket its own local memory, so a core reads its own memory fastest and pays extra to reach another socket's. Learn why and how to see it.

Complete guide to memory performance on Linux: measure bandwidth, place data across NUMA nodes and cut TLB misses with huge pages, with C code throughout.