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_Memory",DeviceID="rstest_domain/mem",SystemCreationClassName="Xen_ComputerSystem",SystemName="rstest_domain"'
-nl
localhost:5988/root/virt:Xen_Memory.CreationClassName="Xen_Memory",DeviceID="rstest_domain/mem",SystemCreationClassName="Xen_ComputerSystem",SystemName="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(a)linux.vnet.ibm.com