Understanding The Windows Pagefile

Understanding The Windows Pagefile

As a tech writer, I regularly cringe at all the bad tweaking advice out there, and disabling the system pagefile is often a source of contention among geeks. Let’s examine some of the pagefile myths and debunk them once and for all.

What is a Pagefile and How Do I Adjust It?

If you want to take a look at your own pagefile settings, launch sysdm.cpl from the Start menu search or run box (Win+R) and navigate to Advanced –> Settings –> Advanced –> Change. From this screen you can change the paging file size (see image above), set the system to not use a paging file at all, or just leave it up to Windows to deal with — which is what I’d recommend in most cases.

Why Do People Say We Should Disable It?

Look at any tweaking site anywhere, and you’ll receive many different opinions on how to deal with the pagefile — some sites will tell you to make it huge, others will tell you to completely disable it. The logic goes something like this: Windows is inefficient at using the pagefile, and if you have plenty of memory you should just disable it since RAM is a lot faster than your hard drive. By disabling it, you are forcing Windows to keep everything in much faster RAM all the time.

The problem with this logic is that it only really affects a single scenario: switching to an open application that you haven’t used in a while won’t ever grind the hard drive when the pagefile is disabled. It’s not going to actually make your PC faster, since Windows will never page the application you are currently working with anyway.

Disabling the Pagefile Can Lead to System Problems

The big problem with disabling your pagefile is that once you’ve exhausted the available RAM, your apps are going to start crashing, since there’s no virtual memory for Windows to allocate — and worst case, your actual system will crash or become very unstable. When that application crashes, it’s going down hard — there’s no time to save your work or do anything else.

Less Space for File Buffers and SuperFetch

increasing the amount of memory Windows uses for the filesystem cache

Windows 7 includes a new file caching mechanism called SuperFetch that caches the most frequently accessed application files in RAM so your applications will open more quickly. It’s one of the many reasons why Windows 7 feels so much more “snappy” than previous versions — and disabling the pagefile takes away RAM that Windows could be using for caching.

Put the Pagefile on a Different Drive, Not Partition

The next piece of bad advice that you’ll see or hear from would-be system tweakers is to create a separate partition for your pagefile — which is generally pointless when the partition is on the same hard drive. What you should actually do is move your pagefile to a completely different physical drive to split up the workload.

What Size should my Pagefile Be?

Mark Russinovich, the well-known Windows expert and author of the Sysinternals tools, says that if you want to optimise your pagefile size to fit your actual needs, you should follow a much different formula: The Minimum should be Peak Commit – Physical RAM, and the Maximum should be double that.

For example, if your system has 4GB of RAM and your peak memory usage was 5GB (including virtual memory), you should set your pagefile to at least 1GB and the maximum as 2GB to give you a buffer to keep you safe in case a RAM-hungry application needs it. If you have 8GB of RAM and a max 3GB of memory usage, you should still have a pagefile, but you would probably be fine with a 1 GB size. Note: If your system is configured for crash dumps you’ll need to have a larger pagefile or Windows won’t be able to write out the process memory in the event of a crash — though it’s not very useful for most end-users.

The other size-related advice is to set the minimum and maximum size as the same so you won’t have to deal with fragmentation if Windows increases the size of the pagefile. This advice is rather silly, considering that most defrag software will defragment the pagefile even if Windows increases the size, which doesn’t happen very often.

The Bottom Line: Should You Disable It?

As we’ve seen, the only tangible benefit of disabling the pagefile is that restoring minimised applications you haven’t used in a while is going to be faster. This comes at the price of not being able to actually use all of your RAM for fear of your applications crashing and burning once you hit the limit, and you’ll experience a lot of weird system issues in certain applications.

The vast majority of users should never disable the pagefile or mess with the pagefile settings — just let Windows deal with the pagefile and use the available RAM for file caching, processes, and Superfetch. If you really want to speed up your PC, your best options are these:

On my Windows 7 system with 6GB of RAM and a Windows-managed pagefile, every application opens quickly, and even the applications I haven’t used in a while still open almost instantaneously. I’m regularly running it up to 80-90 per cent RAM usage, with dozens of application windows open, and I don’t see a slowdown anywhere. If you want to read more extremely detailed information about how virtual memory and your pagefile really work, be sure to check out Mark Russinovich’s article on the subject, which is where much of this information was sourced.

Don’t agree with my conclusions? Voice your opinion in the comments, or even better — run some benchmarks to prove your point.


Log in to comment on this story!