Host memory = Guest consumed + Overhead.
The active guest memory does not take into account host memory used for shadow pages, but you can get the host utilization by summing overhead and guest consumed memory.
Host memory used by a guest = mem.consumed.average + mem.overhead.average?
I have seen reference to the consumed starting from the granted number. Is this not correct?
To refine the question
The amount needed by the guest = mem.active.average + mem.everhead.average?
Does this include any shared memory and can it be summed at a host level?
Thanks in advance, John
Yes, consumed + overhad = host memory usage.
Consumed can be as high as granted, so total host usage can be more than the total granted to a guest.
The amount in use by the guest, is the memory.active.average. I'm not sure what you're asking here, because the amount needed by the guest is still the consumed + overhead.a
Shared memory is not referenced here with these counters. You can get that from mem.shared.average, but getting that from your cluster would give you shared memory at that level.
So what is in the consumed metric as compared to the active metric?
GUEST_OS CurrentGrantedMB AvgConsumed AvgSharedMB AvgOverheadMB AvgActiveMB
winNetStandardGuest 2,000 1,460 540 52 125
winNetStandardGuest 2,000 1,652 348 51 132
winNetStandardGuest 2,559 2,480 79 107 375
From the description in the Performance doc mentioned earlier, the active really sounds like the right metric.
" The amount of memory used by the VM in the past small window of time. This is the "true" number of how much memory the VM currently has need of. Additional, unused memory may be swapped out or ballooned with no impact to the guest's performance."
Just trying to reconcile the difference with limited authorative source.
The problem here is semantics. The active memory is how many blocks in memory is actually being written to. The consumed includes memory that may be reserved, but not actually used. So, from the OS perspective, the consumed is how much is in use. The active memory is how much ESX thinks the guest is actually using.
For instance, for java apps, the jvm can reserve memory, and that memory will have zeroes written to it to "reserve" the memory for future use. To the guest, that memory is all in use. To the ESX host, only the pages written to are active.
Hope that makes sense.
Thanks for the clarification!
So, the active metric is a true measure of what is being used by a guest on ESX after all the tricks VMware has to optimize (minimize) real memory utilization.
The consumed would be the amount of ESX memory that would be required if the guest actually needed to use all the real memory it said it needed (less any shared memory savings between guests).
Therefore when looking at capacity, it is going to be a balancing act between the two?
Yes, that's about right. But it's a lot easier said then done. Not enough, and the vm swaps, too much and you lower capacity.
i'm still a little lost on this...
What is Host Memory Usage and what is Guest Memory Usage? My understanding is that Host is how much the host is holding for that VM in case the VM actually needs it. My understanding of guest is how much memory is actually being used. Is that about right?
Host usage is how much of the host's memory is currently being used to run the guest. That includes the memory the guest is consuming and the overhead for managing that memory. This consumed amount varies and can be more than what the guest believes is in use, because the host can not reclaim memory it has given to the guest directly without ballooning. It has no way to know which pages are no longer in use by the guest. The guest requests memory, and the host gives it, and the guest will mark it in use, and the host will mark it as used. When the guest no longer needs it, it just stops using the specific pages, but does not mark them as unused, so the host has no way to know which pages are in use and which are not. So, the consumed is more than in use.
Hope that is more clear.
I could use a bit more clarification. I have a guest configured for 20GB RAM. According to VC, the overhead is 650MB, Host Mem Usage is 5GB, and Guest Mem Usage is 1GB. Are you saying that the guest is allocating 5GB (+ overhead) from the host but only actively using 1GB?