about vswp file

What is vswp?

  • vswp is a virtual machine swap file that is created when you power ON a virtual Machine. This means as soon as you power ON the virtual Machine this file will be created and will be automatically got delleted when you power OFF your virtual Machine. This vswp is created to allow  the memory over-commitment on the ESX Server. This vswp file is only used by the virtual machine when your ESX host is running out of the Memory. If the ESX is running of resources and all the virtual machines running on the ESX started consuming the Memory then the ESX becomes the overcommitted host and the virtual machines starts utilizing the vswp file. Since the vswp is a file stored on the Disk drive, the performance of the virtual machine would be degraded.
why the vswp file size is big?
  • The size of vswp file depends on the Memory Provisioned for the Virtual Machine. If you creates a Virtual Machine with 2GB of RAM and there was no memory reservation, then the Size of the vswp file would be the actual size of provisioned Memory that is 2GB.
The vswp file size has been calculated using the following formule

vSwp file size = Provisioned memory – reservation
  • So Lets say, if you have allocated a 16GB RAM to a RAM, out of which 8GB is reserved then the vswp file size would be appro 8GB. 
  • If you allocate a virtual machine 16GB of RAM, and the reserved capacity is also a 16GB then the vswp file size would be 0.
  • If you put the Memory reservation on a Virtual machine and there was no free memory on the ESX server then you wouldn’t be able to power ON the Virtual machine.

Leave a Reply