VMware Cloud Community
S_Crockett
Contributor
Contributor

Virtual Machine Swap file location

I know that best practice is to implement a centralized virtual swap datastore when using snapshot backup or disk replication. What about when you are not using snapshots or replication? With VMFS, I try to design the datastores to limit the number of virtual machines (and virtual disks) to reduce contention due to metadata updates. Is this a concern with swap files? Also, is there a concern with funnelling swaps from dozens of guests to a single datastore?

Reply
0 Kudos
3 Replies
krowczynski
Virtuoso
Virtuoso

I think the most popular config is to let the swaps in the same directory as the vm is.

MCP, VCP3 , VCP4
Reply
0 Kudos
Chuck8773
Hot Shot
Hot Shot

Some SAN vendors advise using a centralized Swap datastore to separate the type of traffic on the volume. Things like deduplication are not good with swap data. Also the swap files could then be placed on high performing SSD, while leaving the vmdk's on SAS or FC.

As for worrying about contention on that single datastore, you still need to think about it. In my mind, if you are swapping, performance is very bad anyway. So disk contention on top of that is making a bad situation worse, but either case is not acceptable. We are looking at centralizing all swap files, for IO patterns on the SAN. And we are looking at putting the swap files for 100+ VM's on the same volume.

Also this goes for the page file within the Windows VM. This is a larger task. We are looking at moving the page files to a different volume as well.

Charles Killmer, VCP

If you found this or other information useful, please consider awarding points for "Correct" or "Helpful".

Charles Killmer, VCP4 If you found this or other information useful, please consider awarding points for "Correct" or "Helpful".
TomHowarth
Leadership
Leadership

Another good reason for centalising your Swap is so that you can remove it from a backup strategy.

If you found this or any other answer useful please consider the use of the Helpful or correct buttons to award points

Tom Howarth VCP / vExpert

VMware Communities User Moderator

Blog: www.planetvm.net

Contributing author for the upcoming book "[VMware vSphere and Virtual Infrastructure Security: Securing ESX and the Virtual Environment|http://my.safaribooksonline.com/9780136083214]”. Currently available on roughcuts

Tom Howarth VCP / VCAP / vExpert
VMware Communities User Moderator
Blog: http://www.planetvm.net
Contributing author on VMware vSphere and Virtual Infrastructure Security: Securing ESX and the Virtual Environment
Contributing author on VCP VMware Certified Professional on VSphere 4 Study Guide: Exam VCP-410
Reply
0 Kudos