Back to PerformanceManager

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.
  • Hosts: Memory refers to machine memory. Machine memory is the random-access memory (RAM) that’s actually installed in the hardware that comprises the ESX server system.

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.

For More Information

For in-depth technical background about VMware memory management architecture, including information about ballooning, swapping, page sharing, idle memory tax, memory reclamation, “touched” pages, and so on, see the USENIX Association publication, “Memory Resource Management in VMware ESX Server.”

See the Resource Management Guide for more information about configuring and managing resources, including memory.

Legend:V=VirtualMachine|H=HostSystem|R=ResourcePool|C=ComputeResource|D=OtherDevice
Counter StatsType Unit Levels RollupTypes Labels      Entity
VHRC
active absolutekiloBytes2 (4)average
(minimum)
(maximum)
Memory Active (Average)
Memory Active (Minimum)
Memory Active (Maximum)
Amount of memory that is actively used, as estimated by VMkernel based on recently touched memory pages.
  • Virtual machine:   Amount of guest “physical” memory actively used.
  • Host:  Sum of all active metrics for all powered-on virtual machines plus vSphere services (such as COS, vpxa) on the host.
consumed absolutekiloBytes1 (4)average
(minimum)
(maximum)
Memory Consumed (Average)
Memory Consumed (Minimum)
Memory Consumed (Maximum)
  • 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.

    vm consumed memory = memory granted - memory saved due to memory sharing

  • 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.
granted absolutekiloBytes2 (4)average
(minimum)
(maximum)
Memory Granted (Average)
Memory Granted (Minimum)
Memory Granted (Maximum)
Amount of machine memory or “physical” memory, as follows:
  • Virtual machine:   Guest “physical” memory that is mapped to machine memory. Includes shared memory amount. Does not include overhead.
  • Host:   Sum of all granted metrics for all powered-on virtual machines, plus machine memory for vSphere services on the host.
heap absolutekiloBytes2 (4)average
(minimum)
(maximum) (none)
Memory Heap (Average)
Memory Heap Free (Minimum)
Memory Heap Free (Maximum)
Memory Heap (None)
οοο
VMkernel virtual address space dedicated to VMkernel main heap and related data. For informational purposes only: not useful for performance monitoring.
heapfree absolutekiloBytes2 (4)average
(none)
Memory Heap Free (Average)
Memory Heap Free (None)
οοο
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 absolutenumber1latestWorst
Case
Allocation
οοο
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 absolutekiloBytes3averageMemory Usedοοο
Amount of used memory. Sum of the memory used by all powered on virtual machines and vSphere services on the host.
overhead absolutekiloBytes1 (4)average
(minimum)
(maximum)
(none)
Memory Overhead (Average)
Memory Overhead (Minimum)
Memory Overhead (Maximum)
Memory Overhead (None)
οο
Amount of machine memory allocated to a virtual machine beyond its reserved amount.
  • Virtual machine:   Amount of machine memory used by the VMkernel to run the virtual machine.
  • Host:   Total of all overhead metrics for powered-on virtual machines, plus the overhead of running vSphere services on the host.
