Monitoring Memory Ballooning on Proxmox VMs

FlyingDaedalus

New Member
Apr 12, 2024
1
0
1
First of all, I’d like to avoid any debate on whether memory ballooning should be used or not. We’ve been using it for our Windows VMs from the beginning without any issues.

My question is specifically about how to monitor the ballooning activity properly.

As I understand it, in Proxmox, once the host reaches 80% memory usage, KSM sharing is triggered. That’s perfectly fine, as it doesn’t directly affect the VMs themselves. The same seems to apply for ballooning, but I'm unsure whether ballooning also starts at 80% or if it waits until KSM has done its job first.

Regardless, my main concern is how to effectively monitor this.
KSM sharing is easy to track, since the RAM usage and KSM deduplicated memory are visible in the dashboard.

But what about memory ballooning? As far as I know, the only way to check is to run "info balloon" on each VM and compare the actual vs. maximum values—the difference being the amount ballooned.

So here’s my question: is there a more efficient way to query all VMs and generate a report on ballooning?

I’m aware that you can use qm monitor <vmid> from the shell, but unfortunately, since it's an interactive shell, it doesn’t work well in an automated bash script.

Is anyone able to help out or point me in the right direction?