How small should i make pagefile?

lulabob

Distinguished
Feb 10, 2010
7
0
18,510
i'm using a 60gb ssd for system drive. windows 7 used about 27gb(nearly half)alone. i eliminated hiberfil.sys saving 6gb! but since i have 8gigs in this 64 bit system the pagefile is also 8 gigs. that's a lot of space on my precious(expensive) ssd. with that much ram can i safely make it smaller?
 
Actually, Intel has stated that pagefiles are quite suitable for SSDs as their testing has shown that a "typical" system reads from the pagefile 40X more often than it writes to it. But it's wise to leave free space on an SSD and moving or eliminating the pagefile is certainly a sound way to do that.

To answer lulabob's question - what you need to do is to monitor your memory usage for a while to figure out how much memory your applications use up when you do the types of things you normally do on your system. Nobody else can really tell you what you need because everyone's different.

Start Task Manager (Ctrl+Shift+Esc), click the "Performance" tab, and keep an eye on the memory graph. Make a note of the highest that the graph ever gets to. Take that number, add something like 25% to 50% (or however much you're comfortable with) as a safety margin, and that's how much total RAM plus Pagefile space you need.

For example, if the highest you ever see is 6GB, adding 50% gets you to 9GB. So the total RAM + Pagefile you need is 9GB. If you have 8GB of RAM, that means you only need 1GB for the pagefile.

It's entirely possible that you don't need a pagefile at all. My system has 12GB and I've disabled the pagefile completely:

NoPaging.png
 


Really? That's news to me... have their test results been published somewhere? Would be nice to point people to those findings, as I think many people (like myself until reading this) still believe the bad press around putting a paging file on an SSD.
 

boonality

Distinguished
Mar 8, 2008
1,183
0
19,310


I disagree, I think that you have configured your computer based on "performance" tweaks that are spreading around the internet. You *should* have a page file and typically it *should* be 1.5 times the amount of total memory in your system. It has nothing to do with the amount of memory you are using, unless you decide to tweak this...

My point is that the standard is to have a page file and make it 1.5 times the size of total memory, it is not the standard to change this value and therefore I wouldn't recommend this to anyone unless they knew exactly what they were doing.

http://support.microsoft.com/kb/555223/en-us
 

A quote from the article you referenced:

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. On server systems, a common objective is to have enough RAM so that there is never a shortage and the pagefile is essentially, not used. On these systems, having a really large pagefile may serve no useful purpose.
(Emphasis is mine)

1.5 times is the "one size fits all" amount which was established a long time ago when RAM was not nearly as common as it is now (the article is over 5 years old). But it is not some sort of mandated standard - if you know that the largest combination of programs you ever run fits easily fit into physical RAM with a decent amount of room to spare than a pagefile serves no purpose at all. None. Nada. Zip.

Most people don't pay enough attention to their system to know how much memory they really need, and for them the 1.5X value is "safe". But the OP is interested in cutting down his pagefile size if possible, and measuring your workload and sizing the pagefile to fit it is a long-established practice by professional administrators.
 

boonality

Distinguished
Mar 8, 2008
1,183
0
19,310



As long as the "one size fits all" statement is clarified as the safe standard...

I do agree with what you are saying here in this post.
 

TIMELESS52

Distinguished
Nov 7, 2009
6
0
18,510
One can easily monitor page file usage by using freeware utilities such as SIW, Process Explorer, or Process Hacker. Look at usage over time and various scenarios to determine the maximum amount used. Add a healthy amount for safety and set the page file.

I have two machines, one running XP SP3 with 2GB RAM and another with XP x64 with 8GB RAM. The page files are fixed and set to 512 and 1024 MB respectively. I have never seen page file usage exceed 200 MB on either machine. Both machines are stable and exhibit no hard drive thrashing.
 
Pagefiles from what i have seen is this:

Larger the the total ram you have is best
Disabling just causes issues
Storing it on a seperate physical hdd is best
Another patition *can* stop fragmentation but is overall slower (away from centre of hdd etc)
Auto setting and even min. and max. at different sizes creates fragmentation

I have 8gb of ram - i give my system a 12gb page file (min AND max) to stop fragmentation, i then defrag the system with UBCD4WIN to get it in place and all in one place as it can be moved because it is not in use etc but only ONCE.

I did this with vista and saw improvements, i do this with windows 7 and still see improvements etc.

Someone confirm this one for me please.
 
...on my Vista partition, I have the page file set to 512MB - enough for a mini dump and to serve the odd app which may still need it for wahtever reason. That's with 8GB physical RAM.

I read a blog from the Win 7 Engineering team stating that in 7, the best practice is to leave the PF alone and let the OS handle it. So that's what I do.
 


As indicated by my post above, I use the 50% min to 150% max method in Windows XP and 7 with 4GB of RAM. I check my Page file from time to time every week and I never seen it larger than 2GB (or 50%) and I've used XP since 2002. I set a max of 150% for those "just in case" scenarios that never seemed to have come up.
 

mikeynavy1976

Distinguished
Feb 14, 2007
454
1
18,815
I also have decided to try the different min and max setting. I have 8GB RAM and am currently using a min of 2GB and max of 12GB for my pagefile. I was using min and max the same (8GB) but the computer seemed to be lagging. It seems a little bit faster now, but I honestly can't say if it's psychological or if the computer really "is" faster. I'm still interested in finding out what the optimum pagefile size and configuration is.
 

ricno

Distinguished
Apr 5, 2010
582
0
19,010


Do you with pagefile here mean the total amount of virtual memory you are using? (RAM + pagefile)



For the size I would say it will perhaps 6-8 GB for you. (If you have 8 GB of RAM and sometimes starts applications that use a total of 12 GB, then 8 GB of RAM + 6 GB of paging file should be good.) I would also say that it would be better to set the MIN and MAX to the same size and there is no apperant reason for this to be slower.

I belive that the 1.5 recommendation is "just a number" that Microsoft somewhat by routine has stated for a very long time but perhaps without any other reason than it would not be to small for anyone.