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!

Discussion

  1. ChrisAug
  2. Mike
  3. Mike

Leave a Reply

vSphere Data Protection EOA
3 Alternative vSphere Backup Replacements For VDP

Important Notification: vSphere Data Protection (VDP) End of Availability (EOA) That...

vSphere 6
8 Updates That Make vSphere 6 Better – Keith Barker

Editor’s note: Keith Barker has been a CBT Nuggets Trainer since 2012. Some...

VMware Interview Questions
25 VMware Interview Questions And Answers: Tough & Technical (Download PDF)

Free VMware vSphere Interview Guide In this VMinstall Guide I’ll share a...

Project Photon
VMware Project Photon: Technical Review for Linux Admins

My quick and dirty review of Project Photon. I was very happy...

DevOps Plan
Best DevOps Strategy Hack (Winners Start With Why)

What is DevOps? It’s a model. It’s a culture. It’s a...

DevOps Tools Download
DevOps Toolchain: Download 3 Free Tools Used By Pros (Ansible, Git, Jenkins)

Hack Your Resume with DevOps Skills Lately I’ve been getting a...

DevOps Guide
Microsoft DevOps: 25+ Powerful Windows SysAdmin Skills (NEW Guide!)

What is Microsoft DevOps? This is an interesting question because first off,...

continuous integration tools
DevOps Training Courses That Will Give You The Edge (Perfect For Beginners Who Want Skills That Are Noticed By Google & Facebook…)

When I was just a fledgling starting out as a Jr...

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

This is going to be a quick and dirty part 4...

Best Hosting for WordPress
Case Study: Best VPS For Easy WordPress Migration

Why I moved my WordPress blog off slow shared hosting… Let’s...

cloudways review updated
11 Cloudways Review Pros & Cons From My Deep Dive Testing (VPS Series: Part 2)

Which is a better cPanel alternative of a VPS – Cloudways...

ServerPilot Review
ServerPilot Review: Installing WordPress On DigitalOcean (VPS Series: Part 1)

How to install WordPress on a cloud server like a Pro...

DesTechAZ
What’s So Interesting About Woz U?

On 10/12/2017, I had the privilege of attending the AZ Tech...

tensorflow training
TensorFlow Tools for Beginners (7 Easy Takeaways To Get You Started)

Introduction To Deep Learning As a follow-up to my book review...

job rut
How To Get MOVING When You’re Stuck In A Career Rut (Video)

You worked hard to get your degree and after graduation you...

Storage Engineer Skills
Why Storage Engineer Skills Are HOT! (Can You Say Big Data?)

3 BIG Skills New Storage Engineers Are Missing Out On… Behind...

Open Source Storage Software
3 Open Source Storage Software Alternatives For Beginners

Build Your Own Storage Solution! Reflecting on my trip to VMworld...

VMware VCP FOR Hire eBook
Read Excerpts from VCP for Hire eBook

BIG Thanks… Before I share the excerpt of VCP for Hire,...

How to Self Publish Your VMware eBook KDP
How to Self Publish Your VMware eBook KDP

Do you have a VMware book you’d like to self publish...

free chef for 5 servers
Free Hosted Opscode to Try Chef On 5 Servers Before You Buy

Is Chef the configuration management and automation tool for your operations team?...