Memory overcommitment explained

Memory overcommitment is a process of allocating more memory for VMs than the host physically has. For example, if you have an ESXi host with 6GB memory and run five virtual machines with 2GB memory each, the host machine’s memory is overcommited. This is possible because virtual machines mostly don’t use their full allocated memory. VMkernel (the hypervisor used by ESXi) also uses several other techniques to minimize VM’s memory usage:

  • memory from idle virtual machines is transfered to virtual machines that need more memory.
  • memory compression is enabled by default on ESXi hosts in order to improve virtual machine performance when memory is overcommitted.
  • memory overhead is stored in a swap file (.vswp) on the datastore.
Geek University 2022