VM Capacity Planning¶
Every compute worker has a hard ceiling on how many VMs it can host. Getting this wrong means either buying more hardware than you need or discovering at deployment time that your workers cannot support the planned VM count.
The answer depends on more than core and memory counts: how you allocate CPU and memory across the platform, virtual switch, and VM pools; your virtual switch mode (OVS kernel vs OVS-DPDK, which reserves cores and huge pages); overcommit ratios; NUMA topology and huge page size; and your storage configuration — boot strategy, local nova-local and image-cache disk usage, local Ceph OSD overhead, and storage-network bandwidth for volume-backed and remote-ephemeral VMs.
CPU Pools on Compute Workers¶
Every physical core is assigned to one pool:
Pool |
Typical Cores |
Purpose |
|---|---|---|
Platform |
4-6 |
Host services, OpenStack agents, libvirt, Kubernetes pods |
vSwitch |
0 or 2 |
OVS-DPDK poll-mode drivers (0 if using OVS kernel) |
Application |
Remaining |
Available for VM vCPUs |
Memory Formula¶
Available VM memory = Total RAM
- Platform overhead (~11 GB)
- vSwitch huge pages (0 or 1 GB per NUMA node)
- Ceph OSD overhead (4 GB per OSD, if any local OSDs)
Example: 256 GB RAM, OVS-DPDK (2 NUMA nodes), no local Ceph
256 - 11 - 2 = 243 GB available for VMs
Overcommit Policies¶
Overcommit ratios determine how many virtual resources you can promise relative to physical capacity. These are Nova’s default allocation ratios. Aggressive overcommit fits more VMs per host but increases the risk of contention and performance degradation under peak load.
Resource |
Default Ratio |
Notes |
|---|---|---|
CPU (dedicated/pinned) |
1:1 |
Each vCPU pinned to a physical core. No overcommit. |
CPU (shared) |
Up to 16:1 |
Nova default. Lower ratios reduce contention risk for production workloads. |
RAM (huge pages) |
1:1 |
Physically reserved at launch. No overcommit possible. |
RAM (standard pages) |
Up to 1.5:1 |
Nova default. Use 1:1 for critical workloads. |
Worked Example¶
40-core compute worker, 256 GB RAM, OVS-DPDK (2 NUMA nodes), shared CPU policy at 8:1:
Cores: 40 total - 6 platform - 2 vSwitch = 32 application cores
At 8:1 overcommit: 32 x 8 = 256 vCPUs schedulable
Memory: 256 GB - 11 - 2 = 243 GB available
At 1:1 memory: 243 GB / 8 GB per VM = ~30 VMs
Result: ~30 VMs (4 vCPU, 8 GB each).
Huge Page Constraint¶
Each host supports only one huge page size (2 MB or 1 GB). All VMs on that host must use the same size, so you cannot mix workloads with different page size requirements on a single worker.
2 MB pages: General-purpose. Fine-grained allocation.
1 GB pages: High-performance NFV. Reduces TLB misses. Memory rounded up to nearest 1 GB per VM.
Use host aggregates to separate workers by page size if both are needed.
Practical Limits¶
There is no fixed maximum number of VMs per compute worker. The actual limit depends on the resources available (cores, memory, and local or network storage capacity and performance), the size of each VM, NUMA topology, and scheduling policies. The worked example above yields approximately 30 VMs for a typical 40-core, 256 GB configuration with shared CPU policy.
Use the formulas in this section to calculate the limit for your specific hardware and workload profile.
Note
Plan for N+1 compute capacity. During host maintenance, VMs must evacuate to other workers. If you have 3 compute workers, size each to handle half the total load so one can be taken offline.