Do I need a Page File?

B

boe

I have 2 GIGs of ram. I don't think I've ever seen my task manager tell me
I was using more than 1 GIG of RAM. I'd like to avoid it ever being
touched. Can I do that or does Windows XP really need the page file to run?
 
M

Malke

boe said:
I have 2 GIGs of ram. I don't think I've ever seen my task manager
tell me
I was using more than 1 GIG of RAM. I'd like to avoid it ever being
touched. Can I do that or does Windows XP really need the page file
to run?

Why would you not want the RAM to be "touched"? RAM is meant to be used;
that is what it is for. If you are so cramped for space that you are
worrying about the page file, buy a larger hard drive.

Malke
 
K

Ken Blake, MVP

boe said:
I have 2 GIGs of ram. I don't think I've ever seen my task manager
tell me I was using more than 1 GIG of RAM. I'd like to avoid it
ever being touched. Can I do that or does Windows XP really need the
page file to run?


Yes.

Note two important points:

1. Windows preallocates things to memory, before it even needs them; in many
cases some of those preallocations are never used. Some of those
preallocations are made in the page file. If there is no page file, all
those allocations which will never be used have to made in real memory. The
result is that getting rid of the page files means that you will never be
able to use all of your real memory.

2. There is no possible benefit to getting rid of the page file. If Windows
never needs to use it, then it won't (don't mix up allocation to it with use
of it). Having it there so it's available if you need it can only help you.
It never hurts you.

For more information, read this article by the late Alex Nichol, MVP:

"Virtual Memory in Windows XP" http://www.aumha.org/win5/a/xpvm.htm
 
B

boe

Sorry - I wasn't clear. I don't want my pagefile/hard drive to be used for
processes that could be handled by the RAM. I'm not concerned about disk
size. My goal is to have my PC run as fast as possible.
 
R

Rock

boe said:
Sorry - I wasn't clear. I don't want my pagefile/hard drive to be used for
processes that could be handled by the RAM. I'm not concerned about disk
size. My goal is to have my PC run as fast as possible.

Then use the page file. It's an integral part of XP virtual memory
operations.
 
J

Jim

Ken Blake said:
Yes.

Note two important points:

1. Windows preallocates things to memory, before it even needs them; in many
cases some of those preallocations are never used. Some of those
preallocations are made in the page file. If there is no page file, all
those allocations which will never be used have to made in real memory. The
result is that getting rid of the page files means that you will never be
able to use all of your real memory.

This is the one topic that always get me riled up. Windows may indeed
require the paging file, but it's totally illogical. If our systems had
unlimited amounts of RAM, we wouldn't even NEED a paging file. In
*therory*, the paging file ONLY exists for paging real memory into virtual
memory when real memory is otherwise exhausted. That's the ONLY reason the
concept even exists! Again, and this is key, if we had oodles and ooldes of
cheap RAM, why in the world would anyone have a paging file? Heck, how can
it be more efficient EVER to take something OUT of RAM and write to the HD,
one of the slowest components in the system? That's precisely why we tell
ppl to ADD RAM when paging gets out of hand.

If I have 500 gazillion bytes of RAM, I sure as heck want Windows to stuff
everything it needs in memory into that RAM, not on some slow virtual memory
paging file!

It's NEVER EVER EVER more efficient to take something out of RAM and stick
it into a HD's file, EVER. The fact that MS does this is NOT because it's
efficient, it's because MS has abused the concept of the virtual paging
system for other purposes. In theory, you should be able to completely rip
out the virtual paging subsystem and continue using the OS normally. The
only issue, if you did this, would be, of course, that once RAM was
exhausted, you're DEAD. Virtually memory is merely a lifeboat because RAM
is not inexhaustable, and until recently, could not be had in great amounts
at economical prices. But I say for third time, if we had endless amounts
of RAM, noone would have invented the virtual paging system at all.
EVERYTHING would be loaded into memory and left there, we're it's most
efficiently stored and accessed.

What has happened is that MS has so distorted the purpose and use of the
paging file, that it has now built-in various dependencies, such as
described here by the MVP. I've noticed myself that when I have tons of RAM
available, damn Windows insists on still using of the paging file. THIS IS
CRAZY! Windows should use RAM period. And if RAM is exhausted, THEN and
ONLY then should the virtual memory subsystem page RAM in and out of the
paging file. But as I said, it doesn't surprise me that MS has messed up
Windows by using the virtual paging system for purposes it was never
intended.

