Pcornel
Browse topics
Options
Recent
Favorites
Hardware · Technical reference

NUMA

Direct answer

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.

When to use this

Use it when placing latency-sensitive or memory-intensive workloads, sizing VMs, and diagnosing why performance changes when a process moves between sockets.

First 30 seconds

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?

Operational verification

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
Platform / version applicability
x86 servers; Linux numactl/numastat.
Applicability is projected only from persisted Topic profile and Command metadata.
At a glance

Operational reference

Fast context before you go deeper.

Platformx86 servers; Linux numactl/numastat.
Scope / prerequisiteUse it when placing latency-sensitive or memory-intensive workloads, sizing VMs, and diagnosing why performance changes…
What next?2 suggested next steps
Evidence0
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

3 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

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.

Key points

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.

Key checks
  • 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.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
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

SettingEffect
One node per socketSimplest; good default for general workloads
Intel SNC2/SNC4, AMD NPS2/NPS4Splits a socket into nodes with lower local latency; benefits NUMA-aware applications, can hurt others
AMD NPS0 / node interleavingInterleaves 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
Terminology layer

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.

Aliases that resolve here
numanon-uniform memory accessnuma nodesub-numa clusteringnumactlnps
Depth when you need it

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.

Confirmation

Confirm action

Continue?