Setting the Page File Size in XP (correctly)

Discussion in 'Software' started by majinbuu, May 1, 2008.

  1. majinbuu

    majinbuu Specialist

    Hi

    I am about to put together a new quad core system with a 9800gtx and 2GB Ram running 32 bit XP. I have looked everywhere and everyone has an opinion on what the Page file size should be. Lots recommend 1.5X that of system memory, but others have a lot more or a lot less.

    Do you guys have any opinion on this matter?

    Thanks
    Sam
     
  2. Goran.P

    Goran.P MajorGeek

    1.5 is the best.
     
  3. studiot

    studiot MajorGeek

    For most users,

    Letting Windows automatically manage the paging file(s) is the best option. this allows Windows to make adjustments to the size if you temporarily need more swopfile space. Then if you need 1.5 times memory or 2x or any other number Windows will give it to you automatically.

    However,

    if your hard drive is getting towards full (more than say 2/3 full) you might need to restrict the size available to Windows. There is no gain to be had by setting the min and max for any other reasons.

    Remember that you can set the size independently for each volume. There is little need for paging files on a data only partition for instance.
    You will see an increase in performance if you set individual pagefiles for each physical hard drive.

    The larger the pagefile is the more fragmented it is likely to be, slowing down retrieval. thus performance is a balance between size and fragmentation.
    You can offset the fragmentation by running defragmenters that defrag the pagefile (Windows does not do this). This is significant if the pagefiles is a substantial portion of your hard drive.
    You can also have fragmentation free pagefiles by creating a specific partition for pagefiles only.

    Finally you can gain performance increases by forcing Windows to keep the kernel in memory.

    Set to 1 the following registry key

    HKLM\system\curentcontrolset\control\sessionmanager\memorymanagement\disablepagingexecutive

    set it back to zero if your installation becomes unstable.
     
  4. majinbuu

    majinbuu Specialist

    Thanks for the response for the page file. As for the registry key I have heard of it but have never tried it, can you really tell a performance increase by enabling it?
     
  5. studiot

    studiot MajorGeek

    I look forward to you telling us the answer when you have built your rig.
     
  6. Mada_Milty

    Mada_Milty MajorGeek

    Studiot - does setting a min and max not also allow to you to avoid fragmentation of the pagefile?
     
  7. studiot

    studiot MajorGeek

    Sorry I'm afraid not.

    Since the page file is always being changed by the system and may be 1Gb+ the system is looking for a contiguous space of that size to place it. This gets tougher as you fill up the drive.

    If, however, you provide it's own partition there is no other activity on that partition and it is possible to place and use contiguous files of that size.

    I use this idea for video editing. Each time I start a project I reformat the workspace partition as being quicker than cleaning and defragmenting.
     
  8. Appzalien

    Appzalien Staff Sergeant

    I read in a PC Mag somewhere that if you let windows manage the page file it will move around the hard drive as its set larger then smaller. Because of this the author of the article recommended setting the max and min to the same size to prevent creeping as he called it. So everytime I install from scratch I set the page file to whatever windows chose as the min in both min and max, right now mine is set at 2046 for both max and min which is the same as my system memory (2gig or 1x).
     
  9. Mada_Milty

    Mada_Milty MajorGeek

    Sorry to be a PITA, but can you cite your source?

    Shouldn't it be easier to fit a constant size file into contiguous space? You'd never be looking for MORE space, and you'd never be shrinking, increasing free space fragmentation.

    I always do this, and I have NEVER been able to defrag my pagefile. I use Sysinternal's PageDefrag when I try, and it only ever reports that the pagefile is in 1 fragment.

    (Mind you, I set the pagefile as soon as I am able to boot into Windows, and not usually after I've filled the drive)
     
  10. Mada_Milty

    Mada_Milty MajorGeek

    This might be a better articulation of what I'm trying to get at. I set the min and max THE SAME. Setting a different value for min and max does give you a variable size.... poor wording in my last posts, sorry.

    This is what I do, and I never have to defrag the file.
     
  11. bigbazza

    bigbazza R.I.P. 14/12/2011 - Good Onya Geek

    Don't bother with all the crap you read. Set your Page File to a Max and Min of 1 gig. Then load System Information for Windows (SIW) at bootup, leave it running for 7 days, press F5 to refresh it occasionally to update your usage.

    1.5 times RAM (3 gigs in your case) is a waste of space on a PC with 2 gigs of RAM, IMO. I have posted my screenshot. I also have 2 gigs of Ram, but on a lot lesser performing PC than yours. If you are a heavy gamer, or do lots of intensive audio visual work you MAY need more than 1 gig.

    SIW is available as SIW (System Info) 2008.4.2.0
    http://www.majorgeeks.com/download4387.html

    with an almost perfect Rating: 4.85 (185 votes).

    I've been using it for ages to monitor my swop file and my usage does not get anywhere near my 500 megs Max/Min. Your usage will be different, of course.

    After a week's usage (bootup each day if you turn your PC off), you will see the comparison figures between PageFileSize (that you have set), In Use and Max used. You can then set your Page File size higher or lower, accordingly.

    Bazza
     

    Attached Files:

    Last edited: May 1, 2008
  12. studiot

    studiot MajorGeek

    Not a problem, the subject is certainly worthy of discussion. I was trying to keep it simple, but to answer properly will take a day or so to prepare a proper text.

    Meanwhile to praphrase what Bazza says 'it depends on your system and what you do with it'.
     
  13. bigbazza

    bigbazza R.I.P. 14/12/2011 - Good Onya Geek

    Another thumbnail, as at roughly 45 minutes later. Compare the usage in that time. Still plenty of unused Page File space, even at 500 megs Max/Min. Bazza
     

    Attached Files:

  14. Deckard

    Deckard Private E-2

    I am in the same boat as you. On one of my rigs (XP ProSP2, 2 GB RAM, E6550 C2D), I have fixed the PF size to be static at 4096 MB, and it's never fragmented. I don't see how it could fragment unless XP, for whatever reason, requires greater than 4 GB for paging and decides to enlarge the PF of it's own volition. I set it as 4 GB because it seemed to be sufficient....and HDD space is cheap anyway, so no loss there.

    I think I read somewhere that Windows will force-create a PF on the OS partition if it needs the extra memory in an emergency, even if the PF has been disabled. But this is not reliable information, so take it with a pinch of salt.:eek:

    Fragmentation of the PF as well as the MFT can decrease performance, so it's good to keep these defragmented, especially when HD space is on the low side. The old XP manual defragger could not defrag either of the files, but some of the newer commercial (paid) automatic defragmenters even automatically resize the MFT (and non-static PF?) to proactively minimize/prevent their fragmentation, aside from defragging them.

    I, too, would be really interested in knowing the reason why a static PF will fragment.
     
  15. Mada_Milty

    Mada_Milty MajorGeek

  16. bigbazza

    bigbazza R.I.P. 14/12/2011 - Good Onya Geek

    Quote from M_M's link.--My highlighting.
    I'll stick to my method, it's a lot simpler with SIW and it works for me. Bazza
     
  17. studiot

    studiot MajorGeek

    I am still putting together a suitable explanation but for those who believe that specifying the size of a file will prevent defragmentation consider this:

    Windows does not have authority over where the hard drive stores individual segments of data. That is reserved for the drive electronics. The drive internal electronics places chunks of the file (data) on the first available free sector and then the next and so on, skipping occupied sectors, until the whole file is placed. The electronics also does the translation from physical disk address (location) to logical location for the BIOS/Operating System. This is Fragmentation and is unavoidable, except on a clean drive that has no occupied sectors.

    The parameters you can set, either in Windows directly (initial and maximum) or in the registry (minimum or maximum) are never exactly adhered to by Windows. It uses as much of what is offered as it feels necessary.

    The paging file is not really one file but a container for a disparate load of data and operating system parameters.

    A 32 bit Operating System (as original post) can address a total of 4GB of memory. This is made up of internal cache, RAM and Virtual Memory (paging file). The default for Windows 32 bit is "GB for Windows and 2GB for processes (programs). There is a memory management system for executing 4GB 'windows' onto a larger stored VM, but this is not paging.
     
  18. Deckard

    Deckard Private E-2

    So you're saying that the PF of fixed size may be physically fragmented on the disk (depending on the drive controller), but can simultaneously exist as a logical unfragmented file as the file system sees it?
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds