[Openstack] Improving Xen support in the libvirt driver

Alvaro Lopez aloga at ifca.unican.es
Thu May 10 14:08:12 UTC 2012


On Thu 10 May 2012 (15:17), Muriel wrote:
> Great! But there is a reason if are you using /proc/meminfo instead
> of getInfo when calculating the memory used?
> You know if there is a way to get, using libvirt, the reserved
> memory for dom0? Or the only solution is to read the configuration
> file of xen?

I calculated the memory looking into /proc/meminfo because if the memory
is not limited (i.e. no dom0_mem option) the dom0 might take all the
memory available, that then will be ballooned out. For example, in a
machine with 16GB RAM you could have:

  # xm li
  Name                                        ID   Mem VCPUs      State   Time(s)
  Domain-0                                     0 15030     8     r-----   1312.8

If you query libvirt for the dom0 mem, the free memory will be around
1GB, but you can create a machine with more RAM (since ballooning is
enabled):

  # xm li
  Name                                        ID   Mem VCPUs      State   Time(s)
  Domain-0                                     0  9188     8     r-----   1328.6
  test                                         4  7000     4     -b----   3.5

If the dom0 memory is fixed and ballooning is disabled, then yes, you
can query libvirt directly.

Regards,
-- 
Álvaro López García                              aloga at ifca.unican.es






More information about the Openstack mailing list