[Libvirt-cim] What does NumberOfBlocks and ConsumableBlocks in the Xen_Memory class represent?

Medlyn, Dayne (VSL - Ft Collins) dayne.medlyn at hp.com
Thu May 14 19:46:25 UTC 2009


Kaitlin,

Thanks for the correction.  It seems were trying to use these properties correctly and there is something just not right.  Using the same wbemcli command I get:

-SystemCreationClassName="Xen_ComputerSystem"
-SystemName="Domain-0"
-CreationClassName="Xen_Memory"
-DeviceID="Domain-0/mem"

-ConsumableBlocks=1717760
-NumberOfBlocks=4294967040
-BlockSize=4096

One difference I did notice is that we are trying to use these values from Dom0 to determine the amount of available memory for guests to use.  Perhaps for Dom0 these values just map differently.  

My objective is to identify how much memory is available on the hypervisor that can be allocated to new guests.  Looking more closely, I wonder if we should be using Xen_MemoryPool somehow to do this instead.  What is the relationship between the Capacity and Reserved properties?  I have not quite been able to make sense out of what these values mean.  What I have noticed is that a host with no defined guests starts with Reserved smaller than Capacity:   

-PoolID="MemoryPool/0"
-Primordial=FALSE
-Capacity=8385536
-Reserved=8064748
-ResourceType=4
-OtherResourceType=
-ResourceSubType=
-AllocationUnits="KiloBytes"

As guests are create and start the Reserved count increases and grows beyond the capacity.  I am not quite sure how to make use of this information. Do you have any insights?


Dayne 



> -----Original Message-----
> From: libvirt-cim-bounces at redhat.com [mailto:libvirt-cim-
> bounces at redhat.com] On Behalf Of Kaitlin Rupert
> Sent: Wednesday, May 13, 2009 7:10 PM
> To: List for discussion and development of libvirt CIM
> Subject: Re: [Libvirt-cim] What does NumberOfBlocks and
> ConsumableBlocks in theXen_Memory class represent?
> 
> Medlyn, Dayne (VSL - Ft Collins) wrote:
> > All,
> >
> > I am trying to understand the use of NumberOfBlocks and
> ConsumableBlocks in the Xen_Memory class, specifically for the Xen
> host.
> > What I have noticed is that between libvirt-cim-0.4.1 and libvirt-
> cim-0.5.2 the values for NumberOfBlock is now different than
> ConsumableBlocks and
>  > much larger than the physical memory installed on the system.
> > Is it the case that NumberOfBlocks represents the maximum possible
> blocks for the  hardware,
>  > or some such number ConsumableBlocks is the memory that is
> > actually installed in the system? On my system, however,
> NumberOfBlocks reports 16TB where /proc/meminfo
> > reports 32Tb for VmallocTotal.  In short, should I be using
> ConsumableBlocks to determine the total physical memory on the system?
> 
> 
> Hi Dayne,
> 
> It looks like there is a bug here.  Currently, the providers use the
> following representation:
> 
> NumberOfBlocks:   max amount of memory that can be allocated to a guest
> ConsumableBlocks: current memory allocated to the guest
> 
> However, these values should be reversed based on the attribute
> definitions.
> 
> Here's an example using one of the guests on my system:
> 
> # virsh dominfo rstest_domainId:             -
> Name:           rstest_domain
> UUID:           746de06d-cb45-4efd-bc18-bf91d10bec84
> State:          shut off
> CPU(s):         1
> Max memory:     131072 kB
> Used memory:    130048 kB
> Autostart:      disable
> 
> We take the max and used memory values libvirt reports and then convert
> them based on the block size.
> 
> # wbemcli gi
> 'http://localhost:5988/root/virt:Xen_Memory.CreationClassName="Xen_Memo
> ry",DeviceID="rstest_domain/mem",SystemCreationClassName="Xen_ComputerS
> ystem",SystemName="rstest_domain"'
> -nl
> localhost:5988/root/virt:Xen_Memory.CreationClassName="Xen_Memory",Devi
> ceID="rstest_domain/mem",SystemCreationClassName="Xen_ComputerSystem",S
> ystemName="rstest_domain"
> <snip>
> 
> -TransitioningToState=12
> -SystemCreationClassName="Xen_ComputerSystem"
> -SystemName="rstest_domain"
> -CreationClassName="Xen_Memory"
> -DeviceID="rstest_domain/mem"
> 
> <snip>
> 
> -BlockSize=4096
> -NumberOfBlocks=32768
> -ConsumableBlocks=32512
> 
> <snip>
> --
> Kaitlin Rupert
> IBM Linux Technology Center
> kaitlin at linux.vnet.ibm.com
> 
> _______________________________________________
> Libvirt-cim mailing list
> Libvirt-cim at redhat.com
> https://www.redhat.com/mailman/listinfo/libvirt-cim




More information about the Libvirt-cim mailing list