|Configuring pagefile.sys in Windows XP|
Putting the paging file on two drives
I want to change the configuration of my paging file, splitting it between two partitions and two disks. Space considerations force the file on my boot drive to be small, and I want to get a reality check on what custom settings will work. I may be answering my own questions below, but I'd love confirmation from someone who knows, since I can't find one single piece of documentation that covers it all.
First, some background... I'm running Windows XP on a P4 system with 2 Gb of RAM and two 120-Gb SATA hard drives. I stupidly made the "C" boot partition too small (12 Gb) when I set up the system, thinking 12 Gb was more than enough and that I'd save all the room for data on my "D" partition. I'm now seeing that I'm dangerously close to running out of space on the "C" partition. I have some 800K free, and that's not much room.
For a bunch of reasons, I don't want to fool with changing the partition size until I have some breathing room and time, and have also fixed my optical drives, both of which recently failed... (and then when I also feel a little more secure about Symantec and Partition Magic).
When I look at what's on the "C" partition, I see that the paging file is currently 1.5Gb (actually smaller than it ideally should be). In doing research on the paging file, I've come across a Microsoft KB article 314482...
How to configure paging files for optimization and recovery in Windows XP
The article, along with some some comments I've found elsewhere, suggests I'd in fact be improving performance if I set up two paging files, one on the boot "C" partition, and a second paging file "on another partition that is less frequently accessed on a different physical hard disk if a different physical hard disk is available."
Fortunately, I do have another partition available on the second drive. I originally intended drive-two to be a mirror drive, so it has another 12-Gb "E" partition. Instead of mirroring, though, I've been using the "F" partition for my local backup of my "D" data partition... and the "E" partition is basically free.
My questions... Will this solve my space problem on "C" until I can repartition the drives? What should the size settings be for the paging file on the "C" drive?
Here's another MSKB article (307886) that suggests the minimum size is 126 Mb....
How to move the paging file in Windows XP
|If the pagefile on volume C: has an initial size of less than 126 megabytes, then the system may not be able to create a debugging information file if a STOP error occurs. |
Assuming a larger second pagefile on "E," do I gain anything by making the pagefile on "C" any larger than 126mB. If I chose, say, 160mB, would I make initial size and max size on "C" both 160mB.
This is what my system is telling me about current and recommended settings for the amount of RAM I have...
Paging file size for "C" drive:
- Initial Size - 1,536 MB
- Maximum Size - 3,072 MB
Total paging file size for all drives:
- Minimum allowed: 2 MB
- Recommmended: 3,069 MB
- Currently allocated: 1,536 MB
It's good to point out that you need to put a paging file on a separate disk and not just a separate partition of your main drive if you want to see any performance increases. There are entire sites out there dedicated to this topic. I've dabbled with optimizing my pagefiles for the sake of performance, and I didn't see a noticeable improvement in system performance. However in your case I think it would show.
First you need to determine how big to make the pagefile:
RAM, Virtual Memory, Pagefile and all that stuff [support.microsoft.com]:
|A frequently asked question is how big should I make the pagefile? There is no single answer to this question, because it depends on the amount of installed RAM and how much virtual memory that workload requires. If there is no other information available, the normal recommendation of 1.5 times the amount of RAM in the computer is a good place to start. |
What I do is make sure the target partition is formatted with NTFS. Then make the initial size and maximum size to be the same amount (between 1.5 to 3 times the RAM on my machine).
The pagefile is just your swap file. If your machine is low on RAM then this file will be used a lot. In your case because you're trying to save space and not improve performance I'd say stick with 1.5 time your RAM.
bill - Thanks for the Microsoft link, which is one I haven't seen.
I'm guessing my question, though, wasn't quite clear. Microsoft advises, when you set up a pagefile on a second disk to improve performance, that, with regard to system recovery, if you move your pagefile, you also need a (smaller?) pagefile on the boot partition of the first disk.
How to configure paging files for optimization and recovery in Windows XP
|...However, if you remove the paging file from the boot partition, Windows cannot create a dump file (Memory.dmp) in which to write debugging information in the event that a kernel mode Stop Error message occurs. This could lead to extended downtime if you must debug to troubleshoot the Stop error message. |
The optimal solution is to create one paging file that is stored on the boot partition, and then create one paging file on another partition that is less frequently accessed on a different physical hard disk if a different physical hard disk is available.
My question is essentially how small this smaller pagefile, on the "C" partition, can be.
The combined size of both pagefiles, from what I've also read, should be between 1.5 to 3 times the size of my RAM. Since I have 2-Gb of RAM, that would be between 3-Gb to 6-Gb. It's unlikely that 6-Gb would ever get used.
But am I OK on the "C" partititon with the "126 megabytes" size mentioned in MSKB 307886 in reference to system debugging... or, for other performance reasons, should I try for a larger file?
We're talking about "C" only... that's where my limitation is. On "E," which I understand would contain the pagefile likely to be used, I'd probably have a file that's 4-Gb to 5-Gb.
[edited by: Robert_Charlton at 8:41 am (utc) on Mar. 12, 2007]
I wasn't very complete in my answer, sorry. ;)
I should have mentioned that I always leave a small pagefile on my C: drive. I set a minimum of 2MB with a maximum of 50MB so Windows can use this in an emergency. That's all you need. Put the rest on E:
|But am I OK on the "C" partition with the "126 megabytes" size mentioned in MSKB 307886 in reference to system debugging... or, for other performance reasons, should I try for a larger file? |
I hadn't seen that error warning before:
If the pagefile on volume C: has an initial size of less than 126 megabytes, then the system may not be able to create a debugging information file if a STOP error occurs.
I've been using less than 126MB on C: for years on several machines and not had problems with STOP errors (and I've had a few of those). However with today's big drive, 126MB wouldn't be too much space to allocate. You could set the minimum at 2MB and the maximum at 126MB if that's the case.
bill - Thanks. I now feel brave enough to wade in there. Amazing how Microsoft spreads this info over 20 different documents, rather than having at least one coherent discussion.
Just to report back... I made the size on "C" between 126-252 MB, and something like 3072 MB to 6000-MB on "E." (Note that the system doesn't like commas).
Not only do I now have some breathing room on "C," but it seems to me that Photoshop and various operations (like database compression) are now perceptibly faster.
Keep in mind that this isn't just about moving the paging file, though... It's also about increasing its maximum size to take advantage of my 2-Gb of RAM, something I didn't have disk space to do before.
Questions to come on a new thread about experience with Partition Magic and XP.