- To confirm the issue, start
esxtop and open the memory tab using the "m" key
- The information after "MEM overcommit avg" shows if there is any memory oversubscription, values higher than 0 mean that more memory has been configured for virtual machines than is available as physical RAM
- The SWCUR column will display the amount of memory which is current swapped
- The SWTGT column shows the swap target, aka the amount of memory that needs to swapped overall
- The columns SWR/s and SWW/s show the rates with which memory is current read from or written to the swap file
- For example:

- Notice the "high state" at the end of the 3rd line. This state means that ESXi has ample memory available. ESXi knows different memory states, depending on how much free memory is available, High state > Clear state > Soft State > Hard State > Low State
- High state means that the host itself has ample memory free
- The ESXi does nonetheless swap
- This means that in the example the host would have enough free memory, but it cannot assign it to one or more virtual machines, indicating that these VM(s) are memory-limited.
- To confirm this, review the VM settings of all virtual machines running on the host. Expand "Memory" and check the Limit:

- Alternatively you can review the .vmx configuration file and look for the option "sched.mem.max"
- This setting defines the maximum amount of memory that the VM can use. Even if the VM is configured with a larger amount of memory, the limit restricts the VM to a maximum of this value.
- To stop the VM from swapping, change this limit to Unlimited and reload the VMX using Reloading a vmx file without removing the virtual machine from inventory
Note: Please be aware that even after applying these steps, ESXi will not immediately swap in every single memory page that has been swapped out earlier. Instead it will do this gradually over time. To confirm that the memory is being swapped back in, compare the SWCUR and SWTGT columns in esxtop and verify that SWTGT is smaller than SWCUR