Paging File Question

lunarplague

Newcomer
If i turn off paging file, will it work better? or will it just work to it's max potential? or can someone just explain what teh difference between having it on and off does that would be awesome, thanks.
 
Paging file is a must for most apps and games. Even though you may have 2Gb of RAM, they will request it. Try disabling it and run Doom right after....
 
Generally speaking, turning it off is dumb. It'll just make your comp behave weirdly if it runs out of memory, possibly crash, and some programs won't even start.
 
This is gumph.

If you never, ever, run out of memory, then the paging file will do nothing for you, and indeed, your PC may run slower as the OS doesn't realise you're not going to run out of memory and pages stuff off to ensure there's plenty of memory for those apps you might (but won't) run later.

On the other hand, if you do hit your limit, then no page file is a bad thing. It also means that if you experience a memory leak you really won't get time to do anything about it.

On the upside, you won't need to worry about things like your passwords sitting around in a large file which you should be wiping on shutdown but probably aren't (which would delay shutdown anyway).

Remember, if you know what you're doing, you are smarter than your OS. There is no reason that you must have a page file. It's like constantly being told you don't have enough RAM in the machine. Don't be fooled into thinking the page file is anything special, it's just RAM on the HD, and the OS will use it to try and ensure that you're always accessing programs out of RAM.

On a desktop OS, if you bought enough memory, you can disable this. Frankly, I'd say turn it off and if you run into "Not enough memory/virtual memory" messages, switch it back on.

If you haven't turned off memory dumps in Windows, you will need a page file large enough to handle it (64KB on a desktop system)... though Windows will create a page file on the fly.
 
been there done that - had a gig of ram and turned of the paging file - just got wierd errors even when I obviously wasnt running out of memory. Its a pipe dream - a mere theory - that when you disable it, your RAM does all the work. Malarky.
 
Quitch said:
If you never, ever, run out of memory, then the paging file will do nothing for you, and indeed, your PC may run slower as the OS doesn't realise you're not going to run out of memory and pages stuff off to ensure there's plenty of memory for those apps you might (but won't) run later.
Remember you can't disable paging, just the page file. Often programs alloc a great deal more memory than they are ever going to actually use - if you've disabled the page file then the requested addresses will have to be assigned to physical RAM. It's a total waste. You'll then find that things like vcache also get stuck in RAM, which might be better utilised by other software. Just because you don't run out of memory doesn't mean you are using that memory efficiently.
 
thop said:
photoshop won't start without a pagefile. there are other apps that do the same.

The problem is that PS allocates a (high) percentage of physical memory on startup. Since PS does it's own explicit, file based, paging it is safe to lower this percentage and disable paging.

Cheers
Gubbi
 
Guden Oden said:
Generally speaking, turning it off is dumb. It'll just make your comp behave weirdly if it runs out of memory, possibly crash, and some programs won't even start.

If your computer crashes because it runs out of memory then you're not using a proper OS.

The only difference between not using and using a page file is that in the former case your OS will start to kill processes when it runs out of memory, in the latter it will grind to a halt before getting to that point.

You should only have a small, fixed size paging file, say 256-512MB. Then if you experience slow downs regurlarly, you keep adding DIMMS until the slow downs dissapear.

Cheers
Gubbi
 
Diplo said:
Quitch said:
If you never, ever, run out of memory, then the paging file will do nothing for you, and indeed, your PC may run slower as the OS doesn't realise you're not going to run out of memory and pages stuff off to ensure there's plenty of memory for those apps you might (but won't) run later.
Remember you can't disable paging, just the page file. Often programs alloc a great deal more memory than they are ever going to actually use - if you've disabled the page file then the requested addresses will have to be assigned to physical RAM. It's a total waste. You'll then find that things like vcache also get stuck in RAM, which might be better utilised by other software. Just because you don't run out of memory doesn't mean you are using that memory efficiently.

Rubbish, memory access times are so fast that it doesn't matter even if redundant data is being held there. It would only matter in the slightest if it meant data that needed to be in RAM could no longer fit there.

You're far more likely to notice the effect of data being paged than you are redundant data being stored in RAM.

