Disable pagingfile

KoolDrew

Lifer
Jun 30, 2004
10,226
7
81
Many people say that you can simply disable the paging file if you have alot of RAM and not run into any problems depednign on what you run. Do you guys think disabling the paging file is a good idea? I know it isn't but I need a technical explanation on why it is not. As I read plenty of guides on the internet and plenty of them reccomend disabling the pagefile if you have 1GB of RAM or over.
 

KoolDrew

Lifer
Jun 30, 2004
10,226
7
81
The DisablePagingExecutive tweak does not disable the paging file. It forces XP to keep the kernel (the core of the operating system) in RAM which is not a good tweak since Windows basically does this anyway unless it needs the space. So basically that tweak does nothing.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Wow, I was hoping that we'd seen the last of these threads since there was a bit of a drought.

As I read plenty of guides on the internet and plenty of them reccomend disabling the pagefile if you have 1GB of RAM or over.

The Internet is written by people, some are smarter than others. Think about it, do you really think those people would be writing tweak guides on the Internet if they knew more about the NT VM than the people that wrote it? I can post a web page that says that Windows 98 was the most stable OS ever created, would you believe that?

So basically that tweak does nothing.

Which is true of most of them. If the defaults sucked so badly, do you really think MS would have made them the defaults?

NT was designed with the assumption that everything in memory has a backing store on disk, for most things this is the file it was paged in from so there's no problem there. If NT decides to free the memory that was being used by firefox.exe all it has to do to get it back is to page it back in from the filesystem, but what about stuff that has no original file? But what about an image in the GIMP after having run a few filters on it? The current image, history data, etc are probably bigger than the original image itself and NT has to have a place to put it if it needs the memory and that place is the pagefile. Process private data, anything modified in memory, anonymous shared memory, etc all need a backing store and that pretty much has to be the pagefile since there's no where else to put them.
 

Budman

Lifer
Oct 9, 1999
10,980
0
0
Originally posted by: Nothinman
Wow, I was hoping that we'd seen the last of these threads since there was a bit of a drought.

As I read plenty of guides on the internet and plenty of them reccomend disabling the pagefile if you have 1GB of RAM or over.

The Internet is written by people, some are smarter than others. Think about it, do you really think those people would be writing tweak guides on the Internet if they knew more about the NT VM than the people that wrote it? I can post a web page that says that Windows 98 was the most stable OS ever created, would you believe that?

So basically that tweak does nothing.

Which is true of most of them. If the defaults sucked so badly, do you really think MS would have made them the defaults?

NT was designed with the assumption that everything in memory has a backing store on disk, for most things this is the file it was paged in from so there's no problem there. If NT decides to free the memory that was being used by firefox.exe all it has to do to get it back is to page it back in from the filesystem, but what about stuff that has no original file? But what about an image in the GIMP after having run a few filters on it? The current image, history data, etc are probably bigger than the original image itself and NT has to have a place to put it if it needs the memory and that place is the pagefile. Process private data, anything modified in memory, anonymous shared memory, etc all need a backing store and that pretty much has to be the pagefile since there's no where else to put them.


:thumbsup:


Why arent you an Elite member yet? :)
 

shortylickens

No Lifer
Jul 15, 2003
80,287
17,081
136
I have one gigabyte of OCZ PC-3500EB with an Athlon 64 3400+.
Having this much RAM with a proccessor using an onboard memory controller, I found its better to force Windows.
I just use a SET 256 MB swap file. EVERYTHING runs smoother for me.

Don't eliminate it entirely. Many programs get spastic if they dont see at least a little virtual memory. Heavy video editors also need more even if you have tons of Physical RAM.
 

jvarszegi

Senior member
Aug 9, 2004
721
0
0
Originally posted by: Budman
Originally posted by: Nothinman
Wow, I was hoping that we'd seen the last of these threads since there was a bit of a drought.

As I read plenty of guides on the internet and plenty of them reccomend disabling the pagefile if you have 1GB of RAM or over.

