Memory resource management is a key player in the ability of vSphere systems to over-commit resources and thereby maximize the utilization of an ESXi host. Over-commitment allows the active memory of a system to perform as close to 100% as possible. vSphere achieves this by using several innovative techniques to reclaim virtual machine memory, which are:
- Transparent page sharing (TPS)—removes redundant pages with identical content
- Ballooning—artificially increases the memory pressure inside the guest
- Memory compression—compresses the pages that need to be swapped out
- Hypervisor swapping—ESXi directly swaps out the virtual machine’s memory
- Swap to host cache (swap to SSD)—reclaims memory by storing the swapped out pages in the host cache on a solid-state drive
New to vSphere 5 is swap to host cache, also known as swap to SSD. This is a memory management technique that takes place after ballooning, transparent page sharing, and memory compression have already been tried to free memory. It is an alternative that gives better performance than hypervisor swapping. In the test environment employed, swapping to SSD performed 30% better than hypervisor swapping in the same test system.
A recently-published technical white paper describes how memory management works in ESXi, details the configuration options available, and provides results to show the performance impact of these options.
Data in several tests that appeared in earlier versions of the paper is also updated for vSphere 5.
For the full paper, see Understanding Memory Resource Management in VMware vSphere 5.