A virtual machine (VM) requires resources from a hypervisor, one of which is memory. When multiple VMs are on a physical server and require more resources than are available, a shortage occurs and VMs compete for resources.
In the case of a memory shortage, VMware has a number of mechanisms in place to handle memory shortages and limit the amount of performance degradation the VM experiences. These include include transparent page sharing, memory ballooning, and as a last resort, swapping guest memory to disk.
Balloon drivers are included in VMware Tools, which should be installed on each VM. When the memory is allocated to transfer memory shortages from the host to the VM, an alert is raised at the hypervisor level. The hypervisor compensates by assigning physical memory to the overworked VM—called swap memory. During memory swapping, memory will start being paged to disk which will impact performance if there isn’t enough memory to recover from the usage.
Three recommendations to prevent performance degradation on VMware: