Memory Counters

Performance counters are modeled using the PerfCounterInfo data object type. Each instance of a PerfCounterInfo data object contains metadata about a specific metric available from the system. The memory group (mem)of performance counters documented on this page are available from the PerformanceManager service interface.

Memory Management and the VMkernel

The VMkernel maps guest physical memory to machine memory. However, because of the VMkernels unique memory-management techniques, such as ballooning, memory-sharing, swapping, and other techniques, guest physical memory-to-machine memory mapping does not have a 1:1 correspondence. Specifically, the VMkernel can:

Map multiple regions of guest physical memory to a single region of machine memory (which the VMkernel does for memory sharing among virtual machines)

Leave specific regions of guest physical memory and machine memory unmapped (which the VMkernel does during swapping and ballooning)

Many of the VMkernels memory-management techniques require that VMware Tools be installed on the virtual machine. Be sure that the appropriate guest-OS-specific version of VMware Tools is installed on each virtual machine.

Guest Physical Memory Compared to Machine Memory

Each counter definition in this table should be interpreted in the context of the entity to which it applies, as follows:

Virtual machines: Memory refers to guest physical memory. Guest physical memory is the amount of physical memory presented as a virtual-hardware component to the virtual machine, at creation time, and made available when the virtual machine is running.

Memory Swapping

The VMkernel uses a "share before swap" optimization to reduce memory paging. Regardless of the page size in memory,
the kernel uses a 4KB swap page size. The kernel will attempt to share 4KB pages; those pages that cannot be shared
are swapped.

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.

Host: 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.

host consumed memory = total host memory - free host memory

Cluster: Amount of host machine memory used by all powered on virtual machines in the cluster.
A cluster's consumed memory consists of virtual machine consumed memory and overhead memory.
It does not include host-specific overhead memory, such as memory used by the service console or VMkernel.

Free address space in the VMkernels main heap. Varies based on number of physical devices and configuration options. There is no direct way for the user to increase or
decrease this statistic. For informational purposes only: not useful for performance monitoring.

mementitlement

absolute

number

1

latest

WorstCaseAllocation

ο

•

ο

ο

Memory allocation as calculated by the VMkernel scheduler based on current estimated demand and reservation, limit, and shares policies set for all virtual machines and resource pools in the host or cluster. This counter is for internal use only and is not useful for performance monitoring.

memUsed

absolute

kiloBytes

3

average

Memory Used

ο

•

ο

ο

Amount of used memory. Sum of the memory used by all powered on virtual machines and vSphere services on the host.

Host: Sum of all shared metrics for all powered-on virtual machines,
plus amount for vSphere services on the host. The host's shared memory may be larger than the amount of machine
memory if memory is overcommitted (the aggregate virtual machine configured memory is much greater than
machine memory). The value of this statistic reflects how effective transparent page
sharing and memory overcommitment are for saving machine memory.

sharedcommon

absolute

kiloBytes

2 (4)

average(minimum)(maximum)(none)

Memory Shared Common (Average)Memory Shared Common (none)Memory Shared Common (Minimum)Memory Shared Common (Maximum)

•

•

ο

ο

Amount of machine memory that is shared by all powered-on virtual machines and vSphere services on the host. Subtract this metric from the shared metric to gauge how much machine memory is saved due to sharing:
shared - sharedcommon = machine memory (host memory) savings (KB)

state

absolute

number

2

latest

Memory State

•

•

ο

ο

One of four threshold levels representing the percentage of free memory on the host.
The counter value determines swapping and ballooning behavior for memory reclamation.

Current amount of guest physical memory swapped out to the virtual machine's swap file by the VMkernel.
Swapped memory stays on disk until the virtual machine needs it. This statistic refers to VMkernel
swapping and not to guest OS swapping.

Memory Swap In (Average)Memory Swap In (Minimum)Memory Swap In (Maximum)Memory Swap In (None)

•

•

ο

ο

Refers to VMkernel swapping. Amount swapped-in to memory from disk.

Virtual machine: Total amount of data that has been read into machine memory from the swap file since the virtual machine was powered on.

Host: Sum of swapin values for all powered-on virtual machines on the host.

swapinRate

rate

kiloBytesPerSecond

1

average

Memory Swap In Rate

•

•

ο

ο

Rate at which memory is swapped from disk into active memory during
the interval. This counter applies to
virtual machines and is generally more useful than the swapin counter to determine
if the virtual machine is running slow due to swapping, especially when looking at real-time statistics.

swapout

absolute

kiloBytes

2 (4)

average(minimum)(maximum)(none)

Memory Swap Out (Average)Memory Swap Out (Minimum)Memory Swap Out (Maximum)Memory Swap Out (None)

•

•

ο

ο

Amount of memory swapped-out to disk.

Virtual machine: Total amount of data that the VMkernel has written to the virtual machines
swap file from machine memory. This statistic refers to VMkernel swapping and not to guest OS swapping.

Host: Sum of swapout metrics from all powered-on virtual machines on the host.

swapoutRate

rate

kiloBytesPerSecond

1&nbsp(4)

average(minimum)(maximum)(none)

Memory Swap Out Rate

•

•

ο

ο

Rate at which memory is being swapped from active memory to disk during the current interval.
This counter applies to virtual machines and is generally more useful than the swapout counter
to determine if the virtual machine is running slow due to swapping, especially when
looking at real-time statistics.

Since swapped memory stays swapped until the virtual machine
accesses it, swapped memory can be greater than the memory swap target,
possibly for a prolonged period of time. This simply means that the
swapped memory is not currently needed by the virtual machine and is
not a cause for concern.

Amount of memory that is unreserved. Memory reservation not used by the Service Console, VMkernel, vSphere services and other powered on VMs user-specified memory reservations and overhead memory. This statistic is no longer relevant to virtual machine admission control, as reservations are now handled through resource pools.

Amount of memory allocated by the virtual machine memory control driver (vmmemctl), which is installed with VMware Tools. Its a VMware exclusive memory-management driver that controls ballooning.

Virtual machine:
Amount of guest physical memory that is currently reclaimed from the virtual machine
through ballooning. This is the amount of guest physical memory that has been allocated
and pinned by the balloon driver.

Host: The sum of all vmmemctl values for all powered-on virtual machines, plus vSphere services on the host. If the balloon target value is greater than the balloon value, the VMkernel inflates the
balloon, causing more virtual machine memory to be reclaimed. If the balloon target value is less than the balloon value, the
VMkernel deflates the balloon, which allows the virtual machine to consume additional memory if needed.

Virtual machines initiate memory reallocation. Therefore, it is possible
to have a balloon target value of 0 and balloon value greater than 0.

Target value set by VMkernal for the virtual machines memory balloon size. In conjunction with vmmemctl metric, this metric is used by VMkernel to inflate and deflate the balloon for a virtual machine, as follows:

If vmmemctltarget > vmmemctl, VMkernel can inflate the balloon and make machine memory currently consumed by the virtual machine available to other virtual machines on the host. (Size of vmmemctl increases as balloon inflates.)

If vmmemctltarget < vmmemctl, VMkernel deflates balloon so that virtual machine can consume more memory, when needed. (Size of vmmemctl decreases as balloon deflates.)