Pcornel
Browse topics
Options
Recent
Favorites
Virtualization · Technical reference

Memory Troubleshooting

Direct 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.

When to use this

Use this as the start point for VM memory problems: slow VMs, paging, ballooning or host swapping.

First 30 seconds

1. Compare guest and host views.

2. Check ballooning, swap, OOM.

3. Check memory limits/reservations.

4. Check NUMA locality.

5. Right-size and rebalance.

Operational verification

guest usage → host allocation → reclaim → symptoms

Context & applicabilityCommon mistakes · platform/version boundaries
Common mistakes
Common mistakes
  • Adding RAM to a VM while the host is the bottleneck.
  • Missing memory limits or reservations that cap VMs.
  • Ignoring application caches (Java heap, SQL Server) that grow to fill memory.
Platform / version applicability
virtualization-hardware
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

Platformvirtualization-hardware · libvirt / KVM
Key commandvirsh dommemstat <vm>
Scope / prerequisiteUse this as the start point for VM memory problems: slow VMs, paging, ballooning or host swapping.
Reference · 1
What next?3 suggested next steps
Catalog command links1
Evidence0
On this pageJump to a specific section
Virtualization command reference

Primary Commands

Configuration and operational commands for this Topic.

Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

1 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Troubleshooting order Narrow the fault

1. Inside the guest: is the application or OS paging? (free -m, vmstat 1, Performance Monitor).

2. On the host: ballooning, compression, swap-in rate for this VM.

3. Limits or reservations that cap the VM below its configured size.

4. Host totals and other VMs competing for memory.

5. NUMA: a VM larger than one NUMA node, or memory placed remotely.

Fix the first layer that shows a problem: more guest RAM, remove a limit, move VMs, or add host memory.

Key points
  • Guest problem or host problem — find out first.
  • Host swap = urgent.
  • Limits are a common hidden cause.
Key checks
  • virsh dommemstat <vm> — VM memory detail
  • free -h; vmstat 1 — host memory and swap
  • dmesg | grep -i -e oom -e 'out of memory' — OOM events
ReferenceHow it works1 section · depth on demand

Method

SymptomCheck
VM slow, guest shows free memoryHost ballooning/swapping (MCTLSZ, SWCUR)
Guest swappingVM too small: working set > configured
VM won't start (insufficient memory)Host free memory, reservations, HA admission control
OOM killer in guestGuest memory, balloon minimum too low
Host memory full after adding ZFS/CephARC/OSD memory not budgeted
esxtop (m), sort by MCTLSZ / SWCUR
virsh dommemstat vm1
journalctl -k | grep -i 'out of memory'
ReferenceConfiguration & state1 section · depth on demand

Useful commands

esxtop                          # m: MCTLSZ, SWCUR, SWR/s, ZIP/s
virsh dommemstat vm01
vmstat 1 (in guest: si/so)
Get-Counter '\Memory\Pages/sec','\Memory\Available MBytes'

Sustained si/so > 0 in a Linux guest or high Pages/sec with low Available MBytes on Windows means the guest itself needs more memory.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docvirtualization-hardware current

Authoritative/upstream documentation reviewed for bounded claims in Memory Virtualization → Memory Troubleshooting. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://libvirt.org/docs.html · confidence 94%
Confirmation

Confirm action

Continue?