Latest Posts


Total Pageviews

Saturday, 4 February 2017

VMware VM .vswp file - Points Every VMware Administrator should know!!!!!

For every powered on VM a .vswp file is created in VM's datastore, this file is needed by the hypervisor to satisfy the VM memory demand in case of over-commitment is done and as well as when vm memory limit is configured. This gets created when the VM is powered on and deleted when VM is powered off.
Size of this file is calculated with formula given below:-
(VM configured memory - VM Memory Reservation )

Lets take an example, VM configured memory is 4GB and Reservation is 1GB. Now the .vswp file size would be 3GB.
As we all know we can change the memory reservation of the powered on VM.

Now the question is If the powered on VM reservation is changed then what would be the impact on .vswp file size?
.vswp file can only grow in powered on VM, to shrink it you have to power off and power on the VM is required. Lets take an example:-
VM Configured Memory = 988MB
VM Memory Reservation = 0
I started my VM, .vswp file is created with 988MB.

In this case VM Reservation is changed to 988MB when it was powered on. This will not impact .vswp size as it cannot shrink. Power off and Power on and then you can see the .vswp file of  zero size in datastore. Yes it is created even if configured memory and reservation value is same

Now as you can in above screenshot it is created but size is 0kb. Now in this powered on vm i changed the reservation from 988MB to again zero, now i can see this change in .vswp file size without being powere cycled as it can grow in the running vm,

vmx-xxxxxxxxxxxxxxxx.vswp file
This vmx-xxxxxxx.vswp file is dedicated to memory overhead and will be used when there is memory contention for the host memory. When the virtual machine is created the memory overhead is defined, however the VM and the VMkernel will not use the whole reserved memory until required.