Note: Change ClearPageFileAtShutdown value to 0 to revert to the default setting.

The question of disabling the Windows pagefile has already been discussed quite a bit, for example here and here and here. People continue to upvote answers that say 'you should not disable your pagefile even if you have plenty of RAM', but I have yet to see any concrete, verifiable reasons being given for this advice. As far as I can see, if you never need to read from the pagefile (because you have enough RAM) then performance could only be worse with it enabled due to Windows pre-emptively writing to it. At best, performance would be the same. I can't see how it could possibly be improved by writing data you never need to read.
So my question is:
Assuming that I have enough physical RAM for everything I do, is there any reason I should not disable the pagefile?
Let's say the version of Windows is Windows XP x64 SP2 or Windows Server 2003 x64 SP2 (same thing). If it's different for Windows Server 2008 x64 I'd be interested to hear an answer for that as well. I'm looking for specific, objective reasons from good sources, not just opinions. Something like 'here are the benchmarks done with and without a pagefile and the results were better with a pagefile, even with enough RAM' or 'according to this MS KB article problem X occurs if you disable the pagefile'.
So far the only reasons I've seen mentioned are:
Community
EMPEMP
2,71310 gold badges37 silver badges50 bronze badges

13 Answers

This is a micro-optimization. The point is that there's no reason to do it, in anything resembling normal operation. It could easily hurt you if your usage pattern changes.
In specialized cases it might make sense, such as if there is no local writeable disk.
Captain SegfaultCaptain Segfault
There are many reasons to keep the pagefile even if you can fit everything into RAM.
The answer on SF has 125 upvotes and links many credible articles. Check it out:
Community
MDMarraMDMarra
19.3k3 gold badges37 silver badges52 bronze badges
From this link:
NOTE: Microsoft strongly recommends that you do NOT disable or delete the paging file.
To disable the use of the paging file in Windows XP, you should have at least 768MB of RAM.
Here's a link to Jeff Atwood's take on it.
Lance RobertsLance Roberts
7,0448 gold badges41 silver badges76 bronze badges
I've been running a Windows XP SP3 Professional 32bit laptop with 4GB of RAM (Windows 'officially' recognizes only 3 GB of it) for over a year now without a pagefile. People in my circles also kept trying to scare me that I shouldn't have done that.
I use very memory-intensive applications -- at any given point in time, I have at least two virtual machines (vmware) on which are configured to run 100% in RAM, I have at least one instance of Visual Studio (which has lots of add-ons installed), SQL Server and several 'small' apps such as email, IM, IE, etc.
Apart from all this, I've also got a permanent 256 MB Ramdisk. Once in a while, I use Adobe Photoshop WHILE the rest of the applications are running. And I play several games, too, including Quake3, Neverwinter Nights, Oblivion.
And I DON'T have ANY problems.
Note to BlueNovember: our friend has very graciously asked for objective reasons. So statements such as 'I suspect ...' are unwarranted. Please find out before posting! Hibernation has nothing to do with paging. It uses a separate file called hiberfil.sys and you can hibernate without a pagefile.
PS: Sorry dude, I refuse to go back to a 'normal' configuration so that I can actually benchmark how much faster this setup is, but just having to see so much lesser of that hard disk activity led flickering is very comforting. I'd disable the pagefile just for that, if nothing else, as at least your computer 'feels' faster when the HDD LED isn't flickering constantly.
The ONLY reason to not disable the pagefile is if you are using Performance Monitor (PerfMon) as this depends on the pagefile and requires minimum a 2 MB pagefile or else the counters will be missing for the following objects: Cache, Memory, Objects, Processor and System.
Veer
I believe that if you don't have a pagefile, then in case of a BSOD, Windows won't be able to write the minidump. This means that you won't be able to analyze the problem by using the appropriate tools.
This might not bother you if you're not experiencing BSODs, and you can certainly recreate the pagefile quickly enough, but why not be prepared?
harrymc
Windows 10 disable paging file
harrymc
272k14 gold badges285 silver badges601 bronze badges
The best reason I've found is that the pagefile allows Windows to use more physical RAM for the disk cache, which may be a better use for it than rarely used memory pages. Mark Russinovich has a great article on it, Pushing the Limits of Windows: Virtual Memory, which says:
Some feel having no paging file results in better performance, but in general, having a paging file means Windows can write pages on the modified list (which represent pages that aren’t being accessed actively but have not been saved to disk) out to the paging file, thus making that memory available for more useful purposes (processes or file cache). So while there may be some workloads that perform better with no paging file, in general having one will mean more usable memory being available to the system (never mind that Windows won’t be able to write kernel crash dumps without a paging file sized large enough to hold them).
EMPEMP
2,71310 gold badges37 silver badges50 bronze badges
I am running Windows XP with 4GB (3.5GB usable) of RAM. I need to run Visual Studio 2008, which requires a lot of memory. I often have 3 to 4 instances open, each taking up 500MB or more of memory.
I got really annoyed with this because whenever I needed to quickly close all Visual Studio instances, Windows would take forever to close the instances. It took 3 minutes or more. I realized what was happening was that the Visual Studio instances were paged out of RAM and into the pagefile, even if there was plenty of memory available. When closing the application, it would load all the paged data back into RAM, then shut it down. Essentially, it would copy 2GB of data from disk into memory before shutting down the instances.
After I disabled paging, I noticed a HUGE performance boost when shutting down multiple Visual Studio instances. It would take up 100% of the CPU for a few seconds, then disappear. Shutting down Windows is now possible well under a minute, rather than many minutes.
However, I did not notice any performance increase when starting applications, which makes sense, since the data still must be read from disk on startup. Also, I feel that things are generally snappier with paging disabled.
Also, I've only run into crashing programs due to insufficient memory only a few times a year. Usually if I open too many programs, or a program goes nuts and starts allocating memory like crazy.
In summary, I am very happy with paging disabled. Memory management in Windows is quite terrible. For those who are comfortable with tinkering with memory settings and are aware of the possible problems, I would recommend doing this.
MasMas
Contrary to popular opinion, the pagefile is not simply a cheap but slow alternate to physical memory. It was designed to allow optimum usage of the RAM you have.
Even with 4GB of RAM you probably don't have nearly enough keep everything in memory. Nothing in Task Manager will reveal this. Knowing this, Windows designers created a system where executable code was only brought into memory when needed and then retained for as long as possible. If the system finds a better use for the memory thus used it will be reassigned. This system has been used by Microsoft since NT3.1, released in 1993. It has been in regular use in large systems since the 1960's.
This system works well for most forms of executable code. But modified data must be written somewhere, the pagefile, before the memory used can be reassigned. The pagefile is not normally used to to store code, only data. Being able to page out both code and data gives the system flexibility in what should paged out when necessary. Disabling the pagefile means that only memory used for code storage can be reassigned. All modified data, even that which has not been accessed for a long time and may not be needed again, must remain perpetually in RAM. But paging of code will continue as before. The lack of a pagefile, or having one that is too small, unbalances the system and forces Windows to page in a sub-optimal way. This usually impairs performance.
user43161user43161
If your ram maxes out one or more of the programs that requested the memory will likely crash abruptly.
That risk is going to outweigh any performance gains you may get.
RJFalconerRJFalconer
9,4703 gold badges34 silver badges46 bronze badges
My suggestions is to keep the page file, but manually fix it to a small size, like 128MB, on the system disk.
The reason is a practical one: windows really expects there to be a swap file, and will most often create a temporary auto-managed one if none is found, thus voiding any convenience in disabling it.
Also, it will silently fail or misbehave in some operations, like BSODing, performance counters, suspend/resume/hibernate, and somehow system stability suffers. All this based on my experience, and these all went away with a smallish pagefile.
Note that the swap file will most likely be filled in the first few minutes of execution, never to be touched again in most cases, so you won't suffer the usual disk access penalty swap file incurs. You MIGHT receive a 'you're running out of memory' alert soon in your session, which you can safely ignore (yeah, swap is full, so what?)
(I also very much dislike superfetch, and rather leave memory free for caching effects)
ptorptor
One answer that was not mentioned was that Windows uses the page file to store crash dumps. The function that blue screens the computer writes the crash dump directly onto the sectors on disk that contains the page file (bypassing the file system driver that Windows, at the moment, can't trust).
Without a page file, you cannot get crash dump information. Also, the page file doesn't harm you if you don't use it, so outside of a very limited set of scenarios, there isn't a reason to turn it off.
a--a--
1,7701 gold badge10 silver badges25 bronze badges
Please think about SuperFetch loading your remaining memory with cache, it then becomes clear why we should not disable the page file. Serial tasks (as multi-tasking is bad) and cached application starts are really useful, so it's nice to have SuperFetch work at the cost of paging.
Tamara WijsmanTamara Wijsman
50.7k25 gold badges165 silver badges248 bronze badges
Pagefile
Paging
I run 32 bit XP with 4 GB memory (I know, XP only sees 3GB of that but it's interleaved and very fast) and would like to make two points:
XP can only see 3GB of memory. When my machine already has that, what's the point of a page file? It's reserving disk memory which it can never access. Unless it disables some RAM. So you've spent your hard-earned, on top dollar memory, only to find that XP is dating disk instead.
If you're running XP 32 bit and have 4GB memory, try this experiment:Turn pagefile off.Restart XP.Delete pagefile.Run a few progs, Word, Excel, Chrome, IE Ex, watch a movie, stream some music or TV.All should work well.Turn pagefile back on, this time with a really small size, say 25 MB.Restart XP.Run a few progs, Word, Excel, Chrome, IE Ex, watch a movie, stream some music or TV. You'll soon get a message that you are running out of virtual memory. This proves that XP uses the pagefile even when it doesn't need to. Check the task manager performance tab (alt ctrl del). Peak will be well below total physical memory, so why is XP using the pagefile? And why does XP think you're running out of memory?
The pagefile is an anachronism from the days of DOS and Windows 98. If you've got enough memory, get rid of it.
David ReadDavid Read

protected by BinaryMisfitNov 24 '10 at 19: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 windowsperformancememorypagefile or ask your own question.