I'm having a real hard time understanding something and I was wondering if anybody has any experience with this and is able to help.

I have two KVM VMHosts, one running qemu 2.4.1 and the other running 1.1.0. On each I have a VM that has 80GB of memory allocated to it running CentOS 6. Both VMHosts are running CentOS 6 as well.

On the 1.1.0 box, when I run a process inside the VM that takes up all 80GB of memory, Qemu allocates 80GB to it and keeps it. If you look at top you see the RES size for that qemu process is 80GB. The free command confirms that the memory is not free.

On the 2.4.1 box, when I do the same thing, it allocates 80GB to the VM, the RES column confirms that. But then once I kill the process inside the VM taking up all the memory, Qemu seems to give the memory back to the system. The RES column stays at 80GB the whole time, but I can gradually see my free memory increasing with the free command until it's almost all back again.

I have no idea why this is and it bothers me. The behavior I expected was what the 1.1.0 Qemu vmhost gave. That's why people use memory ballooning (which is actually what I was experimenting with). It almost looks like the 2.4.1 box is auto ballooning, but my RES column is never decreasing so I'm not sure how that's possible. I'm not sure if there was a qemu change I'm not aware of or something...

Any insight would be greatly appreciated. Thanks!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.