Skip to main content
RunBook Academy

Proxmox VEIX · Virtual MachinesCPU and memory

VM CPU: types, NUMA, pinning, limits

Intermediate⏱ ~18 min

What you'll learn

  • Choose the right CPU model for performance vs portability
  • Configure vCPU sockets, cores, and NUMA topology
  • Apply CPU limits, units, and weights for fair scheduling
  • Pin vCPUs to physical cores for latency-sensitive workloads

Prerequisites

Verified against Proxmox VE 9.2.4 · Proxmox Backup Server 4.2.5 · Ceph Squid / Tentacle · Debian 13 (Trixie) · Linux kernel 7.0 (PVE 9.2 default) · 2026-08-07

Not yet marked complete on this device.

Why this matters in production

CPU configuration affects both performance and operability. The wrong choice produces VMs that perform well until you try to migrate them, or VMs that migrate easily but perform badly.

CPU model choices

ModelWhat it doesWhen to use
hostExposes all host CPU featuresMaximum performance; no live migration between heterogeneous nodes
kvm64Common baseline onlyMaximum portability; lowest performance
x86-64-v2x86-64-v2 microarchitecture levelModern baseline; good portability
x86-64-v3x86-64-v3 (AVX2, etc.)Modern servers (Intel Haswell+, AMD Zen+)
x86-64-v4x86-64-v4 (AVX-512)Newest servers
Named CPU (e.g. Skylake-Server)Specific CPU lineRarely needed
qm set 100 --cpu x86-64-v3

CPU flags for live migration

When a VM uses host and migrates from a Skylake host to a Cascade Lake host, the migration succeeds but the destination may not have all the flags the source exposed. To migrate cleanly, the source’s feature set must be a subset of the destination’s.

Proxmox’s masking feature can strip features from a host CPU model to make it portable:

cat /etc/pve/cpu-models.conf

Sockets vs cores

A VM has vCPUs = sockets × cores × threads.

ConfigurationMeaningNUMA topology
sockets=1, cores=41 socket with 4 coresSingle NUMA node
sockets=2, cores=22 sockets × 2 cores eachTwo NUMA nodes
sockets=4, cores=14 sockets × 1 core eachFour NUMA nodes

Most modern Linux and Windows handle multiple vCPUs per socket correctly. Sockets are mostly relevant for NUMA topology and licensing scenarios (some software is licensed per socket).

qm set 100 --sockets 2 --cores 4

NUMA

NUMA (Non-Uniform Memory Access) describes the memory hierarchy on multi-socket servers. A core has “local” memory (its own socket’s RAM) and “remote” memory (other sockets).

For a multi-socket host, NUMA-aware VMs perform better:

flowchart LR
  subgraph S0[Socket 0]
    C0[Core 0] --> M0[Memory 0]
  end
  subgraph S1[Socket 1]
    C1[Core 1] --> M1[Memory 1]
  end
  VM[VM] --> C0
  VM --> C1
  VM --> M0
  VM --> M1

Enable NUMA on a VM:

qm set 100 --numa 1

The guest kernel and userspace can then optimise memory placement.

CPU limits, units, and weights

Proxmox’s host scheduler can prioritise VMs:

SettingWhat it does
cpuunitsRelative weight; default 1024. Higher = more share
cpulimitHard cap on CPU time (in percent; 100 = one core)
cpu-architectureSee Proxmox docs
qm set 100 --cpulimit 200
qm set 100 --cpuunits 2048

CPU pinning

For latency-sensitive workloads (databases, real-time), pin VM vCPUs to specific host cores. The VM uses only those cores; the host scheduler does not move them.

qm set 100 --affinity 0-3

Production considerations

Common mistakes

  • cpu: host then trying to migrate to a host with different features.
  • Allocating 32 vCPUs to a workload that uses 4.
  • Pinning every VM, leaving no slack for failover.

Key takeaways

  • Default CPU model: x86-64-v3. Use host only when needed and homogeneous.
  • Sockets × cores × threads = vCPUs.
  • Pin only latency-sensitive VMs; leave headroom for failover.

Knowledge check

Knowledge check · 3 questions

  1. Q1. Which CPU model is the recommended default for new VMs in a homogeneous cluster?

  2. Q2. A VM with sockets=2 and cores=2 uses 4 vCPUs and has 2 NUMA nodes.

  3. Q3. Which setting caps a VM to two cores worth of CPU time?

Passing score: 75%. Answers are checked in this browser.