Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

It's possible to disable pagefile.sys and hiberfil.sys, however, there does not appear to be information on how to disable swapfile.sys.

The file swapfile.sys appears to be an additional paging file from Metro and I'd like to know if there is a way to disable it as well.

share|improve this question
it should be noted that pagefile.sys, at least for me, is rarely used by windows 7. I moved my pagefile to another harddisk, which is on sleep most of the time because windows never uses it, never exceeds 8gb of memory. This is in contrast to windows xp which would always use the pagefile even with plenty of memory left. – cloneman Nov 29 '12 at 3:12
Why would you want to disable all these, makes no sense. – Moab Nov 29 '12 at 3:48
MS has repeatedly said that disabling the pagefile, even on high memory systems, can lead to lower performance and they do not recommend it. – Keltari Feb 5 '13 at 1:51
@Moab, it's not a great reason, but I needed to remove this file because my aging SSD can't handle many more writes, and removing this file means I might get another 6 months out of the drive before I'm forced to replace it! – Simon MᶜKenzie Mar 17 '13 at 23:08
up vote 9 down vote accepted

It's not recommended to disable page file completely, but it you have vast amounts of RAM, you can limit it to reasonably small size, so it doesn't occupy your precious SSD space. Other than saving SSD space, disabling page file will not make PC run faster, Windows will not use page file, unless it is really necessary.

To set page file size manually, press Win+Break to open Control Panel System page, click Advanced System Settings, select Advanced tab, click Settings... (Performance group), select Advanced tab, click Change... button (Virtual memory group), uncheck Automatically..., select Custom size radio button, and enter same value in both fields. 512 MB is fine, for example. Press Set, then OK. Now you need reboot to apply new setting.

Clarification regarding David Schwartz's comment. It happens frequently that Windows allocates unreasonable amount of space for paging file (like 16G on a 16G RAM machine), during install and it will not shrink it automatically (I guess it have a "grow-only" strategy). However actual page file usage is limited to some 100-200M because main RAM is actually never became exhausted. I guess that small usage comes from some Windows architecture reasons, as David correctly mentioned. So, if you have standard HDD you don't really need to care. But if you are limited by a small SSD, saving some gigs of space can be really useful. That's the only legitimate reason I know to set page file size manually. I've remembered one more - your HDD backups can become smaller (depends on how smart is backup software you're using).

share|improve this answer
This makes no sense. If it was going to use space, that would mean it needed that space. Why wouldn't you want it to use it if it was actually needed? And by disabling it, you force Windows to behave badly -- its virtual memory architecture is designed for cases where backing store exceeds physical RAM. – David Schwartz Feb 5 '13 at 7:28
Sorry @DavidSchwartz, I don't get you. By that I mean, I don't understand how is my answer contradicts with your arguments. – Petr Abdulin Feb 5 '13 at 8:09
Why would you want to limit the pagefile size? It won't actually use the space unless it needs it. And if it needs it, why wouldn't you want it to have it? – David Schwartz Feb 5 '13 at 8:13
Thanks, I've updated answer. – Petr Abdulin Feb 5 '13 at 8:26

The swapfile.sys is a special pagefile. for the new Windows Store apps. You can get rid of it if you disable the normal pagefile.

There is also a way to disable it, but keeping the normal pagefile.sys. Run regedit.exe, go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management, create a 32Bit DWORD SwapfileControl and set it to 0.

share|improve this answer
Wow I didn't know hibernate and fast startup were related! You have a source on this? – mtone Feb 5 '13 at 3:52
sorry, this was not correct. I've removed this wrong part. To kill the new file, disable the normal pagefile. – magicandre1981 Feb 5 '13 at 4:58
Thanks for the clarification. – mtone Feb 5 '13 at 5:44

You must log in to answer this question.

protected by Community Feb 17 '14 at 9:24

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged .