Similar to Pagefile.sys, Swapfile.sys is a Windows 10 feature that takes advantage of space on your hard drive when your RAM either fills up or can be used in a more efficient way.
You might be asking: Why do I need a swap file when I already have a page file? The swap file deals with modern Windows apps (the kind you download from the Windows Store), moving them to the hard drive in a sort of hibernation state when not in use, while the page file takes individual pages (4KB in size) of a process and moves them back and forth as needed. The page file and the swap file work in conjunction — disabling the page file without editing your Registry will also disable the swap file.
The debate over whether or not your page file and swap file are really necessary rages on. Many Windows users claim their devices are much faster without them, while others will feel their blood pressure rise as they wait for those systems without the files enabled to crash and burn (the latter figuratively, of course).
Let's take a closer look at Swapfile.sys, whether or not you need it enabled on your Windows PC, and how to disable it if you choose to run without.
- What does Swapfile.sys do when it is enabled?
- What happens when Swapfile.sys is disabled?
- What do we recommend?
- How do I disable Swapfile.sys?
- How to disable Swapfile.sys without also disabling Pagefile.sys
What does Swapfile.sys do when it is enabled?
Let's say you have a PC with 2GB of RAM — this is the minimum recommended amount of RAM for 64-bit Windows 10. That RAM is going to fill up awfully fast if you're a multitasker, and free RAM is needed to keep your PC running smoothly. Don't get me wrong; utilizing all your RAM isn't a bad thing, but not having any RAM leftover for incoming processes is a different story.
Rather than having Windows completely grind to a halt for lack of RAM, any running but unused Windows apps — e.g. any minimized to the taskbar — will be moved over to your hard drive where they will reside in a swap file until you need them again. This frees up some space in your RAM for those incoming processes.
If you attempt to access an app that currently resides in the swap file and you have insufficient space in your RAM, another process in your RAM will be swapped out to make room for the app you'd like to use. Swapfile.sys works in conjunction with Pagefile.sys to help keep RAM freed up.
Get the Windows Central Newsletter
All the latest news, reviews, and guides for Windows and Xbox diehards.
What happens when Swapfile.sys is disabled?
Without a swap file, some modern Windows apps simply won't run — others might run for a while before crashing.
Not having a swap file or a page file enabled will cause your RAM to work inefficiently, as it has no "emergency backup" in place. If an app has a 2GB memory footprint, that footprint will stay on your RAM whether or not it's all utilized. When your RAM is full and has no file on your hard drive to move to, it will begin to cannibalize itself, which causes apps running normally to malfunction. At this point, you'll likely see a spectacular crash.
Less stress?
Some users claim that disabling Swapfile.sys will cause less stress on your hard drive, and this is indeed true. The question, though, is whether or not you will really notice. It's hard to say and really depends on your specific hardware, but most drives will last so long in the hands of regular users that having a swap file won't make a discernible difference regarding the longevity of your storage.
Also concerning your hard drive is space on smaller devices; usually tablets. For example, you might be tempted to disable the swap file and page file on your tablet with a 32GB hard drive. The problem then is an unstable RAM environment and a device that can crash at any time.
What do we recommend?
Unless you're an experienced Windows user who can deal with the potential fallout of tweaking these settings, leave the swap file and page file on your PC alone. By default, Windows will automatically size these files as necessary, and it does a decent job of it.
Most people hoping to speed up their device or create more room on their hard drive by disabling Swapfile.sys or Pagefile.sys should look at an alternative route, namely adding more RAM or a new solid-state drive. Disabling the swap file and page file shouldn't be a permanent solution.
How do I disable Swapfile.sys?
Note: Do not attempt this method unless you're an experienced user. Disabling the swap file and page file can lead to unexpected results.
If you really want to disable the swap file on your PC, you can do so without editing the Registry. Following this process, you will also disable the page file.
- Right-click the Start button.
- Click Control Panel.
- Click System.
- Click Advanced system settings.
- Click the Advanced tab at the top of the window.
- Click Settings in the Performance frame.
- Click the Advanced tab at the top of the window.
- Click Change in the Virtual memory frame.
- Click the checkbox next to Automatically manage paging file size… so that the checkmark disappears.
- Click No paging file.
- Click Set.
- Click Yes.
- Click OK.
- Restart your computer.
Both Swapfile.sys and Pagefile.sys will be gone when your computer restarts.
To reinstate them both, simply follow steps 1-9 so that a check mark reappears in the check box and then restart your computer.
How to disable Swapfile.sys without also disabling Pagefile.sys
Note: Do not attempt this method unless you're an experienced user. Editing your PC's Registry can lead to irreversible and fatal errors.
If, for whatever reason, you want to remove Swapfile.sys but leave Pagefile.sys intact, you can do so through the Windows registry.
- Right-click the Start button.
- Click Run.
- Type regedit.exe and hit Enter on your keyboard.
- Double-click HKEY_LOCAL_MACHINE
- Double-click SYSTEM.
- Double-click CurrentControlSet.
- Double-click Control.
- Double-click Session Manager.
- Click Memory Management.
- Right-click a blank area in the right-side frame.
- Click New.
- Click DWORD (32-bit).
- Type SwapfileControl and hit Enter on your keyboard.
- Restart your computer.
If you'd like to re-enable Swapfile.sys, head back into the registry and delete the SwapfileControl entry.
Your opinion
What do you have to say about Swapfile.sys? Are you on the side of Let It Be or are you on the side of Let It Be Gone? Let us know in the comments section!
Cale Hunt brings to Windows Central more than eight years of experience writing about laptops, PCs, accessories, games, and beyond. If it runs Windows or in some way complements the hardware, there’s a good chance he knows about it, has written about it, or is already busy testing it.