Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Windows has a "system managed size" option for pagefile size, which seems to lack precise documentation.

What exactly does Windows do when you choose this?
Does it simply select default min and max sizes, or does it do something fancier?
Does windows shrink the pagefile and grow it later (with annoying dialogs)?

share|improve this question
add comment

7 Answers

up vote 5 down vote accepted

It does exactly what it says on the tin: the OS manages the size of the pagefile, which can shrink or grow dynamically, and with no lower or upper bounds. The pro is that you don't have to worry about sizing your pagefile, the con is that your pagefile can become fragmented.

Where it is useful is in exactly the situation it's designed to avoid: sizing your pagefile. You can set it to System Managed and check in every coupla minutes (via a script), recording the smallest and largest sizes it uses over a typical usage period of a month or so. You should then have a very good idea how large to manually set your pagefile to be.

share|improve this answer
2  
I like this plan, except Windows seems compelled to tell you when it's expanding swap, which spooks users. Any way to avoid or reduce the dialogs? –  user9887 Jun 18 '09 at 15:09
    
This answer didn't cover everything I'd like to know, but I think it's the best answer I'm going to get. –  user9887 Jun 22 '09 at 15:04
add comment

Near the end of this article, Mark Russinovich briefly discusses system-managed pagefile sizes:

You’ll notice that the default configuration is for Windows to automatically manage the page file size. When that option is set on Windows XP and Server 2003, Windows creates a single paging file that’s minimum size is 1.5 times RAM if RAM is less than 1GB, and RAM if it's greater than 1GB, and that has a maximum size that's three times RAM. On Windows Vista and Server 2008, the minimum is intended to be large enough to hold a kernel-memory crash dump and is RAM plus 300MB or 1GB, whichever is larger.

The rest of the article is well worth reading, and does talk a bit more about what happens when Windows grows the pagefile.

In my own experience, system-managed pagefile is the best option to take in the vast majority of cases.

share|improve this answer
add comment

It handles sorting out the size of the pagefile. In the past I've set that when the available drive space is substantial. If you have the room why not let the system have as much as it needs?

share|improve this answer
    
great, how does it "handle" it? Does it just set min/max by some rule, or does it do something more dynamic? –  user9887 Jun 17 '09 at 20:22
add comment

The general rule for system managed pagefile is: the operating system will create a page file that is one and a half times the amount of RAM that is installed in your computer.

However you rarely need the size of the pagefile be determined by system because nowadays computers RAM is more than adequate. A system managed page file with its shrinking and growing is subject to heavy fragmentation.

This KB article addresses the issue and explains how to calculate the page file size: How to determine the appropriate page file size for 64-bit versions of Windows Server 2003 or Windows XP.

Setting to a fixed size pagefile is worth considering. Additionally, it prevents this problem: The page file size may become alternately too small or too large when you start Windows Server 2008 or Windows Vista if there is no available free disk space, and the page file size is managed by the system

share|improve this answer
add comment

I ussually set the size of the pagefile manually at about twice the size of the RAM Memory so the system won't take too much I/O time with excessive growing and shrinking of this file.

share|improve this answer
    
When does the system shrink or grow the pagefile? Does "system managed" act different from manually chosen min/max? –  user9887 Jun 17 '09 at 20:27
    
If windows needs some RAM at one given point (let's say you start a demanding application .. like a game) then it's gonna allocate the free RAM it's got, then the free space inside the pagefile on the disk as virtual memory. If the application needs more memory then it's going to start and grow the pagefile so it will have space to allocate. The problem is that growing and shrinking can be quite stressfull for the sysytem sometimes. Imagine you start a game and you start waiting cose the pagefile needs to be increased by 1 GB all of a sudden. –  Paul Jun 18 '09 at 7:27
1  
This story tells when it would grow, but I'm more curious about the shrinking side. Naively, I would expect Windows to grow the file as needed, but avoid shrinking because of this kind of thrashing. –  user9887 Jun 18 '09 at 14:59
    
And what a fine point you make. Indeed i assumed Microsoft respects the laws of the univers that there must allways be an equilibrium .. what goes up, must come down, what goes in must come out .. etc. I actually don't know if Windows shrinks it's pagefile and I'd be pretty upset if it didn't! –  Paul Jun 18 '09 at 16:58
add comment

Here is a video with David Solomon, one of the MS uber-engineers.

This video will answer your questions and also tell you more then you'd ever want to know about Windows memory management.

There is a section about sizing your pagefile:

http://www.microsoft.com/emea/spotlight/sessionh.aspx?videoid=64

share|improve this answer
    
Thanks for the link, but it seems like I cannot watch it without some kind of MS login?? Is there an alternate video source, or a written version somewhere? –  user9887 Jun 18 '09 at 15:25
add comment

It works on a dynamic basis. It sets a typical upper level for the amount of RAM you have installed, which it extends as needed.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.