[libvirt-users] How to measure memory utilizatin of guest when dommemstat reports "RSS" is more than "ACTUAL"?

Martin Kletzander mkletzan at redhat.com
Tue Mar 8 15:18:47 UTC 2016


On Tue, Mar 08, 2016 at 12:12:45PM +0000, suyog jadhav wrote:
>How to measure memory utilizatin of guest when dommemstat reports "RSS" is more than "ACTUAL"?
>
>
>Following is the output on RHEL 6.6
>
># dommemstat 1
>actual 16777216
>rss 16890372
>
># dommemstat 2
>actual 16777216
>rss 16460516
>
>I found following article on Redhat which suggests that this is normal/expected?
>
>https://access.redhat.com/solutions/2017943
>

And that link explains everything you are asking for here.

>Now we use following formula to calculate the memory utilization.
>
>mem_util = (rss/actual)*100
>
>now this gives more that 100% as the result.
>
>We use the libvirt library to call the virDomainMemoryStats. (which is the same used by the "virsh dommemstat" command)
>If we can't use the RSS as the "used memory", what else should be used to calculate the same?
>What is the ideal approach to report memory utilization of guest from the KVM host?

It depends what do you mean by "used memory".  The memory the process
uses?  Yes, you can use RSS.  The memory that's actually being used in
the guest?  No, you can't use it, that's not relevant.  How much of the
memory is not being occupied by the balloon?  No, you cannot use RSS for
that.  There are many scenarios to this.  Check how libvirt (and
possibly qemu) works regarding memory allocations etc. in case you need
more info about what which domain does/uses.

>_______________________________________________
>libvirt-users mailing list
>libvirt-users at redhat.com
>https://www.redhat.com/mailman/listinfo/libvirt-users
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20160308/af6efbcd/attachment.sig>


More information about the libvirt-users mailing list