J
Jaap Telschouw
I have Windows XP Pro and two gigs of RAM. Do I still need a page file?
Thanks for your reply
Thanks for your reply
Jaap Telschouw said:I have Windows XP Pro and two gigs of RAM. Do I still need a page file?
Thanks for your reply
Jaap Telschouw said:I have Windows XP Pro and two gigs of RAM. Do I still need a page file?
I have Windows XP Pro and two gigs of RAM. Do I still need a page file?
Thanks for your reply
(message (Hello 'GT)
(you :wrote n '(Thu, 18 Jan 2007 17:37:39 -0000))
(
G> I have 1.5GB RAM and I have my page file turned off. This makes things
G> run faster as everything loaded is in RAM and never swapped out to hard
G> disk.
this is not really true..
there are pages in memory that are loaded from EXE and DLL files, windows in
some cases can forget about them -- replace those pages by file cache, for
example, and they will be read back later.
if you're using file system very intensively, you can still see some page
faults (and delays) of applications loading back..
you can see this in task manager, if you enabled 'page faults' column, does
it say 0 for all columns?
page file is for pages that are allocated in memory and not backed by some
file. actually, i think there are pages that are allocated, but never used,
so some small amount of paging files can speedup things -- there will be
more place for caches..
i have 2 GB of RAM and have some small page files. i believe it's more
optimal, but i can't be sure..
G> Beware, though if you use memory intensive applications and the RAM
G> becomes full, either the application or Windows will crash.
it's very unlinkely for windows to crash. memory allocation just fails, and
actually application can handle this gracefully.
btw there's one more reason to keep page file size at minimum -- some
applications erroneosly allocate tons of RAM, and with large pagefile
swapping make system non-responsible. with less or no pagefile, those
application will simply honestly report failure..
(message (Hello 'kony)
(you :wrote n '(Thu, 18 Jan 2007 16:23:14 -0500))
(
k> No, pages allocated but never used will not matter, a small
k> amount of paging does NOT speedup anything. The system
k> either has enough (real) memory that it doesn't have to page
k> out (which is ALWAYS faster "IF" the use allows, if it
k> doesn't require too much memory),
it might be true if i run a single application cosuming gigabytes of RAM,
but usage patterns on modern desktop computers are not like that.
i have lots of applications running (74 processes for 2 users), and i don't
need all the processes all the time, certainly. i'm even running two OSes
simultaneously -- Linux in vmware, but i'm working with that Linux from time
to time.
so, i think they'll better be swapped out.
as i've said, if some active
process will need more RAM, or if some file operations will need be cached,
Windows will swap out that processes anyway -- but it will swap out it's DLL
and EXE pages if it cannot swap allocated memory to pagefile.
RAM is just a cache for data -- some data is backed by files (executable or
filemappings), some is backed by pagefiles, and some will be not backed by
anything. OS might optimize better when it has flexibility to swap out some
allocated memory that is not used to pagefile. certainly, OS might be wrong
in it's optimizations, so it's questionable..
if you disable pagefile, you give priority to data that is explicitly
allocated by applications that is not backed by anything -- so it's not
swapped even if it's not used because there's no place for it. at same time
some data that is more-or-less actively used -- for example, file cache that
caches filesystem structure MFT -- can be swapped out.
??>> i have 2 GB of RAM and have some small page files. i believe it's more
??>> optimal, but i can't be sure..
k> If the total amount of allocated memory is beyond 2GB, yes
k> it is more optimal. If the total amount is below 2GB, it
k> may depend on how much of a benefit you would see from
k> having a larger filecache (IF you adjust Windows memory
k> management to have one, this is not a default installation
k> condition), it is quite possible the larger filecache
k> reduces rereads from HDD, more than the I/O to HDD from
k> slight pagefile use. In the end, the goal is still the
k> same- based on the specific uses of the system, to minimize
k> access to the HDD.
??>> it's very unlinkely for windows to crash. memory allocation just
??>> fails, and actually application can handle this gracefully. btw
??>> there's one more reason to keep page file size at minimum -- some
??>> applications erroneosly allocate tons of RAM, and with large pagefile
??>> swapping make system non-responsible. with less or no pagefile, those
??>> application will simply honestly report failure..
k> If you're going to have a pagefile active, it should be
k> large enough to handle the entire memory allocation from
k> applications.
why?
Wrong. Usage patterns do not change it and multiple apps
merely have additive memory load which is still weighed
against what the physical memory can support, or can't.
If there is enough physical memory, enabling a pagefile
will ALWAYS, no matter what other variable, be slower.
For the (nonspecific and thus unprovable) "usage patterns
on modern desktop", it could easily be that there is not
enough physical memory - hence why a pagefile is enabled
by default. Only the user can determine that it isn't needed.
IF you don't have enough physical memory to accomdate
all the rest without swapping, yes. That's not same as
having enough and paging it out for no good reason.
It is true that some data is needed later, or more
frequently, and some isn't. That does not change
the fact that swapping out data is going to be slower
if there was no other use for remaining physical memory.
You are arbitrarily presuming there would be, and indeed
sometimes there is, but that is not the same as a random
idea about it being faster to page out without the specific
situation of having insufficient physical memory to hold it all.
Wrong.
Because that's the whole point of a pagefile,
Nope.
to virtually provide memory that's not there,
not to cause the app to not have enough even WITH it.
Allocation that isn't used is not a bad thing,
it was that it used the HDD at all that
causes the significant performance penalty,
even worse when the system has only one HDD in it as many do.
Rod Speed said:Wrong with an OS that has enough of a clue to not use it
unless its necessary because there isnt enough physical memory.
And even with one that isnt smart enough to always do that,
you havent established that what minimal use of the pagefile
it does do when there is enough physical memory does slow
things down any anyway, most obviously when what minimal
use it does make of the page file is in the background etc.
Wrong, the OS obviously can.
Pity about when the pagefile is just used to provide
faster access to the read only files on the hard drive.
Not if that is done in the background and its never used from the file.
You are arbitrarily presuming that an OS which does minimally
use a page file when there is enough physical ram, that that
minimal use of the page file has any effect on the speed of ops.
You dont know that.
Wrong.
Yup
..
It isnt the ENTIRE MEMORY ALLOCATION FROM THE APPS
that matters, its the excess over the physical memory that matters.
It can be speed wise if that page file space has to be allocated and is
never used.
In spades when you have chosen to run without a page file.
ONLY if that allocated memory is ever actually used.
Alex Mizrahi said:(message (Hello 'kony)
(you :wrote n '(Thu, 18 Jan 2007 19:51:03 -0500))
(
k> If there is enough physical memory, enabling a pagefile will
k> ALWAYS, no matter what other variable, be slower.
how do you measure 'enough' or 'not enough' memory?
i've already said you, that RAM is used as cache for files and filesystem
structures.
thus, it's not possible to say if it's enough or not -- just, with more
RAM it would be faster, with less it would be slower.
if i'm doing some intensive file operations, (for example, compilation of
large C++ project), i'd like as much file cache be used as possible. at
same time, i don't care about other applications being in RAM -- i'd
prefer them to be swapped out, to give more RAM to file cache. compilation
can go for 10 minutes, in some cases of extra large project for hours.
additional file cache might significantly improve performance.
yes, IDE, firefox and other stuff will need to be swapped back after that,
but i think i won't mind some three-second delay, if that helped to speed
up thing. (i'd say that this delay is inevitable -- windows can 'forget'
about EXEs and DLLs being loaded in favour of file cache).
yes, certainly getting more RAM would help. but if 1 GB RAM + swap will
give me aprox same performace as 2 GB RAM -- why should i pay more?
kony said:On Thu, 18 Jan 2007 21:48:13 +0200, "Alex Mizrahi"
[snip]
If the total amount of allocated memory is beyond 2GB, yes
it is more optimal. If the total amount is below 2GB, it
may depend on how much of a benefit you would see from
having a larger filecache (IF you adjust Windows memory
management to have one, this is not a default installation
condition), it is quite possible the larger filecache
reduces rereads from HDD, more than the I/O to HDD from
slight pagefile use. In the end, the goal is still the
same- based on the specific uses of the system, to minimize
access to the HDD.
Alex Mizrahi said:(message (Hello 'GT)
(you :wrote n '(Thu, 18 Jan 2007 17:37:39 -0000))
(
G> I have 1.5GB RAM and I have my page file turned off. This makes things
G> run faster as everything loaded is in RAM and never swapped out to hard
G> disk.
this is not really true..
there are pages in memory that are loaded from EXE and DLL files, windows
in some cases can forget about them -- replace those pages by file cache,
for example, and they will be read back later.
if you're using file system very intensively, you can still see some page
faults (and delays) of applications loading back..
you can see this in task manager, if you enabled 'page faults' column,
does it say 0 for all columns?
Rod Speed said:Yes, its safer to have one which doesnt get used much at all.
XP can be a little stupid with no page file at all.
Fair question, but based on a false premise - the answer is that 2GB of
RAM will potentially give you much better performance than 1GB RAM +
swapfile. The performance increase will however depend greatly on what you
are doing and how much more than 1GB of RAM your day-to-day use requires
and I suspect that you probably don't use much more than 1GB RAM.
Turn the update speed to low on your task manager and occasionally make
the performance tab full screen and check the page file useage history -
this is actually memory usage, not pagefile usage!
GT said:True, but windows does not fall in the category you describe - it
automatically loads itself into RAM, then swaps out parts to the swap file
without question.
In the control panel you can set the minimum and maximum size for the
swapfile. These settings do indicate to windows the smallest amount to use
if the RAM is not full, it simply says the minimum size that the file will
be. This avoids the swapfile becoming fragmented across the disk. Before
setting the virtual memory size, I would recommend turning off virtual
memory completely, rebooting, defragmenting the hard disk, then setting
the minimum and maximum values to the same amount, so that the swapfile is
configured in one large contiguous block on the disk and will never grow
and shrink and therefore cannot become defragmented. Of course, this is my
advice to someone with less RAM than the applications they use can ever
need. If you have enough RAM - turn it off and things will be faster,
quieter and more responsive.
Wrong with an OS that has enough of a clue to not use it
unless its necessary because there isnt enough physical memory.
Pity about when the pagefile is just used to provide
faster access to the read only files on the hard drive.
It isnt the ENTIRE MEMORY ALLOCATION FROM THE APPS
that matters, its the excess over the physical memory that matters.
(message (Hello 'kony)
(you :wrote n '(Thu, 18 Jan 2007 19:51:03 -0500))
(
k> If there is enough physical memory, enabling a pagefile will
k> ALWAYS, no matter what other variable, be slower.
how do you measure 'enough' or 'not enough' memory?
i've already said you, that RAM is used as cache for files and filesystem
structures.
thus, it's not possible to say if it's enough or not -- just, with more RAM
it would be faster, with less it would be slower.
kony said:On Thu, 18 Jan 2007 21:48:13 +0200, "Alex Mizrahi"
[snip]
If the total amount of allocated memory is beyond 2GB, yes
it is more optimal. If the total amount is below 2GB, it
may depend on how much of a benefit you would see from
having a larger filecache (IF you adjust Windows memory
management to have one, this is not a default installation
condition), it is quite possible the larger filecache
reduces rereads from HDD, more than the I/O to HDD from
slight pagefile use. In the end, the goal is still the
same- based on the specific uses of the system, to minimize
access to the HDD.
Interesting - how do I turn up the cache size for windows please? This would
be very useful for my work.