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