VMware Cloud Community
Shivaprabhu
Contributor
Contributor

VM Swap file vs Windows Pagefile.sys

Hi Folks,

I would like to understand the difference between VM Swap file and Windows pagefile.sys. Can someone explain me...!

Regards,

Shiva

0 Kudos
5 Replies
diegodco31
Leadership
Leadership

Hi

This swap reservation (VM SWAP) is required to ensure that the ESX/ESXi host is able to preserve virtual machine memory under any circumstances. In practice, only a small fraction of the host-level swap space might be used.

Configure Virtual Machine Swapfile Properties for the Host

The size of pagefile inside the guest OS is an question more related to OS than VMware, anyway the size of swap file will depend of the size of assign RAM memory and if the workload is requiring all memory assigned.

Diego Oliveira
LinkedIn: http://www.linkedin.com/in/dcodiego
0 Kudos
depping
Leadership
Leadership

The swap file on vSphere is there to ensure that when a Guest OS needs a memory page that this memory page can be backed by something. This something in that case is a datastore. The hypervisor will use that swap file as the last resort when you are overprovisioned on memory and VMs are requesting memory beyond what is free/available.

The windows swap file is in an guest mechanism, the OS in this case when it has "limited" resources available will determine which pages to swap out. This can happen even when there's plenty of memory available to the hypervisor, this may simply happen as you assigned too little memory to the VM,

0 Kudos
Shivaprabhu
Contributor
Contributor

Is the .vswp (swap) file used by ballooning process or by the ESXi vmkernel.

0 Kudos
a_p_
Leadership
Leadership

No, as mentioned by depping, swapping is used as a last resort in cases where physical memory is exhausted.

Ballooning comes into play before this. What ballooning does, is to allocate provisioned memory within virtual machines - which have a certain amount of unused memory - through the ballooning driver that's installed as a part of VMware Tools. This ballooned memory can then be "repurposed" by the hypervisor to avoid e.g. swapping.

André

0 Kudos
Shivaprabhu
Contributor
Contributor

Thanks all.

0 Kudos