Hi Guys,
Just want to know the difference between vmx swap file and vswp file. are these same files or different.
regards
VINAY
The .vmx file is the virtual machine configuration file. The .vswp file is the virtual machine swap file.
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
I'm sorry that I had mistaken your question at first.
The VMX Swap File and the .vmdk file are the same thing.
What is the vmx swap file ???
For an exploination of VMX Swap Files see VMX Swap Files in the VMware vSphere 5.1 Documentation Center.
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.
thanks for the explanation
was it necessary to call this file vmx swap file ?
this name seems a bit missguiding to me
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.
Btw,
Andre published an indepth article about vmx swap files: http://myvirtualcloud.net/?p=2051
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.
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.
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)
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.
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.
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.
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.