Answering the question that always seems to get asked, “what is the best practice for the VMware SWAP file?”
I’ve put this method through bench testing and found it to have the best performance, step by step for VMware SWAP file configuration is:
- Set up a data store in each ESXi cluster for guest SWAP files, see diagram to the right. (Do not use local ESX disks! This will save more expensive SAN storage but causes latency for DRS and vMotioning of VMs.)
- For each ESX host in the cluster, configure the SWAP to point to the SWAP data store.
- Go through all the setting on each VM in the cluster and make sure VM SWAP file are controlled by the host, not in VM folder.
- Here’s a step that some will disagree on but my testing has found it to produce the best VM performance, log into the Windows VM and set the SWAP file to be maintained by Windows. Some admins like to do 2.5 – 3.5 ratio for the memory but this is not a physical so let Windows adjust the SWAP file size. From what I have found it’s a 1:1 ratio.
- Configure 1 – 3 the same for Linux but on 4 just let Let Linux do it’s own thing. Linux uses a SWAP volume which is stored in the VM’s folder.
VMware SWAP File Test Results My test results produced: Faster VM Booting, Better VM Performace, Faster vMotioning and DRS, Faster VM evacuation when ESXi host is entering maintenance mode. In the end, the goal is to avoid slow VM performance.
Another useful VMinstall post on the SWAP file topic can be found at: ESX Swap File Size Best Practices.
More on VMware VM Swap file can be found in the: VMware Best Practice Guide.
Read more about “Virtualization“
Do you have a VMware SWAP file tip you want to share, please comment!
Join Other Go-Getters
Enter your name & email address below to get started.
Something went wrong. Please try again.