2

I have ubuntu and installed on it several qemu-kvm guests, running also ubuntu.

I'm using libvirt to change the guests' memory allocation. But always encounter a constant difference between the requested memory allocation and the actual memory allocation I query from the Total field in the top command inside the guests.

The difference is the same in all the guests, and consistent. In one machine I installed it is 134MB (allocated is less then requested), In another one it is 348MB.

I can live with it, I just don't know the reason. Does someone encounter this kind of problem? Maybe solved it?

Thanks

Eyal
  • 8,219
  • 1
  • 13
  • 7

1 Answers1

2

This constant difference is likely the space reserved by the kernel. Note that this amount of space will increase (at least in Linux) as you have more physical memory available in the system. The change you're seeing is probably due to kvm giving that particular guest more or less memory to work with than it was before.

If you're interested, here is a quick article on memory ballooning, as implemented by VMWare ESX Server.

kch
  • 2,015
  • 14
  • 12
  • 1
    A note about the different between the allocated memory and the one the machine see from inside, it is from the same reason that on a regular physical machine `top` command shows less memory then there is actually there (what you actually bought in the store...). – Eyal Apr 08 '12 at 08:25