Professional Documents
Culture Documents
Module 9
By the end of this lesson, you should be able to meet the following
objectives:
Describe how memory is used in a virtualized environment
Explain each memory-reclamation technique
Explain how memory overcommitment impacts performance
virtual machine
virtual machine
application
guest
OS
memory size
total amount of memory
presented to a guest OS
guest
OS
hypervisor
A C
A B VM A B C VM D
B D
swap swap
A file B file
1
1
0
SSD
1
0
0
1
main memory
guest
OS
hypervisor
hypervisor
(4GB)
Remaining memory 1%
Soft Ballooning
Examples:
By the end of this lesson, you should be able to meet the following
objectives:
Monitor host memory usage and virtual machine memory usage
Monitor host swapping activity
Monitor host ballooning activity
Why is guest/host memory usage different than what I see inside the
guest operating system?
Guest physical memory:
• Guest has better visibility while estimating active memory.
• ESXi active memory estimate technique can take time to converge.
Host physical memory:
• Host memory usage does not correspond to any memory metric within the
guest.
• Host memory usage size is based on a virtual machine’s relative priority on
the physical host and memory usage by the guest.
Possible states:
high, soft, hard,
and low
PCI hole
VMKMEM
Total memory
swapped for all
virtual machines on
host
percentage of time
virtual machine has
waited for swap
activity
memory balloon
statistics for the host
Is the balloon
driver installed?
Case 1: Case 2:
Baseline Data after
data workloads started
VM VM
128MB 128MB 1GB
1GB RAM RAM RAM RAM
By the end of this lesson, you should be able to meet the following
objectives:
Describe various memory performance problems
Discuss causes of memory performance problems
Propose solutions to correct memory performance problems
No
Yes
No Yes
Yes
No
Yes
Cause Solution
Swap target is
more for the virtual
machines without
the balloon driver.
Virtual
MCTL: N – Balloon machine with
memory-
driver not active, balloon driver
hog virtual
tools probably not swaps less.
machines
installed
Cause Solution
Allocate enough memory to hold the working set of applications you will
run in the virtual machine, thus minimizing swapping.
Never disable the balloon driver. Always keep it enabled.
Keep transparent page sharing enabled
Avoid overcommitting memory to the point that it results in heavy
memory reclamation.
Questions?