VMware Cloud Community
shane_presley
Enthusiast
Enthusiast

Consumed Host Memory vs Active Guest Memory

Could someone explain the "Consumed Host Memory" and "Active Guest Memory" as displayed in the vCenter Client?

I have a RedHat VM that is assigned 4GB, but Consumed is about 1.3GB, Active is 600MB.

Thanks

11 Replies
lamw
Community Manager
Community Manager

Here is the definition from the vSphere API reference document for memory metric for the various entities:

Consumed Host Memory - Amount of machine memory used on the host. Consumed memory includes Includes memory used by the Service Console, the VMkernel, vSphere services, plus the total consumed metrics for all running virtual machines.

Active Guest Memory - Amount of guest “physical” memory actively used.

Another set of good documents for performance metric information are these as well:

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

Twitter: @lamw

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Community

If you find this information useful, please award points for "correct" or "helpful".

Reply
0 Kudos
shane_presley
Enthusiast
Enthusiast

Thanks, those docs were helpful. The explanation of the memory counters seems to make sense, but it's still not clear to me as it's presented within the vCenter Client.

"Consumed Host Memory" is show on every VM summary page, and seems to represent the memory usage that the VM is using, not the host overall. For example on vm1 it might show 600MB and on vm2 it might show 8000MB.

So I don't think it includes service console or anything else. It seems to be representing what that single VM is using on the host. But then I'm not sure how that compares to Active Memory (which is always much lower).

Reply
0 Kudos
lamw
Community Manager
Community Manager

If you're looking at the VM tab, there are 3 columns that you may be seeing:

"Host CPU - MHz"

"Host Mem - MB"

"Guest Mem- %"

The metrics here is showing you how much of a particular VM is consuming from the ESX(i) host that it's being hosted on. Yes, you're correct that active memory is generally lower but it does not always have to be. This is just a metric to show you how much of that memory is actually being actively used from the overall allocated memory.

For example I have a 2vCPU x 2GB vMEM

Consumed cpu is 359 Mhz from the host

Consumed mem is 1.67GB from the host (this is what the host has allocated to the VM)

Active guest mem 204 MB (the current amount of active guest memory in the OS)

When you asked earlier what is "Consumed memory", I thought you were referring to the ESX(i) host metrics. The values you're looking at here, refers to a VM and per the reference doc:

"Consumed Memory" for a VM is:

Virtual machine: Amount of guest physical memory consumed by the virtual machine for guest memory. Consumed memory does not include overhead memory. It includes shared memory and memory that might be reserved, but not actually used. Use this metric for charge-back purposes.

Hopefully this makes more sense.

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

Twitter: @lamw

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Community

If you find this information useful, please award points for "correct" or "helpful".

skayser
Enthusiast
Enthusiast

William already pointed out the definitions of active vs. host memory. Let me add another 2c: what tends to confuse people is a rather high consumed host memory versus a low active guest memory ... usually followed by the question on how exactly active guest memory is calculated. Understanding Memory Resource Management in VMware® ESX™ Server includes some background for both.

1) Why is consumed host memory usage higher than active guest memory? (p.5)

"The hypervisor knows when to allocate host physical memory for a virtual machine because the first memory access from the virtual machine to a host physical memory will cause a page fault that can be easily captured by the hypervisor. However, it is difficult for the hypervisor to know when to free host physical memory upon virtual machine memory deallocation because the guest operating system free list is generally not publicly accessible. Hence, the hypervisor cannot easily find out the location of the free list and monitor its changes."

So the host allocates memory pages upon their first request from the guest (that's why consumed is less than the configured maximum), but doesn't deallocate them once they are freed in the guest OS (because the host simply doesn't see those guest deallocations). If the guest OS re-uses such previously allocated pages, the host won't allocate more host memory. If the guest OS however allocates different pages, the host will also allocate more memory (up to the point where all configured memory pages for the specific guest have been allocated).

2) How is active guest memory calculated? (p.12)

"At the beginning of each sampling period, the hypervisor intentionally invalidates several randomly selected guest physical pages and starts to monitor the guest accesses to them. At the end of the sampling period, the fraction of actively used memory can be estimated as the fraction of the invalidated pages that are re-accessed by the guest during the epoch".

In other words, the active guest memory is calculated from outside the guest by an approximation on the hypervisor level.

HTH

Sebastian

maxel
Enthusiast
Enthusiast

11199_11199.JPG

but how this could be? 204 MB Active

but 4 GB consumed?

Its a Win2008 R2 System...

+However, it is difficult for the hypervisor to know when to free host

physical memory upon virtual machine memory deallocation because the

guest operating system free list is generally not publicly accessible.

Hence, the hypervisor cannot easily find out the location of the free

list and monitor its changes."+

But with VMware Tools installed.. is'nt there a way to find out the free pages to release them?

Reply
0 Kudos
bobalob
Contributor
Contributor

|     but how this could be? 204 MB Active

|

|     but 4 GB consumed?

My guess on this is that Server 2008 uses all available memory for file cache. If you take a look at memory in resource manager in the guest, you will see that all available RAM is consumed. 204 MB Active comes from recently accessed memory, you probably aren't using the cached sections of memory much on that server, but it's consumed because the host allowed all the memory to be allocated to windows when it first asked for it to use for cache.

Reply
0 Kudos
Taz79
Contributor
Contributor

So if i understand all this correctly.. I have an additional question to all this..

Let say that i have a Host with 32GB RAM

4 x guest VM's on the host

Can i configure those 4 hosts with 12GB each for example = total 48 GB ram? Would that work?

I mean as long as the active memory is not higher than 32GB in total for all guest systems this should be ok?

So my real question is can consumed memory be shared between guest VM:s?? Smiley Happy

Reply
0 Kudos
Gkeerthy
Expert
Expert

Taz79 wrote:

So if i understand all this correctly.. I have an additional question to all this..

Let say that i have a Host with 32GB RAM

4 x guest VM's on the host

Can i configure those 4 hosts with 12GB each for example = total 48 GB ram? Would that work?

defnitly you can overcommit, and it will work. vmware manages by using the memory management methods like TPS, baloonig etc.

I mean as long as the active memory is not higher than 32GB in total for all guest systems this should be ok?

yes this will be ok... as long as the active memory is below 32, but you need to consider the overhead also. but the extreme over commitment is not recomended in production.

So my real question is can consumed memory be shared between guest VM:s?? Smiley Happy

yes it can share.

Please don't forget to award point for 'Correct' or 'Helpful', if you found the comment useful. (vExpert, VCP-Cloud. VCAP5-DCD, VCP4, VCP5, MCSE, MCITP)
Reply
0 Kudos
Taz79
Contributor
Contributor

Thank you for that super fast reply! Smiley Happy

Heart

Reply
0 Kudos
Jimdotcom
Contributor
Contributor

Thanks; this response clearly explains the difference between the two metrics.

Reply
0 Kudos
maxel
Enthusiast
Enthusiast

Ich bin bis einschließlich 07.2.2014 nicht erreichbar. E-Mails werden in dieser Zeit nicht gelesen.

Bei dringenden Problemen wenden Sie sich bitte an den Helpdesk SI (Tel: 061519371555)

--

Mit freundlichen Gruessen!

Axel Mueller

+

Reply
0 Kudos