Windows is known to create virtual memory for the operating system incase the onboard memory doesn’t prove to be enough.
Windows uses a pagefile.sys for this.
But from Windows 8, Microsoft introduced a new file along with pagefile.sys and hiberfil.sys, the Swapfile.sys.
What are Pagefile.sys, Hiberfil.sys and Swapfile.sys??
To run programs and other applications , Windows will use RAM. When the number of programs, exceeds the capability of onboard memory, windows creates a Pagefile.sys.
Pagefile.sys is stored usually in the C drive of your PC. Windows will simply start paging out memory to this file, when your RAM starts running out of room.
Similarly, hiberfil.sys is the file to which Windows pages all of its RAM memory out to, when you put your machine into hibernation mode.
Swapfile.sys on the other hand, has little information available on it from official sources.
Though to summarize, it caters to the need of the new way of using and experiencing apps introduced by Windows, The Universal Apps or many other similar names.
Windows will use Swapfile.sys to send bits of apps to the file, to be stored for later use and smoother functioning.
This essentially Microsoft’s attempt at making the Windows experience more snappier, faster , seamless and more User Friendly.
This separate memory management system for Metro Apps is supposed to make Windows function more smoothly and with better performance.
How do you delete Swapfile.sys?
To start off, Swapfile.sys is not that big. The normal size for Swapfile.sys on a system running Windows 11 or Windows 10 is around 256 MB, at its Maximum.
Note: If you are attempting this in order to free up space on a Tablet, it probably won’t be that large and is probably making your gadget run smoother and snappier.
Swapfile.sys is managed along with Pagefile.sys by Windows.
Disabling the use of Paging file for a partition will also disable Swapfile.sys.
Disabling your Paging File is NOT recommended at all. This can drastically slow your PC down, Hamper your machine’s performance and in the rare case maybe even cause an irreversible problem with the Operating System itself.
On the other hand, Swapfile.sys can be disabled from your Pc by disabling the paging file.
How do you disable Paging file for a particular drive?
Note: This is NOT recommended, if you see any performance issues, you should revert your changes as soon as possible.
1 – Press Windows key + R together to open run.
2 – Write sysdm.cpl in it and click OK.
3- Select the Advanced tab.
4- Under the Virtual Memory option, click on Change.
5- Uncheck the first checkbox that says -Automatically manage Paging File size for all drives.
6- Now select the drive you want to disable the paging file on, from the options visible.
7- Once you have chosen the drive, select No Paging File.
8- Click on Set.
9- Select ok and exit the window.
10- Reboot your Machine.
You have now disabled the paging file on your selected device and removed Pagefile.sys and Swapfile.sys from it.
How to delete swapfile using Registry
1. Press Windows key + R key together to open run.
2. Write regedit in it and click OK.
Note: – Its always better before doing anything in registry to create a Backup
3. Go to the following path in the registry editor
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management
4. Now, in the right side, right click on any empty space and create a 32 bit DWORD key named as SwapfileControl.
5. Double click on SwapfileControl and set the value data to 0.
6. Close the registry editor and reboot.