6GB of RAM - Page file? Swap File? Need it? What is it?

XHair

Limp Gawd
Joined
Mar 27, 2008
Messages
181
I know there are two separate things, the page file and the swap file. I haven't found a good answer from the internets as to what these are. I believe one of them deals with the memory and if you have enough memory you can eliminate it completely. There are also certain settings for the other ____ file that help performance.


Who can help me?
 
Leave it alone. And the page file is also known as the swap file, they're the same thing.

'Nuff typed.
 
some programs need it, esp adobe programs which chew memory up like nothing. They like to reserve a lot. Keep it around 2gb.
 
Actually swapping and paging are totally different. When your ram is not enough for all the programs you are running there are 2 solutions:
1.Swapping
In this case the programs are running for an interval of time(they are inside the ram) and after that they are moving in the hard drive in order to free the ram for the new programs. This cycle continues until all programs are finished.
2.Paging
In this case the programs breaks into a number of parts, called pages.The memory is expanding not only in your physical memory(ram) but also in a place on your hard drive.For example if you have 1Gb of ram and a program demands 2 or 3 then the computer make a virtual memory which contains a place for example 3Gb on you hard drive in order to use it as memory.This kind of memory is called virtual memory.Only a part (page) of the program is inside the ram, the other parts are on the hard drive. When this part finishes is moving on the hard drive and another part takes it's place on the memory. Again this cycle continues until all programs are fully executed.


And no, even if you have 8Gb of ram DO NOT disable page file.
 
All good advice here IMO. Leave it alone with 1 possible exception. You can put the swap/page file on a seperate HD from your OS "IF" you are running I/O intensive applications. This can alleviate potential bottlenecks on the system HD. But, leave the size the same and let Windows manage it.
 
All good advice here IMO. Leave it alone with 1 possible exception. You can put the swap/page file on a seperate HD from your OS "IF" you are running I/O intensive applications. This can alleviate potential bottlenecks on the system HD. But, leave the size the same and let Windows manage it.

Interesting; I never let Windows manage the size; with lower memory sizes, (2 to 4GB) I used to set Min/Max to 1.5 * RAM amount, (I remember reading something when XP was the new kid in town that setting the min/max to the same number was more efficent.) Now I have it set to 2GB static, currently sitting on the OS drive but considering moving it over to a raptor drive.
 
Interesting; I never let Windows manage the size; with lower memory sizes, (2 to 4GB) I used to set Min/Max to 1.5 * RAM amount, (I remember reading something when XP was the new kid in town that setting the min/max to the same number was more efficent.) Now I have it set to 2GB static, currently sitting on the OS drive but considering moving it over to a raptor drive.

That's another old school XP mem tweak. The idea is that you are actually wasting CPU cycles and time since XP is constantly recomputing the page file size. It may or may not be beneficial to set it to a static min/max of 1.5x to 2x the physical RAM size. However, I don't think this tweak is as effective now as when it first came out due to improvements in XP memory management, better HD performance, higher RAM densities, etc etc.
 
I think the major advantage to having a static sized page file is that it will take sequential blocks of the HD, instead of getting fragmented every time the size is changed by windows. MS also doesn't allow their own defrag tool to defrag the page file, though most 3rd party defrag programs do.
 
Logan321 said:
I think the major advantage to having a static sized page file is that it will take sequential blocks of the HD, instead of getting fragmented every time the size is changed by windows. MS also doesn't allow their own defrag tool to defrag the page file, though most 3rd party defrag programs do.

Yup, that is the main reason to use a fixed page file.

I currently have 4GB of RAM and a 2GB fixed page file (laptop HDD only has abotu 1GB of free space so I couldn't increase it even if I wanted to). I'd probably have it at 4GB if I got a machine with 6GB of RAM and enough HDD space.
 
I've reduced my page file to 512MB. So far so good, this is in Vista with 8GB though.
 
It's not as critical these days but, there is also a bit of load on the CPU to constantly be reassessing and resizing the page file. This activity can also slow it just a tad.
 
Vista/Windows 7 are much smarter than XP or any previous Windows OS was at handling memory/page file. It knows what it's doing to maximize performance.

Moving it to another hard drive is an option, but I have yet to see any real proof that it has any real performance benefits. Whatever you do, do NOT turn it off.
 
Moving it to another hard drive is an option, but I have yet to see any real proof that it has any real performance benefits.
Theoretically, this should be a benefit but, only if the user is having an I/O bottleneck on the system drive.
 
I started disabling the page file when I got 2GBs in WinXP. I'm in Vista64 now with 4GB RAM and page file disabled and I have not had one issue. I play games but don't use any very demanding software otherwise.
 
Whatever you do, do NOT turn it off.

That shouldn't be a problem. According to "Joe Average" you cannot really turn it off anyway. The disable button is a display-button only. I am baffled he hasn't said anything yet :)
 
