VMware Cloud Community
thedaveyboy
Contributor
Contributor
Jump to solution

Removing .vswap file


Hi all

In our enviroment storage and disk i/o is at a premium, so we were looking into removing the need for .vswap file to free up space and remove potential i/o.

We are not short of RAM at the moment so in theory we could set full reservations on all VMs to remove the need for .vswaps.  But I am a little reluctant to do this as it might limit the flexabilty of memory allocation, especially in a DR situation.

Is there a way of disabling the .vswap file use without setting the reservations?  And what would be the pros and cons of doing this?

We are running vsphere 5 with some esxi 4 also

Thanks

0 Kudos
1 Solution

Accepted Solutions
a_nut_in
Expert
Expert
Jump to solution

No there isnt.

Do remember to mark my post as "helpful" or "correct" if I've helped resolve or answer your query!

View solution in original post

0 Kudos
4 Replies
a_nut_in
Expert
Expert
Jump to solution

This should help

Remove virtual machine swap space on disk | TechRepublic

The pros - no vswp files

Cons - Memory etc needs to be configured manually per your DR sizing requirements and HA conditions

http://kb.vmware.com/kb/1010594

Do remember to mark my post as "helpful" or "correct" if I've helped resolve or answer your query!
thedaveyboy
Contributor
Contributor
Jump to solution


Thanks, but read that already and doesn't really answer my questions.  What I am looking for is whether there is a settting that just says "do not use a swap file" without having to set resevations for each machine

0 Kudos
a_nut_in
Expert
Expert
Jump to solution

No there isnt.

Do remember to mark my post as "helpful" or "correct" if I've helped resolve or answer your query!
0 Kudos
FGShepherdP10
Enthusiast
Enthusiast
Jump to solution

We battled swap vs. reservations for a long time.  Finally, we just presented a shared Thin (as in "thin-provisioned on the array") Tier-2 (slower, cheaper disk) LUN on our EMC VNX array to every host and told the hosts to use this shared datastore as their swap location.  (CRITICAL NOTE - We do not oversubscribe our clusters, so there is no chance of RAM coming up short and swapping actually happening, and just to be sure we set major alarms in the event that some swapping does occur.)

The LUN should be equal in size to the amount of RAM in your cluster (i.e. the max amount of vswp space required if zero reservations are set on all VMs).

Because of VAAI, at VM Power Up, the host will just ask the array to set aside a vswp file equal to the amount of un-reserved RAM on the VM, and the array will confirm that this is actually complete, though the actual blocks on the array are not filled in, which means that the LUN isn't inflating.

Results: Each 2 TB Thin "swap" LUN on the array is using about 10 GB of space to support a full 16-node cluster, and none of our T0/T1/T2 production disk is going to waste to support vswp files that will never be used.  (i.e. Net savings: ~2TB per cluster)

I'm not sure if these specifics all fit your environment, but the concept is hopefully broad enough to be helpful.

0 Kudos