VMware Cloud Community
jshute
Contributor
Contributor
Jump to solution

Memory metrics in Virtual Center. A true measure of Host memory by a Guest.

What set of Virtual Center metrics will provide the true amount of memory that a guest "uses"? I am running at level 2 detail at this point.

The consumed seems to key off of the granted, which is misleading to me. Granted seems like how much the guest is "given. The consumed gets closer by taking into account the shared memory efficiencies.

So.. Active + what?? = memory used by the guest on the host.

Could this number be summed to find out all the memory used on the host? Does it consider the overhead/kernel?

I have reviewed the wiki and it is not clear what adds together to get the number I am looking for.

Thanks for any help,

John

Reply
0 Kudos
1 Solution

Accepted Solutions
kjb007
Immortal
Immortal
Jump to solution

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.

-KjB

vExpert/VCP/VCAP vmwise.com / @vmwise -KjB

View solution in original post

Reply
0 Kudos
10 Replies
kjb007
Immortal
Immortal
Jump to solution

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.

-KjB

vExpert/VCP/VCAP vmwise.com / @vmwise -KjB
Reply
0 Kudos
jshute
Contributor
Contributor
Jump to solution

To clarify.

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

Reply
0 Kudos
kjb007
Immortal
Immortal
Jump to solution

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.

-KjB

vExpert/VCP/VCAP vmwise.com / @vmwise -KjB
Reply
0 Kudos
jshute
Contributor
Contributor
Jump to solution

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.

Thanks, John

Reply
0 Kudos
kjb007
Immortal
Immortal
Jump to solution

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.

-KjB

vExpert/VCP/VCAP vmwise.com / @vmwise -KjB
Reply
0 Kudos
jshute
Contributor
Contributor
Jump to solution

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?

John

Reply
0 Kudos
kjb007
Immortal
Immortal
Jump to solution

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.

Good luck.

-KjB

vExpert/VCP/VCAP vmwise.com / @vmwise -KjB
Reply
0 Kudos
Phil_White
Enthusiast
Enthusiast
Jump to solution

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?

Reply
0 Kudos
kjb007
Immortal
Immortal
Jump to solution

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.

vExpert/VCP/VCAP vmwise.com / @vmwise -KjB
Reply
0 Kudos
abaum
Hot Shot
Hot Shot
Jump to solution

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?

adam

Reply
0 Kudos