Sorry folks, but this is one topic I see repeatedly talked about and totally
misunderstood by even the MVPs. If I have 4GB of RAM on my system, there's
no good reason, in theory, if the virtual memory subsystem is being used
*properly* that I can't disable it. My only disadvantage should be that if
I indeed exahust RAM, I'm dead. That's the risk I take, and should be the
ONLY risk I face.

2. There is no possible benefit to getting rid of the page file. If Windows
never needs to use it, then it won't (don't mix up allocation to it with use
of it). Having it there so it's available if you need it can only help you.
It never hurts you.

Ironically, it's because MS abuses the virtual memory subsystem that having
the virtual memory subsystem enabled actually *may* hurt you, at least in
terms of performance. At least if I disable it, that FORCES Windows to use
RAM, not the stupid paging file. If you're telling me that when the paging
file is disabled, I won't be able to take advantage of these
"preallocations", it's only because Windows is coded up to differenitate
between a pagable and non-pagable system. IOW, when the page file is
disabled, Windows doesn't preallocate, when paging is enabled, it does. But
that's just bad programming, Window should be allocating RAM as necessary in
real memory, ALL THE TIME. The virtual memory subsystem should be managing
the memory access, with the understanding that when real memory is nearing
exhaustion, it's off to the paging file we go (if present), and should be
completely transparent to Windows generally.

That's why I say, Windows may indeed work the way you describe, but by doing
so, it's created a situation that makes it difficult for ppl to disable the
paging file, and for no good reason. If Windows actually only used the
paging file when RAM was truly exhausted, I'd be in FULL AGREEMENT that
there's no good reason not to have it enabled, just in case. But
ironically, it's because Windows *does* abuse the paging file, in fact uses
it long before RAM is anywhere near exhaustion, that I'm actually MORE
inclined to disable it, if only to stop Windows from doing this! At least
it forces Windows to always use RAM.

JMTC

Jim
 
K

Ken Blake, MVP

boe said:
Sorry - I wasn't clear. I don't want my pagefile/hard drive to be
used for processes that could be handled by the RAM. I'm not
concerned about disk size. My goal is to have my PC run as fast as
possible.


What you want to do will *not* make the computer run any faster. Turning off
the page file only has negative effects, never positive ones.
 
K

Ken Blake, MVP

Jim said:
This is the one topic that always get me riled up. Windows may indeed
require the paging file, but it's totally illogical. If our systems
had unlimited amounts of RAM, we wouldn't even NEED a paging file.


True, but irrelevant. We don't have unlimited amounts of RAM.

Even if we had unlimited amounts of RAM, having a page file wouldn't be
necessary, but would still not hurt us.

In
*therory*, the paging file ONLY exists for paging real memory into
virtual memory when real memory is otherwise exhausted. That's the
ONLY reason the concept even exists! Again, and this is key, if we
had oodles and ooldes of cheap RAM, why in the world would anyone
have a paging file? Heck, how can it be more efficient EVER to take
something OUT of RAM and write to the HD, one of the slowest
components in the system?


If there's enough RAM, the only time that happens is during preallocation.
It happens a single time and has hardly any effect on efficiency at all. If
it should turn out that thosepreallocations are needed and do get used, it
results in a savings of time, not a loss of time. It's like a bet and one
that's in your favor. You're betting a small amount (a very slight loss of
time) against a larger one (if the preallocation is later used ).

That's precisely why we tell ppl to ADD
RAM when paging gets out of hand.

If I have 500 gazillion bytes of RAM, I sure as heck want Windows to
stuff everything it needs in memory into that RAM, not on some slow
virtual memory paging file!


Sure. But you don't have 500 gazillion bytes.

It's NEVER EVER EVER more efficient to take something out of RAM and
stick it into a HD's file, EVER. The fact that MS does this is NOT
because it's efficient, it's because MS has abused the concept of the
virtual paging system for other purposes.


Not true. You misunderstand how it works. Read Alex's article.

In theory, you should be
able to completely rip out the virtual paging subsystem and continue
using the OS normally. The only issue, if you did this, would be, of
course, that once RAM was exhausted, you're DEAD. Virtually memory
is merely a lifeboat because RAM is not inexhaustable, and until
recently, could not be had in great amounts at economical prices.
But I say for third time, if we had endless amounts of RAM, noone
would have invented the virtual paging system at all. EVERYTHING
would be loaded into memory and left there, we're it's most
efficiently stored and accessed.


