VMware SWAP File Best Practice

VMware vm swap file diagram

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:

  1. 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.)
  2. For each ESX host in the cluster, configure the SWAP to point to the SWAP data store.
  3. 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.
  4. 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.
  5. 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

Your Turn:

Do you have a VMware SWAP file tip you want to share, please comment!

Want more tips like this? Yes!

Subscribe to www.VMinstall.com and get personal tips sent to your email inbox.

4 Responses to “VMware SWAP File Best Practice”
  1. ChrisAug September 22, 2009
  2. editor September 22, 2009
  3. Mike January 30, 2010
  4. Mike September 24, 2010

We're listening. Go ahead and share your ideas?

Udemy Training Deal Ends Soon [Click] To Get This Deal While It Lasts!
vSphere 6
8 Updates That Make vSphere 6 Better – Keith Barker
25 VMware Interview Questions: Tough & Technical (Download)
VMware jobs in Phoenix
VMware Jobs in Phoenix Arizona (Comparing Opportunities)
DevOps training
10 Reasons VMware Admins Should Boost OpenStack Skills
MSDevOps Guide
Microsoft DevOps: 25+ Power-Packed Windows SysAdmin Skills (NEW Guide!)
continuous integration tools
DevOps Training Courses That Will Give You The Edge And Make You Indispensable (This Is Perfect For Beginners Who Want Skills That Are Noticed By Companies Like Google & Facebook…)
Why DevOps Fails: How To Get Back On Track
Why DevOps Fails: How To Get Back On Track
DevOps jobs
How Listening to the David Linthicum Cloud Podcast Turned into a Goldmine of Cloud & DevOps Job Opportunities
Click here to learn how to Optimize WordPress Speed
WordPress Speed Optimization: Part 4 – VPS Case Study To Make VMinstall.com Rank Higher In Google Through Faster Hosting & High Availability @ Lower Cost
Best Hosting for WordPress
Case Study: Best VPS For Easy WordPress Migration
Cloudways Review: 12 Pros & Cons From My Deep Dive Testing (VPS Series: Part 2)
ServerPilot Review: Installing WordPress On DigitalOcean (VPS Series: Part 1)
Rise of the Robots
I’m Amazed After Reading Rise of the Robots – Best Jobs In 2017 (You won’t Guess what’s going on!)
top virtual reality jobs
30+ Awesome Virtual Reality Jobs That Take You From Boring To Amazing! (Must Read…)
Thinking Like Seth Godin
How To STOP A 300% Salary Loss Because YOU Think Like A SysAdmin: Start Thinking Like Seth Godin (Read Now!)
Resume Advice
Does Your Resume Suck? Get FREE Expert Resume Advice That Will Get You Noticed By Hiring IT Managers @ Amazon (Read Now…)
3 Open Source Storage Software Alternatives For Beginners
shades of devops
Free DevOps eBook Project (Read It Now!)
How to install Genymotion
How To Install Genymotion for Beginners (Includes Google Play)
20 Questions VMware Newbies Want Answered (Free Career Guide)