Use this when sizing cluster memory for VMs, overhead and failover, since memory is usually the first limit.
Memory Capacity
Memory capacity planning sums the configured and actively used RAM of VMs against host memory, minus hypervisor overhead and failover reserve, because memory is usually the first resource to run out in a cluster.
1. Memory capacity = RAM minus host reserve.
2. Usually the limiting resource.
3. Avoid overcommit for critical clusters.
4. Include failover.
5. Plan DIMM upgrades.
RAM − reserve → VM allocations
Context & applicabilityCommon mistakes · platform/version boundaries
- Planning on configured VM memory with no idea of active use (or vice versa, too aggressive).
- Forgetting hypervisor overhead and ZFS ARC/vSAN memory.
- No N+1 reserve.
- Mixing DIMM sizes unevenly, losing memory bandwidth.
Operational reference
Fast context before you go deeper.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- Configured RAM ≠ active RAM, but plan for configured.
- Hypervisor and VM overhead are real.
- Overcommit hides until pressure arrives.
free -g— host memoryGet-VMHost | fl MemoryCapacity— Hyper-Vvirsh nodememstats— libvirt
ReferenceWhy it matters1 section · depth on demand
Sizing method
Required host RAM = Σ(VM active memory + per-VM overhead) + hypervisor/storage overhead + failover reserve (N+1).
Example: 3 hosts × 256 GB; to survive one host failure, all VMs must fit in 2 × 256 GB minus overhead, so plan for roughly 450 GB of VM demand, not 768 GB. Track trends monthly and plan purchases before demand crosses the threshold.
ReferenceImportant terms & boundaries3 sections · depth on demand
In depth
What actually consumes host RAM
| Consumer | Typical size |
|---|---|
| Guest RAM (configured) | Sum of VM memory |
| QEMU overhead per VM | Tens of MB + video memory + per-device buffers |
| Host OS and services | 2–4 GB |
| ZFS ARC (if ZFS is used) | Configurable; newer Proxmox installs limit it to 10 % of RAM (max 16 GiB) |
| Ceph OSDs (hyper-converged) | osd_memory_target ≈ 4 GB per OSD by default |
| Reserved huge pages | Fully reserved, unavailable to others |
Worked node sizing
| Item | GB |
|---|---|
| Node RAM | 512 |
| Host + services | −4 |
| 6 Ceph OSDs × 4 GB | −24 |
| ZFS ARC (boot pool only, capped) | −4 |
| QEMU overhead (40 VMs × ~0.1 GB) | −4 |
| Available for guests | ≈476 |
Overcommit tools and their real effect
The Proxmox VM chapter describes the balloon device and automatic memory allocation with a Shares weight. Ballooning returns memory only if the guest has free memory to give; KSM merges identical pages (many similar Linux or Windows VMs) but costs CPU and has side-channel concerns; swap on the host turns RAM shortage into severe latency.
| Mechanism | Plan with it? |
|---|---|
| Ballooning | No — emergency buffer |
| KSM | Small bonus for homogeneous VMs, measure /sys/kernel/mm/ksm/pages_sharing |
| Host swap | No — keep only as protection against OOM |
Signals that RAM capacity is exhausted
free -havailable memory under ~10 % of node RAM.- Ballooning active on many VMs (guests report reduced memory).
- OOM killer messages in
journalctl -knamingkvm/qemu— the kernel killed a VM. - Swap in/out activity (
vmstat 1→si/so).
Plan RAM per node, not only per cluster: one node full while others have room still means VMs fail to start or migrate there.
Worked example
Memory capacity is usually the first limit in virtualization because memory overcommit hurts more than CPU overcommit.
Plan: sum of configured memory for VMs that must run (or active memory where ballooning is acceptable) + hypervisor overhead (a few GB per host, more with ZFS ARC/vSAN/Ceph) must fit into N+1 capacity. Example: 4 × 512 GB hosts, N+1 = 1 536 GB; minus 4 × 32 GB host overhead = 1 408 GB for VMs; at 80 % target utilisation ≈ 1 126 GB of VM memory.
Example
Demand: 120 VMs averaging 6 GB active plus overhead ≈ 780 GB. Hypervisor and storage services: 32 GB per host. With 512 GB hosts: (512 − 32) = 480 GB usable each → 2 hosts needed for demand, 3 hosts for N+1 failover, 4 for N+1 during maintenance.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Capacity Planning → Memory Capacity. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://libvirt.org/html/libvirt-libvirt-domain.html · confidence 94%