KVM/QEMU Memory Ballooning
by Sprencz, Pal Csongor (GE Healthcare)
Dear libvirt community,
My name is Csongor Sprencz from the GE Healthcare. I contacting you regarding some questions about the memory ballooning mechanism of the KVM/QEMU system.
I hope that I contact the right forum to get answer to my question
In short we have a ScientificLinux7 base host OS system, on top of that I would want to run a KVM/QEMU virtual machine.
The kvm version is used on the host OS is the following.
qemu-kvm-common-1.5.3-173.el7_8.1.x86_64
libvirt-daemon-driver-qemu-4.5.0-23.el7_7.6.x86_64
qemu-kvm-1.5.3-173.el7_8.1.x86_64
The guest Linux OS is Suse.
The VM cfg does contain the mem balloon device configuration.
Inside of the VM we have a Kubernetes. The host system has 64GB, the VM has maxmemory and currentmemory set to 32GB.
I would like to ask you, how we can test that the memory ballooning mechanism works? Does it works on this version or not. What I see on the host level, if I put under stress the host with a hugh memory allocation, in that case the VM resident memory size it is decreasing, but it not decrease so much as it is expected, and it started to swap out to host swap disk. The VM on idle state it has 32GB total memory and 21GB free memory. And what I see the RSS size of the qemu is decresing with 5-6GB.
Do you have any procedure, how it can be tested? Or there is any log where I can see that the memory ballooning is started to work?
Regards,
Csongor