Yea been running mine on a second drive set to static size for a couple years now!!
 
I always turn it off....

So it won't rely on the HDD at all for anything unless I hit the max...I end up that the page file has been automatically enabled with a certain size something like that. BUT that's only when I'm running WoW, watch 1080p movie, multiple tabs on Firefox, running a small Ubuntu VM for me downloads, and once my AV auto-scan starts kicking in...and this only happens at 02:00am...... then I will get the pop-up message. But still business as usual...just a couple of seconds interruption.

Performance seems better, apps run faster, Photoshop definitely reacts faster.

Well this is just me.
 
When all I had was 2gb I turned it off. Photoshop was just fine until I started getting into it, and then Mr Pagefile popped his head in. It's automatically reenabled when you absolutely need it.

Now that I have 12gb, I turn it off and I haven't seen it since.

I have noted a noticeable difference in performance with the pagefile going unused, especially with apps that have been minimized for a few hours.
 
Mark Russinovich blogs on the topic:
Phsyical Memory
Virtual Memory
Paged and Nonpaged Pool

Perhaps one of the most commonly asked questions related to virtual memory is, how big should I make the paging file? There’s no end of ridiculous advice out on the web and in the newsstand magazines that cover Windows, and even Microsoft has published misleading recommendations. Almost all the suggestions are based on multiplying RAM size by some factor, with common values being 1.2, 1.5 and 2. Now that you understand the role that the paging file plays in defining a system’s commit limit and how processes contribute to the commit charge, you’re well positioned to see how useless such formulas truly are.
Just wanted to toss that out there to begin with.


To optimally size your paging file you should start all the applications you run at the same time, load typical data sets, and then note the commit charge peak (or look at this value after a period of time where you know maximum load was attained). Set the paging file minimum to be that value minus the amount of RAM in your system (if the value is negative, pick a minimum size to permit the kind of crash dump you are configured for). If you want to have some breathing room for potentially large commit demands, set the maximum to double that number.
The simplified version of that is "Run your stuff. See how much memory was used. Subtract your RAM from how much was used. The leftover is how much pagefile you need."

My system, after being up for 20 hours running Firefox, Thunderbird, WoW, and dnetc, has a peak commit charge of a little over 2GB. The 6GB of RAM I have installed is overkill for what I do, so a pagefile is not really necessary for me, though it may provide some benefits.
Some feel having no paging file results in better performance, but in general, having a paging file means Windows can write pages on the modified list (which represent pages that aren’t being accessed actively but have not been saved to disk) out to the paging file, thus making that memory available for more useful purposes (processes or file cache). So while there may be some workloads that perform better with no paging file, in general having one will mean more usable memory being available to the system (never mind that Windows won’t be able to write kernel crash dumps without a paging file sized large enough to hold them).


A lot of the old 1.5xRAM guidelines were started back in the day when memory was scarce and the pagefile was actually used quite a bit. With more RAM, you actually need less pagefile, so the old __xRAM guidelines really don't scale at all. If you've got lots of RAM, the only reason to have such a big pagefile is for memory dumps.
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 maximum is either three times the size of RAM or 4GB, whichever is larger.

XP/2003 uses 1.5x to 3x if you have less than 1GB, or 1x to 3x if you have more than 1GB. Vista/2008 uses RAM+300MB (minimum of 1GB) to 3x (minimum of 4GB).
 
Well I just shut off my pagefile since I have 8 gigs of RAM and I don't think I would even use 4 gigs. I'll probably turn it back on though since I think Windows 7 is smart enough to use my RAM to it's potential given superfetch and all.
 
I know there are two separate things, the page file and the swap file. I haven't found a good answer from the internets as to what these are. I believe one of them deals with the memory and if you have enough memory you can eliminate it completely. There are also certain settings for the other ____ file that help performance.


Who can help me?
Nice name..:)
 
I put my eeePC at 50MB and it runs sweet at only 512MB RAM. But I am not pushing that system at all. On my PII 940 8 GB I put the page on a short stroked second drive with permanent min max of 4 GB. IMO you always want a page file, but with ample RAM it does not have to be large at all. It is there because of the low RAM/Giant OS history of Windows, and huge media apps like Adobe suck back. If your a gamer you can all but turn it off IMO. Or at least drop it to 1GB or less. But if you are [H] at least put it on a second HDD (not partition)!!! ;>)
 
