Re: [libvirt-users] Guests using more ram than specified

Michal Privoznik
Fri, 16 Jan 2015 14:14:38 -0000

On 16.01.2015 13:33, Dennis Jacobfeuerborn wrote:
> Hi,
> today I noticed that one of my HVs started swapping aggressively and
> noticed that the two guests running on it use quite a bit more ram than
> I assigned to them. They respectively were assigned 124G and 60G with
> the idea that the 192G system then has 8G for other purposes. In top I
> see the VMs using about 128G and 64G which means there is nothing left
> for the system. This is on a CentOS 7 system.
> Any ideas what causes this or how I can calculate the actual maximum
> amount of RAM I can assign to the guests on a HV without overcommitting
RAM?

Well, this is an undecidable problem.
One thing that may help is to use hugepages to back the memory for your
guests. Because if you use the ordinary system pages, the translation
table for ~200G is gonna be gigantic. Remember, that the table is
counted in for memory usage.
Then, qemu itself consume some memory besides guest memory. How much?
Nobody is able to tell.

Michal