And I say again, true but irrelevant. We don't have endless amounts of RAM.
 
R

Richard Urban

Jim said:
This is the one topic that always get me riled up. Windows may indeed
require the paging file, but it's totally illogical. If our systems had
unlimited amounts of RAM, we wouldn't even NEED a paging file. In
*therory*, the paging file ONLY exists for paging real memory into virtual
memory when real memory is otherwise exhausted. That's the ONLY reason
the
concept even exists! Again, and this is key, if we had oodles and ooldes
of
cheap RAM, why in the world would anyone have a paging file? Heck, how
can
it be more efficient EVER to take something OUT of RAM and write to the
HD,
one of the slowest components in the system? That's precisely why we tell
ppl to ADD RAM when paging gets out of hand.

If I have 500 gazillion bytes of RAM, I sure as heck want Windows to stuff
everything it needs in memory into that RAM, not on some slow virtual
memory
paging file!

It's NEVER EVER EVER more efficient to take something out of RAM and stick
it into a HD's file, EVER. The fact that MS does this is NOT because it's
efficient, it's because MS has abused the concept of the virtual paging
system for other purposes. In theory, you should be able to completely
rip
out the virtual paging subsystem and continue using the OS normally. The
only issue, if you did this, would be, of course, that once RAM was
exhausted, you're DEAD. Virtually memory is merely a lifeboat because RAM
is not inexhaustable, and until recently, could not be had in great
amounts
at economical prices. But I say for third time, if we had endless amounts
of RAM, noone would have invented the virtual paging system at all.
EVERYTHING would be loaded into memory and left there, we're it's most
efficiently stored and accessed.

What has happened is that MS has so distorted the purpose and use of the
paging file, that it has now built-in various dependencies, such as
described here by the MVP. I've noticed myself that when I have tons of
RAM
available, damn Windows insists on still using of the paging file. THIS
IS
CRAZY! Windows should use RAM period. And if RAM is exhausted, THEN and
ONLY then should the virtual memory subsystem page RAM in and out of the
paging file. But as I said, it doesn't surprise me that MS has messed up
Windows by using the virtual paging system for purposes it was never
intended.

Sorry folks, but this is one topic I see repeatedly talked about and
totally
misunderstood by even the MVPs. If I have 4GB of RAM on my system,
there's
no good reason, in theory, if the virtual memory subsystem is being used
*properly* that I can't disable it. My only disadvantage should be that
if
I indeed exahust RAM, I'm dead. That's the risk I take, and should be the
ONLY risk I face.



Ironically, it's because MS abuses the virtual memory subsystem that
having
the virtual memory subsystem enabled actually *may* hurt you, at least in
terms of performance. At least if I disable it, that FORCES Windows to
use
RAM, not the stupid paging file. If you're telling me that when the
paging
file is disabled, I won't be able to take advantage of these
"preallocations", it's only because Windows is coded up to differenitate
between a pagable and non-pagable system. IOW, when the page file is
disabled, Windows doesn't preallocate, when paging is enabled, it does.
But
that's just bad programming, Window should be allocating RAM as necessary
in
real memory, ALL THE TIME. The virtual memory subsystem should be
managing
the memory access, with the understanding that when real memory is nearing
exhaustion, it's off to the paging file we go (if present), and should be
completely transparent to Windows generally.

That's why I say, Windows may indeed work the way you describe, but by
doing
so, it's created a situation that makes it difficult for ppl to disable
the
paging file, and for no good reason. If Windows actually only used the
paging file when RAM was truly exhausted, I'd be in FULL AGREEMENT that
there's no good reason not to have it enabled, just in case. But
ironically, it's because Windows *does* abuse the paging file, in fact
uses
it long before RAM is anywhere near exhaustion, that I'm actually MORE
inclined to disable it, if only to stop Windows from doing this! At least
it forces Windows to always use RAM.

JMTC

**************************

Except that Windows XP was designed for certain "minimum" specifications,
and at the time 256 meg of RAM was, more or less, the standard. Under these
circumstances the pageing file is very necessary. But I agree that
Microsoft should have looked into the future a bit and included some sort of
override capability.

--


Regards,

Richard Urban
Microsoft MVP Windows Shell/User

Quote from George Ankner:
If you knew as much as you think you know,
You would realize that you don't know what you thought you knew!
 