reservedCapacity absolutemegaBytes2averageMemory Reserved Capacityοο
Total amount of memory reservation used by powered-on virtual machines and vSphere services on the host. Includes overhead amount.
shared absolutekiloBytes2 (4)average
(minimum)
(maximum)
(none)
Memory Shared (Average)
Memory Shared (Minimum)
Memory Shared (Maximum)
Memory Shared (None)
οο
  • Virtual machine:   Amount of guest “physical” memory shared with other virtual machines (through the VMkernel’s transparent page-sharing mechanism, a RAM de-duplication technique). Includes amount of zero memory area.
  • 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 absolutekiloBytes2 (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 absolutenumber2latestMemory Stateοο
Amount of free machine memory on the host. VMkernel has four free-memory thresholds that affect memory reclamation:
  • 0   (high)  Free memory >= 6% of machine memory minus Service Console memory.
  • 1   (soft)  4%
  • 2   (hard)  2%
  • 3   (low)  1%
0 (high) and 1 (soft):  Swapping is favored over ballooning.
2 (hard) and 3 (low):  Ballooning is favored over swapping.
swapped absolutekiloBytes2 (4)averageMemory Swapped (Average)
Memory Swapped (Minimum)
Memory Swapped (Maximum)
Memory Swapped (None)
οοο
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.

swapped = swapin + swapout
swapin absolutekiloBytes1 (4)average
(minimum)
(maximum)
(none)
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 ratekiloBytesPerSecond1averageMemory 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 absolutekiloBytes2 (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 ratekiloBytesPerSecond1 (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.
swaptarget absolutekiloBytes2average
(minimum)
(maximum)
(none)
Memory Swap Target (Average)
Memory Swap Target (Minimum)
Memory Swap Target (Maximum)
Memory Swap Target (None)
οοο
Amount of memory available for swapping. Target size for virtual machine swap file, as calculated by the VMkernel. The VMkernel uses values for this metric with the swap metric to stop and start swapping, as follows:
  • If swaptarget > swapped, the VMkernel can start swapping when necessary.
  • If swaptarget < swapped, the VMkernel stops swapping memory.
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.
swapunreserved absolutekiloBytes2 (4)average
(minimum)
(maximum)
(none)
Memory Swap Unreserved (Average)
Memory Swap Unreserved (Minimum)
Memory Swap Unreserved (Maximum)
Memory Swap Unreserved (None)
οο
Amount of memory that is unreserved by swap
swapused absolutekiloBytes2 (4)average
(minimum)
(maximum)
Memory Swap Used (Average)
Memory Swap Used (Minimum)
Memory Swap Used (Maximum)
οο
Amount of memory that is used by swap. Sum of memory swapped of all powered on VMs and vSphere services on the host.
sysUsage absolutekiloBytes2 (4) average
(minimum)
(maximum)
(none)
Memory Used by vmkernel
Amount of machine memory used by VMkernel for core functionality, such as device drivers and other internal uses. Does not include memory used by virtual machines or vSphere services.
totalmb absolutemegaBytes1averageMemory Total (Average)οοο
Total amount of machine memory of all hosts in the cluster that is available for virtual machine memory (physical memory for use by the Guest OS) and virtual machine overhead memory.

Memory Total = Aggregate host machine memory - (VMkernel memory + Service Console memory + other service memory)
unreserved absolutekiloBytes2 (4)average (minimum) (maximum) (none)Memory Unreserved (Average)
Memory Unreserved (Minimum)
Memory Unreserved (Maximum)
Memory Unreserved (None)
οοο
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.
usage absolutepercent1 (4)average (minimum) (maximum) (none)Memory Usage (Average)
Memory Usage (Minimum)
Memory Usage (Maximum)
Memory Usage (None)
ο
Memory usage as percentage of total configured or available memory.
  • Virtual machine:   Percentage of configured virtual machine “physical” memory:
    active ÷ virtual machine configured size
  • Host:   Percentage of available machine memory:
    consumed ÷ machine-memory-size
  • Cluster:  memory usage = memory consumed + memory overhead effectivemem
vmmemctl absolutekiloBytes1 (4)average (minimum) (maximum) (none)Memory Balloon (Average)
Memory Balloon (Minimum)
Memory Balloon (Maximum)
Memory Balloon (None)
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.
vmmemctltarget absolutekiloBytes2 (4)average (minimum) (maximum) (none)Memory Balloon Target (Average)
Memory Balloon Target (Minimum)
Memory Balloon Target (Maximum)
Memory Balloon Target (None)
οοο
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.)
zero absolutekiloBytes2 (4)average (minimum) (maximum) (none)Memory Zero (Average)
Memory Zero (Minimum)
Memory Zero (Maximum)
Memory Zero (None)
οο
Memory that is contains 0s only. Included in shared amount. Through transparent page sharing, zero memory pages can be shared among virtual machines that run the same operating system.
  • Virtual machine:   Amount of guest physical memory that contains 0s only and can thus be safely used by other virtual machines for their 0 pages memory requirement.
  • Host:   Sum of zero metrics for all powered-on virtual machines, plus vSphere services on the host.

 

Back to Top of page
Back to PerformanceManager