The Page File, or Virtual Memory as it’s called in Windows, is a feature that allows pieces of programs and data to be stored on a section of a hard drive, much like system memory, or RAM. In doing so, it helps free up real RAM resources, which are much faster but far more limited in size. The advantage of this is obvious on a machine with small amounts of RAM, in that it increases the total amount of memory available to the system and programs. Pieces of programs that are used all the time get put in RAM, while code and data needed less often are kept handy in the Page File.
Today, we take a look at a basic Windows service known as the “Page File” or “Swap File” depending on your OS platform or how long you’ve been computing.
The Page File, or Virtual Memory as it’s called in Windows, is a feature that allows pieces of programs and data to be stored on a section of a hard drive, much like system memory, or RAM. In doing so, it helps free up real RAM resources, which are much faster but far more limited in size. The advantage of this is obvious on a machine with small amounts of RAM, in that it increases the total amount of memory available to the system and programs. Pieces of programs that are used all the time get put in RAM, while code and data needed less often are kept handy in the Page File.
In a modern Windows operating systems (like XP), Windows manages the Page File automatically by default. If the Page File is too small, Windows will dynamically resize it. This dynamically sized space on your hard drive will become fragmented and end up costing you in terms of system performance. There is often a perceivable pause or stutter when Windows changes the Page File size. It used to be that changing the Page File size was needed to get DVD’s to play without skipping or to load large image files.
Modern Windows doesn’t do a bad job with handling the Page File, but you can do better. You can lock down and optimize the Page File yourself to avoid some of these performance issues and have fun as well.
Before we get too far into this, you’ll want to defragment your hard drives. Not only is this a good computing habit, it’s needed so that the new Page File addition will be set up on a healthy drive. You can use Windows' included defrag utility or, if you need some help or want to see an alternative, check out this
Hardware Logic Forums thread (Contig and Power Defragmenter GUI 2.0.125 Reviewed) for a free app that does a great job of defragmenting. Also, before diving in, be sure to read my precautions at the end of this How To. They may save you some headaches.
Let’s get started. In WindowsXP, go to Start Menu>Control Panel>System>Properties>Advanced tab. Alternately, you can right-click your desktop's My Computer icon and select Properties, and then click the Advanced tab. Under the Performance area, click on Settings. Then, click on Advanced once again and look at the bottom. We are looking for Virtual Memory. Click on Change. You should be presented with this view:
The size to set a page file to (especially when locking it down like I’m showing you) is pretty controversial. The range varies, depending on who you talk to, between 1.5x your RAM amount and 3x your RAM amount. I recommend 2x your RAM as a happy medium, but whatever you decide, use at least your RAM amount + 384Mb.
Single Drive Use
If you only have one physical hard drive installed, click on the C: drive in the top of the window and then the Custom Size radio button. In the two white boxes, enter a Page File size. The end number should be divisible by 8. So if you have 1Gb of ram, which is actually 1024Mb, you will want to set the number to either 1536 or, for what I recommend, 2048. If you have 2Gb of ram, use 4092. Use this same figure in both boxes. Click Set, then OK. Click apply and OK as needed to exit the dialogue boxes. At some point along the way, you’ll get an information alert that Windows needs to restart before the changes will take effect (Note: this may not happen if you are using Vista, but you still need to restart). You will need to do this once you’ve closed out of everything.
Multiple Drive Use
If you have multiple hard drives, or two hard drives partitioned into multiple drives, you will need to know which drive letters correspond to which physical drive(s). The reason for this is because ideally, you want the Page File to be located on a physical drive other than your boot drive. For most of us, the C: drive is our boot drive. For me, I have a second physical hard drive partitioned into two different drives. In the picture below, they are listed as D: and F:.

First off, click on and highlight the new drive letter you’ll be moving your Page File to. Click on the Custom Size radio button and enter in the appropriate figure as determined from Single Drive Use above. Click on Set. Next, click on and highlight the C: drive where your old Page File is located. Next, click on the radio button No Paging File. Click on OK. Click Apply and OK as needed to exit the dialogue boxes. At some point along the way, you’ll get an information alert that Windows needs to restart before the changes will take effect. You will need to do this once you’ve closed out of everything (Note: Again, this Alert may not happen if you are using Vista, but you still need to restart).
Now that you’ve accomplished all of this, are you going to see even 1 FPS more in BF2142? Possible, but not likely. Will your computer start up in less time? Possibly, but it won’t be by much. The primary goal here is to optimize your computer’s Page File system to be the fastest it can possibly be, which translates into better, overall performance and stability. This added to other optimizations will produce a noticeable benefit.
Now that you’ve completed the Page File swap, you will need to defrag the drive(s) we’ve used today once again. This cleans up any errant fragmentation left by the old Page File being moved off your C: drive and in all reality, if you’ve left the Page File on your C: drive, there’s no telling if Windows is now addressing a different section of your hard drive for the Page File.
For Windows 2000 users, the process is virtually the same. Start-Settings-Control Panel. Then carry on with the above directions.
Precautions/Questions
Can you disable Virtual Memory altogether?I would say no at this point. Scan to the end of this How To and take a look at the link to an older guide I found. Reasons for not disabling the Page File are listed there. To truly disable the Page File in XP requires a hack anyway.
I have 4GB of RAM, do I need a Page File?Yes, XP uses the page file for system files and as a dump space during a crash. Eliminating the Page File will not typically force programs into RAM (like many think it does).
How do I know if my Page File is big enough?
You can check how much Page File you use before you make changes by looking under Performance in the Task Manager (ctrl+alt+del – in XP and other NT based OS’s). Then, set your Page File Size to just a bit more.
Finally, if you want to know more about the Page File, what it does and more detailed directions on how to resize it,
check out this older, but still pertinent, link.