Skip to content

A rather late move to SSD….

June 14, 2012

Recently I bought two OCZ Vertex 3 60GB SSD’s for my VMware home lab (more on this later).  I read a great article  on using SSD with VMware (will try and dig out the link) and configured them as follows:

– 8GB for “swap to host cache”

– Destination for storage of VMware swap files (vswp)

– Destination for Windows swap file

I really couldn’t be happier with the results.  Instead of the system choking when running 3 or 4 VMs I can now run 7 or 8 and things are still pretty snappy.

So what does this configuration do in plain old English?

“Swap to Host Cache” – this is a new feature in ESXi version 5 and only appears on the configuration menu of the vSphere client when you have installed an SSD.  It basically allows ESXi to swap memory pages into and out of the SSD when it is running out of memory to allocate.  I have only 8GB of RAM in my servers so allowing 8GB of “Swap to Host Cache” kind of doubles the RAM I have (albeit slightly slower “SSD ram”.  You can set the cache size to use as much of the drive as you want but for my setup (I only allocate 2GB of RAM to each Windows Server guest VM) this seemed like the right amount.  Note with SSD “Swap to Host Cache” you cannot allocate more memory to a VM than the physical RAM in the server (so you can’t allocate 60GB of RAM to a VM if you only have 8GB of RAM in the server and a 60GB SSD!).

VMware swap files – ok trying to remember my VCP study (ahem) when you create a virtual machine and say “you can have 2GB of RAM” VMware thinks “hey that’s cool, but what will I do if I ever don’t have enough physical RAM to give this virtual machine?”.  The answer is a VMware swap file and this is created of equal size to the amount of RAM you allocate the VM.  So if I allocate 2GB of RAM to my Windows server a 2GB swap file is created “in case of emergency” for each VM and this is place in the same location (by default) as all of the files for the virtual machines (the file has a VSWP extension).  A nice get out of jail free card no?  Not really…you see if VMware runs out of memory to allocate to virtual machines (lets say in a simplified scenario you create 5 VMs with 2GB of RAM each, you only have 8GB of RAM in the server so you are now over allocated by 2GB (ish)…VMware will now start to use these swap files but they are stored on  slow disk not fast RAM so sit back and watch your whole performance grind to a halt for all of your VMs!

Now my hope was “Swap to Host Cache” would stop this scenario from happening but for some reason even with the extra “RAM” using “Swap to Host Cache” I was seeing my server making use of the VSWP files.  The article I read advised telling VMware to store these files on SSD also, there doesn’t seem to be a way to stop it from using these files!

Windows swap files – I am sure we are all familiar with the Windows swap file.  As a final boost to the system performance I (following the previously mentioned article) created a 3GB virtual disk for each VM server and stored this on the SSD drive.  Once presented to Windows and formatted I then told Windows to store the Windows swap file on this drive.  This final change really made the VM servers feel “snappy” in response almost like I am sat in an office playing on production kit 🙂  all for the cost of 70 quid per drive!

I see OCZ have just released a whole new range of drives with new and confusing names…I have to say I am happy with my Vertex 3’s so much so I bough an SSD for my laptop (but went for the Samsung 830).  I am living the dream!

Let me know of your own adventures with SSD!


One Comment

Trackbacks & Pingbacks

  1. Triple boot VMware and Hyper-V home lab «

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: