Memory Troubleshooting
Cheat sheet · https://pcornel.dk/topic.php?topic=3498
Answer
Troubleshoot VM memory by checking guest usage and paging inside the VM, then host-side ballooning, compression, swap-in rates and NUMA locality; host swapping or high balloon size points to overcommit rather than a guest problem.
Remember
- Guest problem or host problem — find out first.
- Host swap = urgent.
- Limits are a common hidden cause.
First checks
virsh dommemstat <vm>— VM memory detailfree -h; vmstat 1— host memory and swapdmesg | grep -i -e oom -e 'out of memory'— OOM events
Commands
virsh dommemstat <vm>- Operational command for Inspect KVM guest memory statistics. Focus fields: actual, rss, available, usable, swap-in/out …
Verify in this order
guest usage → host allocation → reclaim → symptoms
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.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=3498