VMware Cloud Community
casparmanagedit
Contributor
Contributor

vswp files and virtual center

Hi, just a question.

We have two ESX hosts with Virtual Center,  both with 130GB of RAM connected to a SAN with high availalility, vmotion etc.  It's a redundant system. We use VEEAM to backup the VM's.

If you count all VM's then total memory provisioned is roughly 120GB total so all VM's should be able to run on only one host in case of a failure.

We noticed now that all VM's created a vswp file in their datastore directory that is about the size of the total memory allocated to that VM. In total these files take up about 120GB of storage space that we would like to see as free space again. ( so we have a little more space for snapshots being created by VEEAM during backup )

Do we really need these swap files if we have enough physical memory in the host? Or do we need these swap files in order to use vmotion to move active VM's to a different host?

So the question, can we disable it?

Reply
0 Kudos
1 Reply
jhague
VMware Employee
VMware Employee

By default a vswp file will be created for every VM which is equal to the VM memory size minus the VMs memory reservation and it is basically there as a safety net in case memory resources are constrained. If you don't want the vswp files using up storage space and have no intention of over-committing memory then you can create a 100% memory reservation for the VM which guarantees that amount of physical RAM but it will limit the number of VMs you can run on the hosts and add some overhead in terms of creating the reservations etc.

To create a memory reservation in the web client you just need to edit the settings of the VM and under reservation enter the size you want. If your VM has 8 GB RAM by default it will have a 8GB vswp file. If you set the reservation to 4GB the vswp file will be 4GB. If you set the reservation to 8GB, the vswp file will be 0. vMotion will still work.

John Hague http://linkedin.com/in/john-hague | twitter @jhague10 VCIX-DCV | VCP-DCV 3/4/5/6 | VCP6-NV | VCP7-CMA | VCAP7-CMA Design
Reply
0 Kudos