Proxmox VEIX · Virtual MachinesCPU and memory
VM CPU: types, NUMA, pinning, limits
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
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
| Model | What it does | When to use |
|---|---|---|
host | Exposes all host CPU features | Maximum performance; no live migration between heterogeneous nodes |
kvm64 | Common baseline only | Maximum portability; lowest performance |
x86-64-v2 | x86-64-v2 microarchitecture level | Modern baseline; good portability |
x86-64-v3 | x86-64-v3 (AVX2, etc.) | Modern servers (Intel Haswell+, AMD Zen+) |
x86-64-v4 | x86-64-v4 (AVX-512) | Newest servers |
Named CPU (e.g. Skylake-Server) | Specific CPU line | Rarely 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.
| Configuration | Meaning | NUMA topology |
|---|---|---|
sockets=1, cores=4 | 1 socket with 4 cores | Single NUMA node |
sockets=2, cores=2 | 2 sockets × 2 cores each | Two NUMA nodes |
sockets=4, cores=1 | 4 sockets × 1 core each | Four 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:
| Setting | What it does |
|---|---|
cpuunits | Relative weight; default 1024. Higher = more share |
cpulimit | Hard cap on CPU time (in percent; 100 = one core) |
cpu-architecture | See 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: hostthen 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. Usehostonly when needed and homogeneous. - Sockets × cores × threads = vCPUs.
- Pin only latency-sensitive VMs; leave headroom for failover.
Knowledge check
Knowledge check · 3 questions
Q1. Which CPU model is the recommended default for new VMs in a homogeneous cluster?
Q2. A VM with sockets=2 and cores=2 uses 4 vCPUs and has 2 NUMA nodes.
Q3. Which setting caps a VM to two cores worth of CPU time?
Passing score: 75%. Answers are checked in this browser.