6.7

Table Of Contents
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 difference 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 specific 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 differ.
Consider the example in the following figure, which shows two virtual machines running on a host. Each
block represents 4 KB of memory and each color/letter represents a different set of data on a block.
Figure 62. Memory Usage Example
virtual machine
1
guest virtual memory
guest physical memory
machine memory
e
e
e
f
f
f
a
a
a
a
a
b
b
b
b
b
c
c
c c
c
d
d
d
virtual machine
2
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 five 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 difference 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 differs between the two levels due to memory
sharing and so Memory Granted and Memory Consumed differ. Memory is being saved through sharing
or other reclamation techniques.
vSphere Resource Management
VMware, Inc. 44