vinay1
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

16 Replies
RvdNieuwendijk
Leadership
Leadership

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
vinay1
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
RvdNieuwendijk
Leadership
Leadership

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
continuum
Immortal
Immortal

What is the vmx swap file ???


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

0 Kudos
RvdNieuwendijk
Leadership
Leadership

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
depping
Leadership
Leadership

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
continuum
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 VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

0 Kudos

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

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
vfk
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
ersinbuyukyilma
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.

vermas16
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
NoelleAlentorn
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.

uads
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
rjblogger
Contributor
Contributor

A reply above says that the VMX Swap File and the .vmdk file are the same thing. That seems to not be the case, as they are two different files, with different filenames, dates, and sizes. 

0 Kudos
Virtual0
Contributor
Contributor

This of for (at least) vSphere 7.0 U3.

"vmx swap file" - for swapping (by the hypervisor) content of RAM used by the VMX process to disk

"vswp file" - for swapping (by the hypervisor; and not by the Guest OS) content of RAM used by the Guest OS to disk

 

 

Additional info is provided below.

 

When memory is overcommitted (and provided that there is sufficient free disk space at the time a VM was powered on), the Host can swap part of the memory occupied by the VMX process to disk. This reduces the RAM of the VMX process from about 50MB or more to about 10MB.

This file is 80 MB in size, stored in the VM Home folder, named vmx-<VM Name>-<string of Hex digits>.vswp

 

A running VM has the following processes or userworlds that run in the VMkernel.
* VM Executable (VMX) - responsible for
     ** handling I/O to devices that are not critical to performance
     ** communicating with user interfaces, snapshot managers, and remote console
* VM Monitor (VMM); one for each vCPU of the VM
     ** responsible for virtualizing the guest OS instructions and managing memory
     ** passing storage and network I/O requests to the VMkernel; and passing all other requests to the VMX process
* Mouse Keyboard Screen (MKS) - responsible for rendering the guest video and handling Guest OS user input

 

When a VM is powered on, the Host creates a swap file
* size of which = memxize - memory reservation
* which, by default, is in the VM Home directory (except for SAN or vVols datastore) and named <VM Name>-<string of 8 Hex digits>.vswp

This file is used when the hypervisor wants to swap some part of the Guest OS machine memory to disk.

 

0 Kudos