about optimising the page file

  • Thread starter Thread starter Lorne
  • Start date Start date
L

Lorne

I have 4GB of RAM on a n XP SP3 system. Why is the page file necesary?

I just tried to reduce it but when I rebooted I got a message from Windows saying it was too small and being expanded. When I checked after boot it was 98MB yet only 23% of my RAM was being used. So why is Windows creating 98MB of slow access disk files rather than using the much faster RAM that is installed?

And is there a way to force it to use only RAM?
 
There is a difference between page file /allocation/ and page file
/usage/. Software asks Windows for memory allocation and Windows
responds accordingly. The application may not actually use all the
memory it requests. With 4GB of RAM, your page file is likely being used
rarely, if at all.

You would do well not to try to 'improve' on the operating system's
memory management, unless you'd rather learn the hard way, like many of
us did. ;-)
 
The Task Manager's Pagefile usage readings are deceptive, what you are
seeing is mostly unused memory pages that have been requested by
applications. Applications often ask for way more RAM than they
actually need or use, the Windows Memory Manager gives the application
enough RAM to satisfy the applications real needs and simply "maps" the
rest of the request to the pagefile. This is really just to satisfy the
application's Virtual Address Space demand, it is a way to "trick" the
application into "believing" that it has all the RAM that it asked for.
If the application does need more RAM the Memory Manager will give it
more, the application will not necessarily use the pagefile.

The reason behind this is that without this mapping technique the RAM
may quickly become allocated for nothing more than unused memory pages
just to satisfy unneeded address space requests, for this reason, even
when you have very large amounts of installed RAM, it is usually best
not to completely do away with the pagefile.

You can use Perfmon to get the real pagefile usage, or the
XP_PageFileMon utility here:
http://www.dougknox.com/xp/utils/xp_pagefilemon.htm

John
 
so to be clear an application asks for 20Mb of RAM but only puts data in
4Mb. XP then sets asside 16Mb of the page file but does not write any data
to it so there should be no HD reads/write and the application thinks it has
got 20Mb.

Later the application writes a further 2Mb of data to RAM. XP puts this in
the RAM (not in the page file?) so the application is using 6Mb of RAM +
14Mb of reserved space not being used in the page file.

Is that right?

Hence I need to set the page file to a decent size minimum (say 384Mb) so it
will never be expanded by false claims from software?
 
Why do you worry that the page file will be "expanded by false claims
from software"? Are you in danger of running out of space on your hard disk?

You're wasting time on silly exercises that could be more enjoyably
spent watching YouTube.
 
Lorne - Regarding "...will never be expanded by false claims from
software?..." - software does not expand or issue false claims to the Page
File (Virtual memory) - it's the OS.

First - RAM is involved in the actual execution of program "threads" -
virtual memory (Page file) is not - when a thread is done executing the OS
returns data representing the thread to "virtual memory" rather then to a
location on theHD under the assumption the information will be required
again during execution of the involved application.

Again - RAM - active executing program threads - Virtual memory (Page file)
threads no longer active - but available.

No matter how much RAM is installed Windows will; not use RAM for "storage"
and will create virtual memory - the default setting for virtual memory is
1.5 times RAM.
 
I have 4GB of RAM on a n XP SP3 system. Why is the page file necesary?

I just tried to reduce it but when I rebooted I got a message from Windows saying it was too small and being expanded. When I checked after boot it was 98MB yet only 23% of my RAM was being used. So why is Windows creating 98MB of slow access disk files rather than using the much faster RAM that is installed?

And is there a way to force it to use only RAM?


The pagefile should be left as system managed unless there is a very good case for saving space and resources.

For a 'general use' computer, the page file should be set as above.

--
Mike Hall - MVP
How to construct a good post..
http://dts-l.com/goodpost.htm
How to use the Microsoft Product Support Newsgroups..
http://support.microsoft.com/default.aspx?pr=newswhelp&style=toc
Mike's Window - My Blog..
http://msmvps.com/blogs/mikehall/default.aspx
 
That is sort of what happens, I don't know how close the Memory Manger
cuts it. The Pagefile Usage represents "potential" pagefile usage, it's
committed memory, if there is enough RAM to satisfy the committed memory
then the pagefile will not be used. Use Perfmon or the tool from Doug's
website to see how much pagefile you are acutally using.

John
 
Virtual Memory is not just the pagefile, it's a concept that operating
systems use to give applications the illusion that there is as much RAM
as they need, it includes Physical Memory and the Pagefile.

John
 
Lorne

A certain amount of virtual memory will always be used regardless of
available free ram. Read more in these links:

http://aumha.org/win5/a/xpvm.htm
http://www.petri.co.il/pagefile_optimization.htm


--



Hope this helps.

Gerry
~~~~
FCA
Stourport, England
Enquire, plan and execute
~~~~~~~~~~~~~~~~~~~
I have 4GB of RAM on a n XP SP3 system. Why is the page file necesary?

I just tried to reduce it but when I rebooted I got a message from
Windows saying it was too small and being expanded. When I checked
after boot it was 98MB yet only 23% of my RAM was being used. So why is
Windows creating 98MB of slow access disk files rather than using the
much faster RAM that is installed?

And is there a way to force it to use only RAM?
 
Mike

The pagefile should be left as system managed unless there is a very
good case for saving space and resources.

Debateable!
http://www.vista-xp.co.uk/forums/technical-reference-library/2169-cluster-size-exposed.html

--
Regards.

Gerry
~~~~
FCA
Stourport, England
Enquire, plan and execute
~~~~~~~~~~~~~~~~~~~

I have 4GB of RAM on a n XP SP3 system. Why is the page file necesary?

I just tried to reduce it but when I rebooted I got a message from
Windows saying it was too small and being expanded. When I checked
after boot it was 98MB yet only 23% of my RAM was being used. So why is
Windows creating 98MB of slow access disk files rather than using the
much faster RAM that is installed?

And is there a way to force it to use only RAM?


The pagefile should be left as system managed unless there is a very
good case for saving space and resources.

For a 'general use' computer, the page file should be set as above.

--
Mike Hall - MVP
How to construct a good post..
http://dts-l.com/goodpost.htm
How to use the Microsoft Product Support Newsgroups..
http://support.microsoft.com/default.aspx?pr=newswhelp&style=toc
Mike's Window - My Blog..
http://msmvps.com/blogs/mikehall/default.aspx
 
Back
Top