Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
VMware’s vSphere can achieve high levels of VM consolidation through the use, in part, of some highly effective memory sharing and resource allocation mechanisms, such as TPS and ballooning. Both of these memory management techniques enable an administrator to oversubscribe the amount of physical memory found in a host, while at the same time providing VMs with access to the required physical memory when necessary. The amount of memory in a physical server is a finite resource which must be shared between the host and its VMs. During times of heavy VM memory utilization, the host can use the two mentioned memory resource management techniques to reallocate physical memory to the requesting VMs.
Memory ballooning— This physical memory reclaiming technique is made possible by a driver (vmemctl) that is installed with VMware Tools on the guest OS. When the host detects that it is running out of memory it asks the vmemctl driver to allocate RAM from the guest OS (it inflates an imaginary “balloon”) which starts the guest OS paging up to 65% (default) of its memory out to disk (page swapping). This frees up available physical memory for the host to reallocate elsewhere. This balloon expands and contracts as needed and reacts to what is happening in physical memory on the host.
ESX/ESXi page swapping— Page swapping helps to reduce the memory footprint of a VM and only occurs when the host has exhausted the amount of physical memory it is able to free up through the use of memory ballooning. At this point, the host will start to swap out parts of the VM’s memory without taking into account what parts of the VM’s memory it is seizing and writing out to disk. This is less than desirable, as it can seriously impact the performance of a VM, so as such, ESX/ESXi page swapping is seen as a last resort.