My rig has 8gb ram, I set the file to 2048mb min and max...with todays large ass hard drives, whats 2gb? Jeesh...
 
I haven't used a pagefile for years. I don't think this is an accepted solution, but for me it works great. I believe if your using a pagefile you should go buy more RAM. Quit thrashing your hard drive and losing performance.

If the pagefile is allowed, you may or may not need it and it will eat 1GB of HDD space. To me that is useless.

IMO
 
I shut mine off or leave at 2gb with 8gb ddr2 in vista/7

Windows 7 allocated 8gb by default, lol
 
Even to those with 8GB or 12GB, according to Mr. Russinovich you should still have the swap file enabled. I read that blog entry myself several weeks ago.

Yes, thrashing hard drives are terrible as RAM, but according to him it's best to give Windows the extra breathing room anyway since it can more effectively use the RAM you do have. If you never need it, it won't thrash, so there's no need to turn it off. I'd be inclined to just trust Windows to make the right performance decisions here and turning of the page file would just cripple that ability. I do use a static-sized file just to prevent fragmentation.
 
Yeah I had it turned off but after reading it, I went ahead and set to 2048.
I have not even come close to filling all 8gb. I have hardly ever gone over 4gb in use, and that took like 10 apps + a game on dual screens to do heh.
 
I would like to see what some of your pagefile.sys filesizes are.

I am on WIN7x64 with 4GB of RAM, using about 2GB fairly often and my C:\pagefile.sys is at about 4GB. What the hell could it be using 4GB for?
 
I haven't had a chance to read all the posts on this thread, but I will say that in my personal experience disabling the Windows page file is the single biggest performance improvement I've ever seen, without changing hardware. I've been doing this on systems ever since I passed the 2GB line with Windows XP, and while it can cause problems (if you have lots of programs open at the same time) Windows will usually warn you with 'low memory' errors before anything serious happens. If that occurs, just close a few programs; if it persists, or if you don't want to close anything, then consider going back to having a page file.

For the record, I currently use five systems - all with the page file turned off. They have 6, 4, 3, 3, and 2GB of RAM each, and the only one where I have any problems is the 2GB system (my computer at work); I've found that simply restarting Internet Explorer once or twice a day usually takes care of things, as IE7 that I am using there doesn't seem to clean up its RAM usage very well after closing tabs.

On all four of the other systems, 512MB - 1GB of the memory is also designated as a RAMDrive for temp files - and still no problems with the page file being off. You mileage may vary, but it can't hurt to try (unless you crash a program and lose data you were working on - but just be careful when first trying it out and monitor RAM usage via Task Manager).
 
I am on WIN7x64 with 4GB of RAM, using about 2GB fairly often and my C:\pagefile.sys is at about 4GB. What the hell could it be using 4GB for?

Windows 7, if I recall, defaults to a page file of the same size as your physical RAM. The file will exist on the drive whether anything is actually being stored in it or not. I've always been amused by Windows' default behavior: the more RAM you have the bigger a page file it gives you, even though logic would indicate that more RAM means you need less...

My page files are all 0MB, or more correctly do not exist :)
 
I would like to see what some of your pagefile.sys filesizes are.

I am on WIN7x64 with 4GB of RAM, using about 2GB fairly often and my C:\pagefile.sys is at about 4GB. What the hell could it be using 4GB for?

You should manually set it to a static size so it does not shift around and get fragmented. Windows defragmenter has a hard time with the page file it can really cause a mess.
If I were you I would disable pagefile in windows, delete pagefile.sys, then defrag. Then make a new pagefile, set size manually, it will have plenty of room to be created and not fragmented after a defrag. This will require a bunch of reboots but will give you a fresh unfragmented pagefile that you wont have to worry about again.
 
Your page file is going to be whatever size windows sets it at. What the size is currently is not what it's necessarily using. That way it doesn't try to write to a disk and it not have the room, it just takes it a head of time.
 
Let me suggest-
EXCEPT for the OS drive, set up a small partition an all other HDD(s) for nothing except pagefile(s), then partition as desired for remainder of HDD(s),
Minimize pagefile on OS drive (I think Windows wants a few KB)
This has the benefit of putting all pagefile(s) on the fastest parts of HDD(s)
AFAIK, Windows can manage pagefiles on multiple drives.
I have not experimented with various cluster sizes for the swapfile containing partitions.
If you use PhotoShop or other programs that want their own swap space, consider using the same strategy.
 
Back
Top