Highlighted
Enthusiast
Enthusiast

difference between vmx swap file and vswp file

Hi Guys,

Just want to know the difference between vmx swap file and vswp file. are these same files or different.

regards

VINAY

15 Replies
Highlighted
User Moderator
User Moderator

The .vmx file is the virtual machine configuration file. The .vswp file is the virtual machine swap file.

Blog: https://rvdnieuwendijk.com/ | Twitter: @rvdnieuwendijk | Author of: https://www.packtpub.com/virtualization-and-cloud/learning-powercli-second-edition
0 Kudos
Highlighted
Enthusiast
Enthusiast

Hi ,

I know about .vmx file and .vswp file but my question was for vmx swap file and vswp. where the vmx swap file and vswp both are same or different.

regards

0 Kudos
Highlighted
User Moderator
User Moderator

I'm sorry that I had mistaken your question at first.

The VMX Swap File and the .vmdk file are the same thing.

Blog: https://rvdnieuwendijk.com/ | Twitter: @rvdnieuwendijk | Author of: https://www.packtpub.com/virtualization-and-cloud/learning-powercli-second-edition
0 Kudos
Highlighted
Immortal
Immortal

What is the vmx swap file ???

Do you need support with a recovery problem ? - call me via skype "sanbarrow"
0 Kudos
Highlighted
User Moderator
User Moderator

For an exploination of VMX Swap Files see VMX Swap Files in the VMware vSphere 5.1 Documentation Center.

Blog: https://rvdnieuwendijk.com/ | Twitter: @rvdnieuwendijk | Author of: https://www.packtpub.com/virtualization-and-cloud/learning-powercli-second-edition
0 Kudos
Highlighted
VMware Employee
VMware Employee

Ulli Hankeln wrote:

What is the vmx swap file ???

in order to power-on a VM a certain memory reservation is needed, this is called the memory overhead. In order to reduce the overhead a VMX swap file was introduced. This lowers the overhead from a memory perspective on your host and could increase your consolidation ratio.

0 Kudos
Highlighted
Immortal
Immortal

thanks for the explanation
was it necessary to call this file vmx swap file ?

this name seems a bit missguiding to me

Do you need support with a recovery problem ? - call me via skype "sanbarrow"
0 Kudos
Highlighted

Hi Continiuum,

Yes it was necessary as this memory is solely available for the VMX memory space (a.k.a the memory space that is available to run the virtual machine by the vmkernel). This is not a memory space that is available for any guest os memory transactions.

Blogging: frankdenneman.nl Twitter: @frankdenneman Co-author: vSphere 4.1 HA and DRS technical Deepdive, vSphere 5x Clustering Deepdive series
0 Kudos
Highlighted

Btw,

Andre published an indepth article about vmx swap files: http://myvirtualcloud.net/?p=2051

Blogging: frankdenneman.nl Twitter: @frankdenneman Co-author: vSphere 4.1 HA and DRS technical Deepdive, vSphere 5x Clustering Deepdive series
0 Kudos
Highlighted
Contributor
Contributor

The confusion is caused because of the name VMX which we take for granted as the .vmx file which stores the configuration file. First of all the VMX here stands for VM eXecutable and not the same as  the .vmx file in the virtual machine directory .

when we are running a virtual machine , there comes some basic overheads , ie the processes required to boot the virtual machine , keep it up and running and the agents consume some amount of memory and processing power in addition to the actual load  created by the OS application running on the VM.

the VM swap file is there to enable the VM's guest OS to consume less physical memory than the configured memory

the VMX swap file is there to reduce the memory reserved for the VMX process , ie the overhead which we discussed right now .

ie the VM swap is the internal matter of a VM where as the VMX swap file is the responsibility of our VMkernel

hope it helps , correct me if I am wrong or confusing

Highlighted
Expert
Expert

Here is a good articles that details how swapping works in esxi VMware ESX Memory Resource Management: Swap - VMware Technical Journal - both vm swapping and vmx swapping are mentioned in detail.

--- If you found this or any other answer helpful, please consider the use of the Helpful or Correct buttons to award points. vfk Systems Manager / Technical Architect VCP5-DCV, VCAP5-DCA, vExpert, ITILv3, CCNA, MCP
0 Kudos
Highlighted
Contributor
Contributor

Hi

Sufficient disk space must exist for the two virtual machine swap files.

1-  *.vswp  

2-  vmx-*.vswp"

These are not same files.


1-) The *.vswp swap file size is determined by the difference between the virtual machine’s configured memory and its memory reservation.

2-) The vmx-*.vswp swap file size is the difference between the assigned overhead memory for the virtual machine and the VMkernel’s reservation.

Highlighted
Contributor
Contributor

When a VM is booted following swap space gets created:

VMX Swap file:

Swap space for vmx process 

(a VM is made of  1. vmx process and 2 . VMM)

VM swap file:

Swap file for vm's guest address  space (memory)

0 Kudos
Highlighted
Contributor
Contributor

Virtual machine executable (VMX) swap files allow the host to greatly reduce the amount of overhead memory reserved for the VMX process, while the other one is the vm swap, for the vm os.

Highlighted
VMware Employee
VMware Employee

There are two types of swapping involved

1) Guest OS Swapping.

2) The other type of swapping is done by ESXi Host.

1) One is guest OS swapping, in which the guest OS inside the VM swaps pages out to its virtual disk according to its own memory-management algorithms.

2) When other memory reclaim techniques like ballooning, TPS, Memory compression usage is consumed but still there is memory requirement then

ESXi is going to swap memory pages out to disk in order to reclaim memory that is needed elsewhere. ESXi’s swapping takes place without any regard to whether the pages are being actively used by the guest OS.

0 Kudos