Do you feel like your vSphere 4,x servers seem are consuming more memory than they used to?
Does vCenter indicate, or alarm, that host memory utilization is consistently high?
Do you have a funny feeling that Transparent Page Sharing (TPS) isn’t reclaiming memory?
Turns out there is some confusion about how and when TPS works with Large Memory Pages. Ever since ESX 3.5, if your CPU leveraged a hardware MMU (ie: AMD RVI or Intel EPT), large memory pages (sized at 2Mb each) are used for performance benefit instead of 4Kb pages. But since TPS only works with 4Kb pages, this means that TPS does not come into play – until – the host is under memory pressure and begins breaking 2Mb pages into 4Kb pages for TPS reclamation. If you’re not looking at the right combination of counters, you would wrongly assume the host is out of memory and stop adding workloads to it.
Background: Transparent Page Sharing (TPS) in hardware MMU systems
The reality is that you can continue to add workloads, over committing the physical memory until TPS, Ballooning and Memory Compression can no longer manage that memory pressure and you start to swap to disk. Remember, swapping is very bad. In the past, many administrators have used only memory utilization to predict when their hosts are out of memory and performance may suffer. Since memory is consumed first and shared second, this counter is not a good measure of memory capacity.
Some other counters to consider in combination:
- Active – Amount of memory that is actively used, as estimated by VMkernel based on recently touched memory pages.
- Swapped – Current amount of guest physical memory swapped out to the virtual machine’s swap file by the VMkernel.
- Swap In Rate – Rate at which memory is swapped from disk back into memory – if you see this consistently, it’s too late.
Also remember that use of reservations will have an effect on these counters. Example: If you have a host with large percentage of memory reserved by guests and those guests are idle, using only the active memory counter it would seem you might have more capacity left, but the reservation is not subject to memory reclamation techniques like TPS. So you might add workloads only to find swapping occurs.
Capacity Planning and Management is more complex then reviewing a couple of host counters because things like clusters and reservations must be considered. If you’re interested in a purpose-built tool I’d suggest evaluating VMware’s Capacity IQ. Proper planning for capacity is important as otherwise performance suffers.