The Internet is written by people, some are smarter than others. Think about it, do you really think those people would be writing tweak guides on the Internet if they knew more about the NT VM than the people that wrote it? I can post a web page that says that Windows 98 was the most stable OS ever created, would you believe that?

So basically that tweak does nothing.

Which is true of most of them. If the defaults sucked so badly, do you really think MS would have made them the defaults?

NT was designed with the assumption that everything in memory has a backing store on disk, for most things this is the file it was paged in from so there's no problem there. If NT decides to free the memory that was being used by firefox.exe all it has to do to get it back is to page it back in from the filesystem, but what about stuff that has no original file? But what about an image in the GIMP after having run a few filters on it? The current image, history data, etc are probably bigger than the original image itself and NT has to have a place to put it if it needs the memory and that place is the pagefile. Process private data, anything modified in memory, anonymous shared memory, etc all need a backing store and that pretty much has to be the pagefile since there's no where else to put them.

:thumbsup:

Why arent you an Elite member yet? :)
:thumbsdown:

Maybe because his posts contain incorrect statements, but I don't know for sure. Anyway, NT was not designed with the assumption that everything in memory has a backing store; for something to be backed by a disk means that its data is copied on disk.

Let's think through some examples to weed out the truth here:


1. Person A has a machine with 1GB of RAM and a 1.5GB page file. He runs programs that occasionally use slightly more than 1GB of memory, although not often enough to warrant buying more RAM; if this happens he just shuts down some programs to free memory and continues on.

This person needs a page file, because he runs out of memory. Note that if his machine uses more than 2.5 total gigs of memory, it will crash; of course, extreme system slowness will delay this quite a bit in most cases.


2. Person B has a machine with 3GB of RAM and a 1.5GB page file. She runs programs that occasionally use up to 1.5GB of memory, still nowhere near the 3GB of RAM she's got.

This person doesn't need her page file; she's got more RAM than the RAM and page file of person A, combined. Her total memory requirements never even approach the amount of RAM she's got. However, there's little harm in having a page file around, just in case.


The main use of the page file is to provide more virtual memory to the machine than it has available as RAM, mostly for emergency situations. It does not "back" RAM, it extends it. For machines with plenty of RAM, there's no need for a page file (hard disks are much cheaper than volatile memory); however, it's not a bad idea to have one as an emergency mechanism, UNLESS the memory needs of a particular machine can be perfectly predicted.

In the situation of Person A you see one real value of a page file, even in a system with lots of RAM. In effect, it allows your machine to keep functioning, but at a serious performance drop. This slowness can actually be useful in delaying out-of-memory errors, when they do happen. In any case, if you haven't prepared ahead of time with enough RAM, you need a page file.

Edit: shortylickens is right about some older programs (especially ones written for Windows 98) not being able to run if the page file is disabled.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
or something to be backed by a disk means that its data is copied on disk.

No it doesn't, it simply means it has a place on disk in case the memory needs freed, which is what pagefile reservations are for.

The main use of the page file is to provide more virtual memory to the machine than it has available as RAM

Not true, a 32-bit machine always has 4G VM no matter how much phyiscal memory and pagefile space is available.

 

bsobel

Moderator Emeritus<br>Elite Member
Dec 9, 2001
13,346
0
0
for something to be backed by a disk means that its data is copied on disk.

No it doesn't. Executable images are backed by disk, paged from the original file as needed. The data isn't copied to peform this.

Edit: shortylickens is right about some older programs (especially ones written for Windows 98) not being able to run if the page file is disabled.

Has nothing to do with programs, there are certain system api's and events which simply require a pagefile. Two examples, NULL memory mapped files (always backed to the page file regardless of memory) and system memory dumps (full dumps).

Maybe because his posts contain incorrect statements

Don't go taking swipes at users like Nothinman unless your damm sure you know what your talking about.

Bill
 

jvarszegi

