Virtualization

 View Only
Expand all | Collapse all

difference between vmx swap file and vswp file

  • 1.  difference between vmx swap file and vswp file

    Posted Dec 15, 2012 03:30 AM

    Hi Guys,

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

    regards

    VINAY



  • 2.  RE: difference between vmx swap file and vswp file

    Posted Dec 15, 2012 04:13 AM

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



  • 3.  RE: difference between vmx swap file and vswp file

    Posted Dec 15, 2012 05:34 AM

    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



  • 4.  RE: difference between vmx swap file and vswp file

    Posted Dec 15, 2012 05:45 AM

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

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



  • 5.  RE: difference between vmx swap file and vswp file

    Posted May 31, 2021 09:10 AM

    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. 



  • 6.  RE: difference between vmx swap file and vswp file

    Posted Nov 10, 2022 12:39 PM

    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.

     



  • 7.  RE: difference between vmx swap file and vswp file

    Posted Dec 18, 2012 06:45 AM

    What is the vmx swap file ???



  • 8.  RE: difference between vmx swap file and vswp file

    Posted Dec 18, 2012 07:57 AM

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



  • 9.  RE: difference between vmx swap file and vswp file

    Broadcom Employee
    Posted Dec 18, 2012 09:32 AM

    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.



  • 10.  RE: difference between vmx swap file and vswp file

    Posted Dec 18, 2012 10:22 AM

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

    this name seems a bit missguiding to me



  • 11.  RE: difference between vmx swap file and vswp file

    Posted Dec 18, 2012 06:47 PM

    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.



  • 12.  RE: difference between vmx swap file and vswp file

    Posted Dec 19, 2012 04:41 AM

    Btw,

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



  • 13.  RE: difference between vmx swap file and vswp file

    Posted Jul 23, 2014 05:42 PM

    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.



  • 14.  RE: difference between vmx swap file and vswp file

    Posted Dec 25, 2014 05:42 PM

    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.



  • 15.  RE: difference between vmx swap file and vswp file

    Posted Jul 09, 2015 11:17 AM

    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)



  • 16.  RE: difference between vmx swap file and vswp file

    Posted Apr 11, 2016 01:33 PM

    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.



  • 17.  RE: difference between vmx swap file and vswp file

    Posted Feb 05, 2018 06:18 AM

    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.