VMware Cloud Community
MiEggy
Contributor
Contributor

Seeking help to understand Memory counters

Can you help me understand details of some of the Memory Counters? Two of us here are struggling to get a clear understanding.

I found these documents helpful, but am looking for even more info to describe the counters.

http://communities.vmware.com/docs/DOC-5600 - VirtualCenter Performance Counters

http://communities.vmware.com/docs/DOC-5430 - Memory Performance Analysis and Monitoring

We're particularly interested in "Mem Shared", "Mem Shared Common" and related counters.

Can you recommend additional documentation, or definitions?

Thanks

Pete

0 Kudos
2 Replies
nick_couchman
Immortal
Immortal

For the two terms you asked about specifically, here's the best explanation I can give...VMware implements a technology called "memory sharing." This technology allows common (identical) memory in two different VMs to be shared. This means that, if you create two Windows XP virtual machines, and those machines are running the exact same patches, etc., in Windows, and each of them has loaded 128MB of identical files into RAM, your host will recognize that the memory is exactly same and will not duplicate the contents of that memory. While this does incur a performance penality due to the copy-on-write technology that has to be enabled (e.g. if one of the VMs changes one of the "shared" locations in memory, the data cannot be changed directly, it must be copied to a new location and then changed), it allows you to "overallocate" RAM on your host machine to your virtual machines. This really pays off when you're implementing something like VDI. If you have a machine with 8GB of RAM and you're going to be running Windows XP virtual machines, with each VM running the exact same set of applications, you may be able to run 12 VMs each with 1GB of RAM allocated. Even though 12 x 1GB = 12GB, the memory sharing that VMware does means that all of the common memory for each of those VMs will be shared, so you may still be under the 8GB physical memory limit in terms of actual physical memory usage.

So, the two counters are described in the document you referenced as follows:

Shared memory

mem.shared.average


Shared memory represents the entire pool of shareable memory. For

instance, if two VMs each have 500M of identical memory, the shared

memory is 1G.

Shared common memory

mem.sharedcommon.average


Shared common memory represents the footprint in machine memory as

a result of memory sharing. For instance, if two VMs each have 500M of

identical memory, the shared common memory is 500M.

Shared memory is VMware's way of adding up all of the memory that it sees as identical between the VMs. As the description says, if two VMs share 500MB of memory, shared memory = 1GB. If three VMs share 1GB of memory, shared memory = 3GB. If two VMs share 500 MB of memory and three VMs share 1GB of memory, shared memory = 4GB.

Shared common memory is the actual physical RAM usage of the shared memory. So, again, as the description says, two VMs with 500MB of identical memory = 500MB shared common memory. Three VMs with 500MB of identical memory = 500MB of shared memory. Two VMs with 500MB of identical memory and three other VMs with 1GB of identical memory = 1.5GB (1500MB) shared common memory.

I hope that helps some...

0 Kudos
MiEggy
Contributor
Contributor

Nick,

Thanks! That makes things much clearer. Especially your comments of "Shared memory is VMware's way of adding up all of the

memory that it sees as identical between the VMs." and

"Shared common memory is the actual physical RAM usage of the shared memory."

Pete

0 Kudos