Senior member
Aug 9, 2004
721
0
0
Originally posted by: Nothinman
or something to be backed by a disk means that its data is copied on disk.

No it doesn't, it simply means it has a place on disk in case the memory needs freed, which is what pagefile reservations are for.

The main use of the page file is to provide more virtual memory to the machine than it has available as RAM

Not true, a 32-bit machine always has 4G VM no matter how much phyiscal memory and pagefile space is available.

You're actually wrong on both points, but I won't argue more about the first. But about the second, you should realize instantly how silly your statement is. 32-bit systems can address 4GB-- that doesn't mean that they all have it. Go check your performance tab in Windows right now. ;)
 

bsobel

Moderator Emeritus<br>Elite Member
Dec 9, 2001
13,346
0
0
Not true, a 32-bit machine always has 4G VM no matter how much phyiscal memory and pagefile space is available.

I think you mean to say each process, not each machine.
Bill
 

jvarszegi

Senior member
Aug 9, 2004
721
0
0
Originally posted by: bsobel
for something to be backed by a disk means that its data is copied on disk.

No it doesn't. Executable images are backed by disk, paged from the original file as needed. The data isn't copied to peform this.

Edit: shortylickens is right about some older programs (especially ones written for Windows 98) not being able to run if the page file is disabled.

Has nothing to do with programs, there are certain system api's and events which simply require a pagefile. Two examples, NULL memory mapped files (always backed to the page file regardless of memory) and system memory dumps (full dumps).

Maybe because his posts contain incorrect statements

Don't go taking swipes at users like Nothinman unless your damm sure you know what your talking about.

Bill

I am damn sure. Doesn't have anything to do with programs, eh? :confused::confused:;) Try disabling your paging file, then find one Windows feature that won't run. We don't need to descend into a discussion of memory-mapped files (although if you really really want, we can).

By "copied on disk" what I meant was that a copy exists on disk. Sorry for the slight nitpicky mistake, um, "troll"?
 

bsobel

Moderator Emeritus<br>Elite Member
Dec 9, 2001
13,346
0
0
I am damn sure. Doesn't have anything to do with programs, eh? :confused::confused:;) Try disabling your paging file, then find one Windows feature that won't run. We don't need to descend into a discussion of memory-mapped files (although if you really really want, we can).

I gave you two specific cases where a page file is required. The first is an API that will fail if one is not available, the second is a system feature (which some users may not want) that does require a page file of at least 64k + size of physical memory.

By "copied on disk" what I meant was that a copy exists on disk. Sorry for the slight nitpicky mistake, um, "troll"?

Fair enough, misread how you meant that. Why do you think that allows you to start calling names?

Also, curious, what is your background in this?

Bill


 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Originally posted by: jvarszegi
Originally posted by: bsobel
for something to be backed by a disk means that its data is copied on disk.

No it doesn't. Executable images are backed by disk, paged from the original file as needed. The data isn't copied to peform this.

Edit: shortylickens is right about some older programs (especially ones written for Windows 98) not being able to run if the page file is disabled.

Has nothing to do with programs, there are certain system api's and events which simply require a pagefile. Two examples, NULL memory mapped files (always backed to the page file regardless of memory) and system memory dumps (full dumps).

Maybe because his posts contain incorrect statements

Don't go taking swipes at users like Nothinman unless your damm sure you know what your talking about.

Bill

I am damn sure. Doesn't have anything to do with programs, eh? :confused::confused:;) Try disabling your paging file, then find one Windows feature that won't run. We don't need to descend into a discussion of memory-mapped files (although if you really really want, we can).

By "copied on disk" what I meant was that a copy exists on disk. Sorry for the slight nitpicky mistake, um, "troll"?

Out of curiosity, what do you do? Either for a living, or as a hobby, that would make you someone we would want to listen to when it comes to things like this. I know bsobel's, and I've been corrected enough by Nothinman to accept much of what he says with a certain amount of faith.
 

jvarszegi

