6.5.1

Table Of Contents
Measuring and Differentiating Types of Memory Usage
The Performance tab of the vSphere Web Client displays several metrics that can be used to analyze
memory usage.
Some of these memory metrics measure guest physical memory while other metrics measure machine
memory. For instance, two types of memory usage that you can examine using performance metrics are
guest physical memory and machine memory. You measure guest physical memory using the Memory
Granted metric (for a virtual machine) or Memory Shared (for a host). To measure machine memory,
however, use Memory Consumed (for a virtual machine) or Memory Shared Common (for a host).
Understanding the conceptual dierence between these types of memory usage is important for knowing
what these metrics are measuring and how to interpret them.
The VMkernel maps guest physical memory to machine memory, but they are not always mapped one-to-
one. Multiple regions of guest physical memory might be mapped to the same region of machine memory
(when memory sharing) or specic regions of guest physical memory might not be mapped to machine
memory (when the VMkernel swaps out or balloons guest physical memory). In these situations,
calculations of guest physical memory usage and machine memory usage for an individual virtual machine
or a host dier.
Consider the example in the following gure, which shows two virtual machines running on a host. Each
block represents 4 KB of memory and each color/leer represents a dierent set of data on a block.
Figure 62. Memory Usage Example
The performance metrics for the virtual machines can be determined as follows:
n
To determine Memory Granted (the amount of guest physical memory that is mapped to machine
memory) for virtual machine 1, count the number of blocks in virtual machine 1's guest physical
memory that have arrows to machine memory and multiply by 4 KB. Since there are ve blocks with
arrows, Memory Granted is 20 KB.
n
Memory Consumed is the amount of machine memory allocated to the virtual machine, accounting for
savings from shared memory. First, count the number of blocks in machine memory that have arrows
from virtual machine 1's guest physical memory. There are three such blocks, but one block is shared
with virtual machine 2. So count two full blocks plus half of the third and multiply by 4 KB for a total of
10 KB Memory Consumed.
The important dierence between these two metrics is that Memory Granted counts the number of blocks
with arrows at the guest physical memory level and Memory Consumed counts the number of blocks with
arrows at the machine memory level. The number of blocks diers between the two levels due to memory
sharing and so Memory Granted and Memory Consumed dier. Memory is being saved through sharing or
other reclamation techniques.
vSphere Resource Management
42 VMware, Inc.