Ballooning
Cheat sheet · https://pcornel.dk/topic.php?topic=3458
Answer
Ballooning changes how much host-backed memory is effectively available to a guest without necessarily changing the VM's configured maximum. It requires a working guest balloon driver/agent path.
Remember
- Balloon target/inflation and configured RAM are different quantities.
- A balloon driver must cooperate with the hypervisor.
- Inflation can force the guest to reclaim cache or page internally.
- Ballooning pressure can affect workload performance before a VM appears “out of memory”.
First checks
virsh dommemstat <vm> | grep actual— balloon sizeqm monitor <vmid> -> info balloon— Proxmox balloonlsmod | grep virtio_balloon— guest driver
Verify in this order
host pressure → balloon inflates → guest frees pages → host reuses
Where it usually breaks
First mismatch in host capability/IOMMU/NUMA → hypervisor allocation/mapping → virtual hardware model → guest driver/enumeration → workload use; preserve identity/native error/pre-state before mutation.
VM Hardware → Memory → Ballooning reference map
| Boundary | Meaning | Evidence limit |
|---|---|---|
| Configured RAM | VM policy ceiling/baseline | May stay unchanged |
| Balloon inflation | Guest pages pinned for reclamation | Reduces effective availability |
| Host reclaimed | Backing returned to host | Pressure response |
| Guest effect | Cache/page pressure possible | Measure workload |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=3458