Senior member
Aug 9, 2004
721
0
0
Originally posted by: bsobel
I am damn sure. Doesn't have anything to do with programs, eh? :confused::confused:;) Try disabling your paging file, then find one Windows feature that won't run. We don't need to descend into a discussion of memory-mapped files (although if you really really want, we can).

I gave you two specific cases where a page file is required. The first is an API that will fail if one is not available, the second is a system feature (which some users may not want) that does require a page file of at least 64k + size of physical memory.

By "copied on disk" what I meant was that a copy exists on disk. Sorry for the slight nitpicky mistake, um, "troll"?

Fair enough, misread how you meant that. Why do you think that allows you to start calling names?

Also, curious, what is your background in this?

Bill

Fair enough on the system memory dump. If I knew that, I'd forgotten it long ago. Most of my hands-on system programming experience was on the VAX, not Windows, and a while ago anyway. That doesn't mean that I don't know what virtual memory is, or what a page file's good for in Windows. I've been a SQL Server 2000 DBA in addition to my other roles, which also included doing some extensive mucking about with Windows Server (NT, 2000, and 2003) at my last job, but I was never an MCSE or anything. I've just been a programmer/database guy for years.

Here goes:

bsobel, sorry I called you a troll. Thanks for being ultra-reasonable.

Nothinman, I don't mean to say that you don't know what you're doing, so I'm sorry.

However, nobody needs a page file in Windows if they have more than enough RAM (unless they have rare needs related to a specific program). I still advocate using them because at the most you lose a couple of gigs of cheap hard disk space, and your machine is more all-around capable.
 

jvarszegi

Senior member
Aug 9, 2004
721
0
0
Originally posted by: n0cmonkey
Out of curiosity, what do you do? Either for a living, or as a hobby, that would make you someone we would want to listen to when it comes to things like this. I know bsobel's, and I've been corrected enough by Nothinman to accept much of what he says with a certain amount of faith.

My hobby is posting on AnandTech message boards. Want to or not, you did listen. Thanks for your valuable time.
 

bsobel

Moderator Emeritus<br>Elite Member
Dec 9, 2001
13,346
0
0
However, nobody needs a page file in Windows if they have more than enough RAM (unless they have rare needs related to a specific program). I still advocate using them because at the most you lose a couple of gigs of cheap hard disk space, and your machine is more all-around capable.

The main reason I keep pushing people to keep them on is 1) the full dumps (system crashes should be rare, but when the occur it's sure nice to truely figure out why and fix it) and 2) while few programs actually use the api I mentioned if an application does it can cause confusion to users when the application errors. So, I'm with you that given modern drives, the few gig of space isn't a huge problem (IMHO)



 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Originally posted by: jvarszegi
Fair enough on the system memory dump. If I knew that, I'd forgotten it long ago. Most of my hands-on system programming experience was on the VAX, not Windows, and a while ago anyway. That doesn't mean that I don't know what virtual memory is, or what a page file's good for in Windows. I've been a SQL Server 2000 DBA in addition to my other roles, which also included doing some extensive mucking about with Windows Server (NT, 2000, and 2003) at my last job, but I was never an MCSE or anything. I've just been a programmer/database guy for years.

Here goes:

bsobel, sorry I called you a troll. Thanks for being ultra-reasonable.

Nothinman, I don't mean to say that you don't know what you're doing, so I'm sorry.

However, nobody needs a page file in Windows if they have more than enough RAM (unless they have rare needs related to a specific program). I still advocate using them because at the most you lose a couple of gigs of cheap hard disk space, and your machine is more all-around capable.

This is one of the things that makes the OS forum so great. There can be little disagreements, but they don't get out of hand and generally people are pretty damned cool about it. :)
:beer:

EDIT: I usually advocating keeping the pagefile or whatever around because if the user has to ask some of the questions we see on here they shouldn't be mucking with that stuff. ;) I'm also not a tweaker anymore. :eek: