Page 1 of 1

Disable pagefile in Windows

Posted: Mon Feb 11, 2013 9:34 pm
by BMW
I have a laptop with 2GB RAM, running Windows XP.

I disabled the pagefile, and I reckon it runs significantly better. I have on average 1.3GB of spare ram.

I have seen a few articles which suggest that you shouldn't disable the pagefile even if you have heaps of RAM. Is this a valid suggestion? Why?

Should I keep it disabled, provided I don't do any memory hogging activities such as video editing? (I play some games which use max 500MB of ram).

Re: Disable pagefile in Windows

Posted: Mon Feb 11, 2013 11:10 pm
by thepowersgang
Disabling the pagefile on windows is a bad idea, as it reduces the memory management tricks windows can do. According to an article someone linked here a few days ago (might look for it later), Windows will write lesser-used pages to disk but keep them in memory, allowing it to do a quick eviction if that memory is needed for some other task (which might be as extra disk cache, which is quite useful when doing IO).

Removing the pagefile also means that if a process starts chewing memory, you don't have the pagefile buffer before the system runs out of memory, and either BSODs, kills some unlucky process to free up memory, or hard locks (without the task manager being accessible, because there's no memory for it)

Re: Disable pagefile in Windows

Posted: Mon Feb 11, 2013 11:37 pm
by JackScott
I do disable the pagefile on some systems with SSDs. I'm unsure of how relevant this with the new SSDs coming out now, but with older ones it was better to disable swaps and pagefiles so that you didn't burn out the limited writes on SSDs. Somebody with more knowledge in that area might be able to update us on how relevant that is to today's hardware.

Disabling swap is also a great way to free up a few gigs of space on a small SSD... helpful if you've only got a 60GB SSD.

Re: Disable pagefile in Windows

Posted: Tue Feb 12, 2013 12:51 am
by iansjack
"Reckon" is not a good way of determining computer performance. You think that diabling the swap file is going to improve performance, so that is what you see; the truth may be far from that. To measure performance you need to measure, not guess.

Personally, I wouldn't disable swap. It means that when Windows reserves in advance memory that it may or may not later use it has to reserve that space in RAM rather than on the swap file. The result is less RAM available for other purposes (such as disk caching), which means poorer performance and increased risk of a system crash.

If you want to improve performance add more RAM and/or a SSD.

Re: Disable pagefile in Windows

Posted: Tue Feb 12, 2013 3:06 am
by BMW
iansjack wrote:"Reckon" is not a good way of determining computer performance. You think that diabling the swap file is going to improve performance, so that is what you see; the truth may be far from that. To measure performance you need to measure, not guess.

Personally, I wouldn't disable swap. It means that when Windows reserves in advance memory that it may or may not later use it has to reserve that space in RAM rather than on the swap file. The result is less RAM available for other purposes (such as disk caching), which means poorer performance and increased risk of a system crash.

If you want to improve performance add more RAM and/or a SSD.
Fair comment about measuring performance.

Everyone seems to say this; Less RAM for other purposes because it is reserving memory in the RAM rather than the pagefile. However when on average I have 1.3GB of unused RAM, I don't see this as a problem. I don't think I have ever seen it below 0.8GB

Also it would help to increase hard disk life.

Another thing that confuses me is this:
Some people with lots of RAM create a "Ram disk" (simply a chunk of RAM reserved for file storage), and put the pagefile on the RAM disk. I don't see the point in this, they may as well disable paging!!!!

EDIT: Why doesn't someone make a computer with 2 RAMs... one for swap area and one for the RAM? But then the argument above applies... use it all for RAM.

EDIT#2: Imagine if you had 2 rooms to store stuff in. You put the stuff into a main room, but move some of it to another room (this sounds like swapping...) when it gets full. You might as well get a bigger room and not have to shift stuff!

Re: Disable pagefile in Windows

Posted: Tue Feb 12, 2013 6:55 am
by iansjack
What you are really asking is "can I manually manage memory better than Windows, with all its knowledge of what is happening at any instant, can?". I'm not sure about XP but when it comes to 7 and 8, which have fairly sophisticated memory management, I would say the answer is "No". You are looking for a solution that will apply under all conditions; Windows adjusts its solution constantly to meet current demands and resource availability.

Re: Disable pagefile in Windows

Posted: Tue Feb 12, 2013 8:19 pm
by BMW
iansjack wrote:What you are really asking is "can I manually manage memory better than Windows, with all its knowledge of what is happening at any instant, can?". I'm not sure about XP but when it comes to 7 and 8, which have fairly sophisticated memory management, I would say the answer is "No". You are looking for a solution that will apply under all conditions; Windows adjusts its solution constantly to meet current demands and resource availability.
Ok, nice way to put it. I think I'll re-enable swapping.