In this article the benefits and drawbacks of offloading the ESX VM Swap files to local storage are discussed.
The size of the .vswp file is equal to the memory size allocated to the VM, minus any memory reservation assigned to the VM. As an example, assume a virtual desktop with Windows 7 has 2GB RAM and 1GB memory reservation. In this case the .vswp file is 1GB.
In a deployment with 1000 virtual desktop with 2GB RAM and without any memory reservation would be possible to save approximately 3TB of SAN storage when allowing the placement of .vswp on local storage. Using the same numbers, would be required approximately 192GB of local storage to host VM swap files in each host. (bear in mind I am making some assumptions to show you these numbers).
The main benefits of offloading the VM Swap files to local storage are:
- Reduction of the shared storage datastores based on number of desktops per datastore, memory allocated to a VM and its reservation.
- Reduction of read/write I/O from shared storage, reducing overall I/O profile.
There are also downsides that should be observed when allowing VM Swap file placement to local storage:
- Slight impact on performance of vMotion and HA operations.
- Slight increased CPU and memory requirement on the ESX host to handle the I/O for local .vswp files.
- Increased local storage requirement on ESX hosts based on number of desktops per datastore, memory allocated to a VM and its reservation.