NUMA Affinity Planning for VM Workloads¶
Modern multi-socket servers divide memory and PCIe devices across NUMA nodes. When a VM’s vCPUs run on a different NUMA node than its NIC, traffic must cross the interconnect between NUMA nodes, adding latency and reducing throughput.
NUMA affinity ensures the scheduler places VMs on the same NUMA node as their network hardware. This matters most when using SR-IOV, PCI passthrough, or OVS-DPDK.
Affinity Policies¶
The following table describes the two available policies and when to use each one.
Policy |
Behavior |
Use When |
|---|---|---|
Strict |
Scheduler fails placement if the correct NUMA node is unavailable |
Latency-sensitive workloads using SR-IOV or passthrough |
Preferred |
Scheduler tries correct NUMA node, falls back if needed |
General workloads that benefit from affinity but tolerate cross-node |
Considerations¶
Document which NICs are on which NUMA node for each server model. Use
lspci -vvs <device>to confirm after installation.If using OVS-DPDK, allocate poll mode driver (PMD) cores on every NUMA node that has data NICs attached.
Strict affinity reduces VM density because a VM can only use cores and memory from one NUMA node, even if other NUMA nodes within the same processor or socket are idle.
Choose servers where data NICs are distributed across multiple NUMA nodes to avoid asymmetric utilization.
Plan the largest VM flavor to fit within one NUMA node’s available resources after platform and vSwitch overhead is subtracted.