What is Swapfile.sys and do I need it on my Windows 10 PC?

What is Swapfile.sys and do I need it on my Windows 10 PC?

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?

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.

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.

  1. Right-click the Start button.
  2. Click Control Panel.
  3. Click System.

  1. Click Advanced system settings.
  2. Click the Advanced tab at the top of the window.

  1. Click Settings in the Performance frame.
  2. Click the Advanced tab at the top of the window.

  1. Click Change in the Virtual memory frame.
  2. Click the checkbox next to Automatically manage paging file size… so that the checkmark disappears.

  1. Click No paging file.
  2. Click Set.

  1. Click Yes.
  2. Click OK.

  1. 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.

  1. Right-click the Start button.
  2. Click Run.
  3. Type regedit.exe and hit Enter on your keyboard.

  1. Double-click HKEY_LOCAL_MACHINE
  2. Double-click SYSTEM.

  1. Double-click CurrentControlSet.
  2. Double-click Control.

  1. Double-click Session Manager.
  2. Click Memory Management.

  1. Right-click a blank area in the right-side frame.
  2. Click New.

  1. Click DWORD (32-bit).
  2. Type SwapfileControl and hit Enter on your keyboard.

  1. 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
Senior Editor, Laptop Reviews

Cale Hunt is formerly 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.
  • I must have read a different article. I'm pretty sure that it advised against changing anything.
  • Some programs and even parts of the OS rely on the swapfile being there to function properly, or function at all. Disabling it IS NOT a wise decision. Try it for youself and see, it won't be long before you encounter errors.
  • Here the best article I know on the subjet :   https://blogs.technet.microsoft.com/markrussinovich/2008/11/17/pushing-t...   As far as i'm concern, I think the the page file is too big by default for people with a lot of memory (20+ gb pagefile sometimes). I manually set mine at 3gb as I have 24 gb of ram and don't experience any problem.
  • Ok, some common sense help: The ONLY real down side to these HDD swap files is drive use. If you are on a system with a tiny 32-64GB SSD with 8+GB of RAM, then you might have cause to disable this. I mean, let's do the math:
    64GB SSD =~60GB of usable formatted space
    Windows costs you 20GB
    Hyberfile costs you 8GB
    PageFile costs you 8GB
    swapfile costs you ~3-4GB
    That leaves you with 20GB for office (5GB), browser (2-5GB each), pics, music, software, movies, etc... it really isn't a lot of space; especially if you have multiple users on the computer. At this point turning off things like pagefile, hyberfile, and swap will save you significant drive space with only a minimal chance at introducing issues... and those issues can generally be remedied by upgrading to 16GB of RAM. But for the rest of 'normal' people, you either have an older system with 4GB or less of RAM, so you really need these systems in place to keep your machine running. Or else you have a HDD or SSD that is larger than 120GB, in which case you have enough drive space to not worry about these systems messing with you (or buy an external HDD/SSD if you need to 'free up' space). It is really only those with lots of RAM and a tiny SSD where this is a real problem, and where turning these systems off will help more than hurt.
  • and those issues can generally be remedied by upgrading to 16GB of RAM.
      And what about just upgrading the SSD and not touching those settings? Much better solution, but you can also go through the wall when there is a door next to it.
  • how do you upgrade a tablet?
  • I think it depends. I would prefer anytime to upgrade RAM instead of upgrading SSD. I never use UWP Apps, so no need to have Swapfile.sys, besides SSD are more expensive than RAM, and removing those sys files, will reduce the times that Win writes bits to the SSD increasing its lifespan.
  • On my Surface Pro 4 with 16GB of memory, these files are system managed, I find the following file sizes
    - Hiberfil.sys: 6.37GB, 40% of installed Memory
    - Pagefile.sys: 2.37GB, 15% of installed Memory, but I've also seen 2.5GB on a 32GB system.
    - Swapfile.sys: now 16MB, but I've seen 256MB as well, yes MB, so smallest of them all.
    All in all not a big deal. I wouldn't change anything. Applications like Photoshop depend on a Pagefile, it crashes if you have none.
  • Here is my question, is it possible to move the location to say a secondary hard drive, or a micro SD card if you are running a tablet or PC with lower RAM and Hard Drive space, think HP Stream, or Surface 3. 
  • It most certainly is. I even got it to work with a USB flash drive back in my tinkering days. Just realize that by using a SD card or other removable device, you are introducing a higher chance of failure and subsequent crash. But it's definitely possible. Have you heard of ReadyBoost before? It's whole premise is to use your flash drive to speed up your hard drive.
  • Some applications make calls related to the swapfile, so I leave it. I fixed a 1.5GB of size, since that's the minimum size requested for some application I use.
  • This is really good article covering many points for this swap file.
  • I have 16 Gb in watch of my two computers. My take is to leave well enough alone. My laptop has two SDD drives of 256 GB AND 1TB. I might thing about moving the paging file to the larger drive, but since I still have 184GB out of 237GB available, it doesn't seem like a critical issue.
  • 32GB of RAM here, no page file. Not a single issue with any software
  • XD Could you give some tips to maximize the usage? I read people claim any RAM more than 16 GB isn't beneficial for most people. Not so much tips on how to utilize that ample RAM
  • Great article. Very informative. Pros and cons are listed. Doesn't tell you whether you should turn the features on or off. Also gives warning to inexperienced Windows users about the risks. I learned something new today and enjoy this type of article. Keep them coming. Thx.
  • Opera with 50 tabs easily consumes about 6 gigs of RAM, so even 8 gigs of system RAM is not enough.
  • I cant believe this rubbish is still being pushed in 2016. I still remember when this was being pushed around in Win9x days, it's a load of nonsense and irrelevant.
  • I've got my PageFile on Drive D: to free up space on C: and SwapFile on C: (it's original location), but since I upgraded to 6GB RAM both the Page and SwapFiles haven't been touched, the modified date for both files haven't been modified since the day I upgraded from 4 to 6GB , so I guess the real answer for extra performance is upgrade the physical RAM and the Page/Swap will be used less or not at all.
  • I've got both an SSD for the OS and 16GB of RAM running on 8 cores. I don't notice anything going slowly so I will just leave things alone.