Windows 2K+ won't crash if you don't have a large enough page file, it will simply increase the size of you existing one (even from 0). If you find it does this, then you will need a page file.

I have no idea why Photoshop has to have a page file. Don't pretend it's anything special, it's not. It's RAM on your hard disc, really slow RAM, used as a backup and a store for getting things out of memory so that important data, and things that need to respond quickly, can be stored there. If you have enough memory, there is no reason to have a page file. It would be like shoving in another stick of memory even though your current RAM is never fully utilised.

Unlike Gubbi, I'd shove in a gig of memory and have no page file. For 95% of desktops this is more than you will ever need. If you do some really memory heavy stuff, then you might find a page file useful, but then that's what performance monitoring is for, you can see if you need one of not simply by keeping track of your peak memory usage.
 
Quitch said:
Rubbish, memory access times are so fast that it doesn't matter even if redundant data is being held there. It would only matter in the slightest if it meant data that needed to be in RAM could no longer fit there.
You're not understanding. Let me give you an example:

You have 512MB of RAM and have disabled the page file. You boot into windows and browse a few directories. Notice how a directory with lots of files in it is slow to list the first time, but not on subsequent times (because it's now cached in RAM). You then run a few standard programs, such as browser and email etc. All of these programs will allocate memory and often load up common DLLs. First, most DLLs will remain memory resident even after quitting a program and second many programs don't free memory efficiently (Windows API doesn't help).

Now you decide to play the latest and greatest 3D game, which we shall call 'Gloom 5'. For performance sake 'Gloom' tries to grab as much free memory as possible to cache it's huge allocation of textures and sounds (in order to lessen hitches). But 'Gloom' finds that VCache (file cache) is allocated 128MB of RAM, and that another 100MB is allocated to DLLs from previous programs. No problem, normally, we would just farm off this RAM to swap file, leaving physical memory free. However, when there's no page file then either the alloc fails or less memory is allocated than is ideal. The memory is not being used efficiently.
 
Diplo said:
Now you decide to play the latest and greatest 3D game, which we shall call 'Gloom 5'. For performance sake 'Gloom' tries to grab as much free memory as possible to cache it's huge allocation of textures and sounds (in order to lessen hitches). But 'Gloom' finds that VCache (file cache) is allocated 128MB of RAM, and that another 100MB is allocated to DLLs from previous programs. No problem, normally, we would just farm off this RAM to swap file, leaving physical memory free.

The file cache most certainly does not end up in your page file (or swap partition). The whole point of the file cache is to avoid going to the disks for frequently accessed files.When you're running low on ram the OS simply deallocates parts of the file cache. Moving the contents of the file cache to the page file would be more costly, since you'd have to read data off the harddisk in any event, but you'd also have to put the contents of the file cache in the page file.

Cheers
Gubbi
 
I saw a complex article that explained why swap was essential and is a performance boost, no matter how much physical memory you have. Seemingly it is mathematically provable or something.

That referred to Linux, but the same thing applies to Windows. Of course, if you want decent swap performance, you need a modern (i.e. high speed) harddrive just for the swap file ;).
 
Dio said:
I saw a complex article that explained why swap was essential and is a performance boost, no matter how much physical memory you have. Seemingly it is mathematically provable or something.

That referred to Linux, but the same thing applies to Windows. Of course, if you want decent swap performance, you need a modern (i.e. high speed) harddrive just for the swap file ;).
On top of that, for best performance, you generally want your swap drive/partition/file to be on a separate drive from the OS so that there's less disk thrashing.
 
You didn't even give me chance to finish me pint earlier so I had to stay up and have a couple more...
 
Gubbi said:
The file cache most certainly does not end up in your page file (or swap partition).
Well, you might be correct on that particular point, though from my experience with Windows you can never discount some of the strange things it does with memory management :) Not sure if it's true for NT kernel, but certainly on 9x, there was always a minium value for file cache indicating that you had to keep at least some of it in memory. I would have presumed it would be better, in some circumstances, to page it to swap rather than keep it in physical RAM.

Regardless, though, I think my wider point remains - thats it's less efficient to reduce your overall memory allocation by disabling the page file. I cannot really see the point.
 
Back
Top