Use it when placing latency-sensitive or memory-intensive workloads, sizing VMs, and diagnosing why performance changes when a process moves between sockets.
NUMA
NUMA (Non-Uniform Memory Access) means memory and devices are attached to specific CPUs or CPU regions (nodes); a core reaches local memory faster than memory on another node.
1. How many nodes, and what distances?
2. Where do the process's threads run and where is its memory?
3. Which node owns the NIC/NVMe it uses?
4. Is the memory evenly populated per node?
BIOS NUMA mode (SNC/NPS) → nodes with local memory and devices → OS scheduler and allocator → process placement → local or remote access
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Read-only Verification Verify boundary
numactl --hardware
# available: 2 nodes (0-1)
# node 0 cpus: 0-31 64-95
# node 0 size: 257652 MB
# node distances:
# node 0 1
# 0: 10 32
# 1: 32 10
numastat -p $(pidof postgres | cut -d' ' -f1) # memory per node for one process
cat /sys/class/net/ens1f0/device/numa_node
cat /sys/class/nvme/nvme0/device/numa_node
The example output above is illustrative; counts and distances differ per platform. A process whose memory is split evenly across nodes while its threads run on one node is paying remote-access cost on half its accesses.
Step 2 Common mistakes Narrow the fault
- Sizing a VM larger than a NUMA node without vNUMA.
- Changing SNC/NPS settings on one cluster node only.
- Enabling node interleaving to "simplify" NUMA.
- Ignoring device locality for NICs and NVMe.
Step 3 Troubleshooting Narrow the fault
Performance varies run to run. Threads and memory land on different nodes each time; bind or let the application's NUMA awareness handle it.
One node runs out of memory while the other has plenty. Unbalanced DIMM population, or a strict --membind; check numactl --hardware free memory per node.
High network latency under load. NIC on the other node from the application threads and IRQs.
Benchmarks got worse after enabling SNC/NPS4. The application is not NUMA-aware; return to one node per socket.
One node per socket by default; BIOS options (Intel SNC, AMD NPS) can split a socket into more nodes. Keep threads, memory and the NIC/NVMe they use on the same node. Remote access works — it is just slower and uses the inter-socket link.
numactl --hardware— nodes, CPUs, memory and distance matrix.numastat -p <pid>— where a process's memory actually lives.lscpu | grep NUMA— CPU ranges per node.cat /sys/class/net/<if>/device/numa_node— node of a NIC.
ReferenceWhat it is2 sections · depth on demand
Direct Answer
In a NUMA system, CPUs and memory are grouped into nodes. A core accesses memory on its own node faster than memory on a remote node, which has to cross the inter-socket link. A two-socket server has at least two nodes; BIOS options such as Intel Sub-NUMA Clustering (SNC) or AMD NPS (nodes per socket) can split each socket into more. Performance is best when a workload's threads, its memory and the devices it uses (NIC, NVMe, GPU) are on the same node.
Scope and canonical references
This Topic owns NUMA on physical hardware.
- Platform: Server Architecture, Memory and ECC, PCIe.
- NUMA for virtual machines (vNUMA, sizing VMs to nodes): NUMA under CPU Virtualization and NUMA under Memory Virtualization.
ReferenceImportant terms & boundaries1 section · depth on demand
In depth
Nodes and distances
The firmware describes the topology to the OS (ACPI SRAT/SLIT). Linux shows a distance matrix: 10 means local; larger values are relative cost (commonly 20–32 for the other socket). Within a socket, sub-NUMA modes create nodes with small distances between them.
BIOS NUMA modes
| Setting | Effect |
|---|---|
| One node per socket | Simplest; good default for general workloads |
| Intel SNC2/SNC4, AMD NPS2/NPS4 | Splits a socket into nodes with lower local latency; benefits NUMA-aware applications, can hurt others |
| AMD NPS0 / node interleaving | Interleaves memory across sockets — uniform but always partly remote; rarely recommended |
| L3 as NUMA node (AMD) | Exposes cache groups as nodes for very fine placement |
Placement
The Linux scheduler and allocator prefer local memory (first touch: memory is allocated on the node of the thread that first writes it), and automatic NUMA balancing migrates pages toward the threads that use them. For predictable latency, bind explicitly:
numactl --cpunodebind=0 --membind=0 ./server
Databases and hypervisors have their own NUMA logic; size VMs so their vCPUs and memory fit within one node where possible.
Devices
PCIe devices belong to the node of the root port they hang off. Interrupts and DMA for a NIC on node 1 are cheapest for threads on node 1. Check numa_node in sysfs and align IRQ affinity and application threads with it.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Deep reference
Healthy vs suspicious evidence
Output interpretation
Node distances: 10 for local; values around 20–32 for remote nodes. Larger distances mean higher remote-access latency.
numastat -p: memory spread evenly across nodes for a process whose threads all run on one node means about half its accesses are remote. numa_miss/numa_foreign counters growing in numastat system-wide show allocations that could not be served locally.
Device numa_node: a NIC on node 1 serving an application pinned to node 0 crosses the socket interconnect for every packet; -1 means the platform did not report locality.
Design & tradeoffs
Design decisions
Fit workloads within a node where possible: size VMs and containers so their vCPUs and memory fit one NUMA node, and let the hypervisor or scheduler keep them there.
Pin deliberately for latency-critical work (CPU and memory affinity, IRQ affinity for NICs), but avoid manual pinning everywhere — it fights the scheduler.
BIOS options such as sub-NUMA clustering or NPS settings split a socket into smaller nodes: good for NUMA-aware software, harmful for software that is not.
Place devices on the socket that runs their main workload.