J

Jim

Ken Blake said:
True, but irrelevant. We don't have unlimited amounts of RAM.

Even if we had unlimited amounts of RAM, having a page file wouldn't be
necessary, but would still not hurt us.




If there's enough RAM, the only time that happens is during preallocation.
It happens a single time and has hardly any effect on efficiency at all. If
it should turn out that thosepreallocations are needed and do get used, it
results in a savings of time, not a loss of time. It's like a bet and one
that's in your favor. You're betting a small amount (a very slight loss of
time) against a larger one (if the preallocation is later used ).




Sure. But you don't have 500 gazillion bytes.




Not true. You misunderstand how it works. Read Alex's article.

Your missing the point. Alex may be 100% correct about how the paging file
is used, I'm not even challenging his description of how it is used. What
I'm saying is IT SHOULDN'T BE USED THIS WAY!!! In that sense, it may indeed
be academic, we may indeed have to live with this corruption of the virtual
memory subsystem. But those of use w/ gobs of RAM, who bought that RAM
precisely to maximize memory capacity and performance, don't like it because
it reduces Windows performance.

I only used the hypothetical of unlimited RAM to illustrate a point -- the
virtual paging file should NOT be required, NOT that MS hasn't made it a
requirement due to its abuse of the virtual paging file. I should be able
to rip the virtual memory subsystem completely out of Windows and not have
it a affect ANYTHING in Windows OTHER THAN the possibility that I will
exhaust that RAM and have no alternative, like the paging file. I
completely agree though that when I *do*, unfortunately, I probably am
negatively affecting Windows, in the ways Alex describes. THAT'S MY POINT!
This shouldn't be the case.

The problem is that the MVPs have swallowed hook, line and sinker the
"Windows way" when it comes to the virtual memory subsystem. Most don't
even seem to know its history or why it exists at all. Windows has morphed
the virtual memory subsystem into something it was never intended to be. I
have no doubt Windows has a plethora of dependencies on the paging file that
have nothing to do w/ exhaustion of RAM. That's the problem, this shouldn't
be the case. And because it does, I do from time to time disable the paging
file to STOP Windows from behaving badly. When I have gobs of RAM
available, I don't want Windows using the paging file, ever.

Jim
 
K

Ken Blake, MVP

Jim said:
Your missing the point. Alex may be 100% correct about how the
paging file is used, I'm not even challenging his description of how
it is used. What I'm saying is IT SHOULDN'T BE USED THIS WAY!!! In
that sense, it may indeed be academic, we may indeed have to live
with this corruption of the virtual memory subsystem. But those of
use w/ gobs of RAM, who bought that RAM precisely to maximize memory
capacity and performance, don't like it because it reduces Windows
performance.


You think I missed the point, but I think *you* miss the point. It *doesn't*
reduce Windows performance.
 
D

D@annyBoy

an advice from a user, not an expert
with 2gb of RAM, set your pagefile to min and max at 512Mb

While sipping a glass of wine, I read that boe wrote in
 
B

boe

Yeah, it doesn't seem like MS has kept up with hardware changes. I remember
they used to recommend the PF be at least twice the size of the RAM - in
that case if I had 4GB of RAM I'd want a 8GB PF? Seems contrary to logic if
the PF is to handle RAM overflow. Has anyone here tried to run their PF
off a flash drive?
 
D

D@annyBoy

sounds interesting :)

maybe I should try putting the PF in the ramdisk


While sipping a glass of wine, I read that boe wrote in
 
D

David Candy

It is more than an integral part of XP. It is an integral part of the CPU, the motherboard, and the OS. Even programs expect to be paged.
 
F

Frank

If I am correct, going along with what Jim added to this thread.
A total page file of RAM +12 is needed for a memory dump.....
 
D

David Candy

It not windows, it is EVERY CPU. They are all designed to page. The chipsets are all designed to page. The operating system, hardware dependant, is also designed to page. Program compilers know they are on a virtual memory OS (as are all desktop OSs) so act accordingly (they waste memory because the paging code will catch it).

Also paging can't be diaabled in XP. Turning off the pagefile will reduce what can be paged with the result that code recently used will be paged out and data last accessed a month ago will waste memory.

A typical windows program uses around a 1/2 meg of physical memory (or a lot less for a lot) at a time.

Dos didn't page. So programs had to have their own paging code. It was known as overlays in Dos.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top