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.
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.
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.
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 is a Senior Editor at Windows Central. He focuses mainly on laptop reviews, news, and accessory coverage. He's been reviewing laptops and accessories full time since 2016, with hundreds of reviews published for Windows Central. He is an avid PC gamer and multi-platform user, and spends most of his time either tinkering with or writing about tech.
"Without a swap file, some modern Windows apps simply won't run — others might run for a while before crashing."
There, you said it yourself. Why all the trouble in the first place? "Let it be". Windows 10 is becoming an OS where we rely on MODERN apps a lot and that's the best experience !! Don't screw it up.
Personally, I use a lot of apps and will never disable this.
no virtual memory here since I got 4gb of ram the first time. NOTHING HAPPENS except you only use real ram. Today having 8 gb ram with no pagefile is perfect for any normal user.
rubbish. even with stacks of spare RAM the OS will still page data, it's by design.
Same here. I haven't used a swap file in years and I've NEVER ran into a single issue. AAA Games - nope Productivity programs - nope UWP/Store Apps - nope 100 tabs open in a browser - nope Minesweeper/Notepad - nope I'm genuinely curious of what modern programs this article is referring to.
I have 8GB on my system. The maximum "Used ram" I have ever seen is around 4 GB. 4 Gb is always free. I have moved the pagefile.sys to D: logical drive. I create a Ghost image of the system drive once every week. BTW I have ZERO "user files" on C: drive. If the hiberfil.sys, pagefile.sys and the swapfile.sys are located on the system drive my ghost image simply is larger by about 4 GB. These do no good nor are required when I have to restore the image in the event of a bug in the Win update, as is happening in version 1809, or if I need to upgrade/replace my system drive. So yes, it does make sense to me to keep "used space" on C: drive as small as possible. I also use "Portable Applications" from logical drives as far as possible. This keeps my system drive uncluttered and without remnants in the event I uninstall/remove any of these applications.
Wow - it's frightening the proliferance of bad articles like this. People will read this article and think it's a good idea to start messing with these settings. And what ends up happening? They put there computer into an unsupported configuration or they degrade or cripple the performance. EVERYONE - you should disregard the information in this article as it is flawed and incorrect. It's just bad advice. Microsoft tells you not to touch these settings, and for good reason: they are already in their best configuration for 99% of all use case scenarios. Deciding the size of a paging file - or whether you can even disable it - requires extensive system performance and kernel monitoring in advance and then a bespoke calculation of the value; it's a configuration unique to each computer. Reading an article like this and then messing with the settings will absolutely slow your computer down.
Are you kidding me? Have you read the posts from people about the most basic things you can do like managing the Hosts file rather than rely on an ad block? No way will you see noobs tweaking anything that included the registry. And even if they do, why would you be opposed to people learning how this OS functions? I promise you, the author of this article has broken all kinds of things before being able to write a story like this. I guarantee he has.
nothing wrong with people learning how the OS functions, but this article isn't about that. it's about how to change system settings that are going to make your computer worse. and i agree the author of the article has broken all kinds of things. if this is the sort of crap that he writes about it shows he hasn't got a clue.
What the hell are you on about; its a great informative article that teaches people how these things function in the OS and what they are for; I hope Windows Central keeps them coming.
if your definition of informative is "telling readers how to make things worse" then I agree, the article is just great. otherwise, you are just as clueless as the author.
The information is hardly flawed. It is accurate and tells how to make certain changes. Not sure what part you think is incorrect. The article also gives infromation about the cons and potential pros of making these changes. I personally would not make these changes nor do I suggest others make them, but that does not make the artcile incorrect. I also don't understand your statement about bad advice in the article.The article does not even give any advice. It is simply a how to article in case anybody is interested in making these types of changes.
Those 'people' users don't read Windows Central.