thanks
Please review the following:
Virtual Memory in Windows XP
http://aumha.org/win5/a/xpvm.php
[Courtesy of MS-MVP Alex Nichol]
How can I optimize the Windows 2000/XP/2003 virtual memory (Pagefile)?
http://www.petri.co.il/pagefile_optimization.htm
--
Carey Frisch
Microsoft MVP
Windows XP - Shell/User
Microsoft Newsgroups
Be Smart! Protect Your PC!
http://www.microsoft.com/athome/security/protect/default.mspx
------------------------------------------------------------------------------
There are one or two applications that use pagefile, even if you have got
10GB of RAM! I'm sure someone will tell us which they are.....
--
Interim Systems and Management Accounting
Gordon Burgess-Parker
Director
www.gbpcomputing.co.uk
Please try the following article by Alex Nichol:
"Virtual Memory in Windows XP"
http://aumha.org/win5/a/xpvm.php
--
Will Denny
MS-MVP Windows Shell/User
Please reply to the News Groups.
"axis" <nos...@nospam.org> wrote in message
news:P6idnbM7V-R...@comcast.com...
Why worry, the size the pagefile isn't costing you anything.
If you think you have a performance problem perfmon.exe will tell you
how many pages/sec you're reading/writing on the pagefile and which
apps are doing it.
--
a d y k e s @ p a n i x . c o m
Don't blame me. I voted for Gore.
I'm happy to let windows manage the page file, this is just an academic
discussion.
"Will Denny" <will...@mvps.org> wrote in message
news:%23cR6KYo...@tk2msftngp13.phx.gbl...
Why does XP seem to actively use the page file when I have a Gig of RAM and
memory usage hovers around 400mb? And if I manually set the page file to a
small size, say 32mb, XP complains about being out of memory (a little
balloon popup), while the apps and XP still continue to run without
problems.
"Al Dykes" <ady...@panix.com> wrote in message
news:d0fndi$o47$1...@panix5.panix.com...
"axis" <nos...@nospam.org> wrote in message
news:BtmdndlJ3aw...@comcast.com...
--
Don Burnette
"When you decide something is impossible to do, try to stay out of the
way of the man that's doing it."
--
Mike Hall
MVP - Windows Shell/user
"axis" <nos...@nospam.org> wrote in message
news:P6idnbM7V-R...@comcast.com...
<quote>
However, if you remove the paging file from the boot partition, Windows
cannot create a dump file (Memory.dmp) in which to write debugging
information in the event that a kernel mode Stop Error message occurs.
This could lead to extended downtime if you must debug to troubleshoot
the Stop error message.
</quote>
And it is not the only disadvantage of disabling Virtual Memory. There
are the other related MS KB articles, and one of them (can't find fast
its number) warns specifically about avoiding disabling paging file even
when large amount of RAM is installed -- with the substantiation of this
statement.
--
Mikhail Zhilin
http://www.aha.ru/~mwz
Sorry, no technical support by e-mail.
Please reply to the newsgroups only.
======
I don't know if anyone here can answer this question but -- with ample free
memory in a system, will XP still evict VM pages to the disk page file?
Thanks to everyone for their responses up to this point.
"Mikhail Zhilin" <m...@x.REMOVEx.aha.ru> wrote in message
news:chrm2153vvmkpbhdi...@4ax.com...
Until then, just flow with the tide!
--
Regards,
Richard Urban
aka Crusty (-: Old B@stard :-)
If you knew as much as you think you know,
You would realize that you don't know what you thought you knew!
"axis" <nos...@nospam.org> wrote in message
news:edydnbcR9cx...@comcast.com...
Don't get your panties in a buch. No one's criticizing anything, I'm just
trying to get more info about XP's behavior. Nothing wrong with that.
"Richard Urban" <richardurba...@hotmail.com> wrote in message
news:u0N0LwpI...@TK2MSFTNGP15.phx.gbl...
--
Regards,
Richard Urban
aka Crusty (-: Old B@stard :-)
If you knew as much as you think you know,
You would realize that you don't know what you thought you knew!
"axis" <nos...@nospam.org> wrote in message
news:MMmdnWCA583...@comcast.com...
Again not saying that page files shouldn't be used. I'm curious as to the
internals of XP and how memory management works.
"Richard Urban" <richardurba...@hotmail.com> wrote in message
news:OvSwKUqI...@TK2MSFTNGP15.phx.gbl...
"axis" <nos...@nospam.org> wrote in message
news:HZadnYdOMrP...@comcast.com...
first, xp is a virtual memory operating machine...paging is how memory
is brought into use in the first place isn't it.
open task manager and count all the memory that your computer is
actually using...much more then the gig that you have installed!
in point of fact, in order to have enough memory to run without virtual
memory, there would have to be as much memory as everything ever written
on every program you load, every feature, every skin, all the colors,
everything, and every file you access also....open "ms word" and even
if you're not zltering them them, every document you've ever written,
and spell check with the entire english vocabulary and grammer rules
would have to be entirely up...every grapghic...every plugin from a
pda...every pciture in your photo program, every video...everything.
instead, the os just releases memory that the memory management model
thinks is the least likely to get accessed again.
sophisticated programs and games are written with the "90/10"
rule...they spend 90% of their time accessing 10% of their code...they
are written with features that you'll almost never invoke, yet you
WILLl use at various times never the less
if all of these had to take up the physical memory it would entail, a
few gigs wouldn't be enough
and when we DO have a few gigs of memory, (not too far off), then we'll
be writting ever more sophisticated programs...with 3d, and animation,
and more inteligent., and more interactive...this is the future after
all, and the future is apon us and gone
as resources become available, authors of programs use whatever
resources become available to their fullest potential...as well they
should.
now, here's the missunderstanding;
the pagefile is not the only place the os is paging...it's not even the
area that gets paged the most...it's only the file where "modified"
...pages that are new to the hardrive will have an area to be backed,
and that area is the pagefile;
every single .exe, ..dll, every file and data source on the drive is
also used as the private pagefile for that particular data.
the pagefile is for data that's been modified or doesn't yet exist on
the disk...even modified pages can get modified again, and therefore
need yet another area on the pagefile.
if the data exists on the disc, (if there's an image), and it's not
"dirty", then there is no need nor use of the pagefile, the image the
data came from is the pagefile for that respective data..(pages
modified are marked "dirty")...
now, if there's a modified page that comes into existance, the os would
like to make that memory part of the memory management strategy...the
only way modified pages can be considered for the memory management
model is if the have an area to be written so data can be retrieved if
that data happens to be the data that would least likely be noticed if
it gets released.
this doesn't mean the data WILL get released, it just means that if the
modified data is the proper candidate, it will be available.
it doesn't matter how much memory you install, every bit of data will
need an image on the hardrive for this backing store.
modifed data have no area to be backed, and thus, the pagefile for thie
modified or new data.
programs don't know how much new data is going to be created when they
launch, so they ask for a contiguous block that will hoepfully be more
abundant then anything you might do...this makes for much smoother
running..this is why you'll see a "commit charge" bigger then the
amount of data atually written to the pagefille
anyway, this is too long a post, I think it covers most of your
questions.
try this article if you would;
http://www.osnn.net/articles.php?action=show&showarticle=99
axis Wrote:
> I don't know if anyone here can answer this question but -- with ample
> free
> memory in a system, will XP still evict VM pages to the disk page
> file?
>
> Thanks to everyone for their responses up to this point.
> >[/color]
--
perris
------------------------------------------------------------------------
perris's Profile: http://forum.osnn.net/member.php?userid=17
View this thread: http://forum.osnn.net/showthread.php?t=60799
One big reason is that Windows uses the page file to satisfy the
memory address space requirements for the unused portions of memory
allocation requests.
By design Windows must identify specific memory address space for all
of the memory allocation requests that are issued, whether by Windows
itself, device drivers, or application programs. And all of these
typically ask for allocations that are larger that what is usually
needed under normal circumstances. So what Windows does is to
allocate RAM only to those portions of these requests that are
actually used and uses space in the page file for the unused portions.
Two points about this:
1. Mapping of these unused portions of memory requests to the page
file does not require any actual writing to the hard drive. All that
is need is entries in the memory mapping tables maintained by the CPU.
2. Windows Task Manager includes the swap file space allocated to
these unused ports as Page File Usage in the data reported on the
performance tab.
And if subsequent events result in the usage of previously requested
but unused memory then it can be instantaneously remapped from the
page file to an available location in RAM.
The bottom line, insofar as the current topic is concerned, is that
the existence of the page file will make the actual usage of your RAM
more efficient. Without a page file it is quite possible, indeed even
likely, that you would have a couple of hundred megabytes of RAM tied
up for memory that was requested but never used.
Also you need to be aware that Windows does use the page file for more
than just swapping out of memory content from RAM. It is also used
for:
a: System Failure Memory Dumps, unless you have this option
configured as "no memory dump". And in order for this option to be
usable there must be an existing page file on the boot drive that is
at least as large as the dump size option selected.
b: If you have multiple users configured on the computer and if you
have the "fast user switching" option in effect then Windows will use
the page file to "roll out" the memory contents of the previous user
when the machine is switched to a new user.
Hope this explains the situation.
Good luck
Ron Martell Duncan B.C. Canada
--
Microsoft MVP
On-Line Help Computer Service
http://onlinehelp.bc.ca
"The reason computer chips are so small is computers don't eat much."
<quote>
- For best performance, do not set the initial size to less than the
minimum recommended size under Total paging file size for all drives.
<...>
- To delete a paging file, set both the initial size and the maximum
size to zero, or click No paging file. We strongly recommend that you do
not disable or delete the paging file.
</quote>
--
Mikhail Zhilin
http://www.aha.ru/~mwz
Sorry, no technical support by e-mail.
Please reply to the newsgroups only.
======
--
----------------------------------------------------------
http://www.microscum.com/mscommunity/
"Ron Martell" <ron.m...@gmail.com> wrote in message news:867o21ttifskdf1ak...@4ax.com...
most of the requests aren't going to get referenced gets mapped to the
file from whence it came, they don't get mapped to the pagefile.
Different types of things are paged to different files.
You can't page "private writable committed" memory to exe or .dll
files, since they are bound, and you don't page code to the paging file
since code won't likely get modified, it's therefore mapped back to the
original image on the disk from whence it came.
for instance, users have heard of "unloading .dll's"...things like this
"unloading" won't get mapped to the pagefile, just unloaded and then
retrieved from the image on the disk if referenced again...much more
efficient then mapping the whole file to a new location.
NT just needs to create a memory-mapped file object that's backed by
the executable file or dll instead of the system pagefile if the image
already exists.
data that isn't "dirty" (modified) gets backed and reloaded by
calculating a pointer into the memory-mapped file object that
represents the executable, it does not get mapped to the pagefile.
then, if it becomes impossible for the data to be retrieved for the
original file when said data is modified, it will need an area on the
disk to do that...that area is the pagefile.
there's an excellant reason nobody should tell users to lower the
pagefile size from the default.
since there's no hit for a pagefile that might be more abundant then
neccessary, users don't know what there future demands are going to be
do they...this is the nature of computing...if a user doens't put their
memory under pressure today, sure, they might not get a hit today by
lowering the setting from the default
they can probably (but to no benefit), lower their pagefile to double
the size of commit charge will likely be enough to keep programs
running smooth.
however having the pagefile bigger then that is at no price
even if their work load doesn't increase, one day, this person might
need a new user profile or two, and might need to switch back and
forth.
their pagefile will be too small...they'll get performance hits and
they'll attribute the hits to fast user switching, when they should be
attributing those hits to their incorrect settings.
this is the reason (among others) nobody should be recommending to
anyone who isn't short of hardrive area to make the pagefile smaller
then what microsoft tells us.
I saw as recently as last week on another newsgroup a user with four
gigs of memory ask a member of the nt file team (mike brannigan) if he
could lower the size of the pagefile...the answer was
unequivical...no...I'm surprised some mvp's make the suggestion...to my
mind, it's irresponsible to make that type of blanket suggestion (here
or in their internet papers).
Ron Martell Wrote:
> "axis" <nos...@nospam.org> wrote:
>
> >Why do I still need a page file, even when I have 1 Gig of ram and my
> RAM
> >usage normally hovers around 3-400mb? If I set the page file to be
> very
> >small windows XP goes nuts. I understand the need for page files in
> memory
> >constrained situations, I would appreaciate some info as to why one
> needs it
> >even in a situation where we shouldn't need to page any data our of
> memory
> >to disk.
> >
> >thanks
> >
>
> b: If you have multiple users configured on the computer and if you
> have the "fast user switching" option in effect then Windows will use
> the page file to "roll out" the memory contents of the previous user
> when the machine is switched to a new user.
>
> Hope this explains the situation.
>
> Good luck
>
>
> Ron Martell Duncan B.C. Canada
> --
> Microsoft MVP
> On-Line Help Computer Service
> http://onlinehelp.bc.ca
>
> "The reason computer chips are so small is computers don't eat much."
Fire up task manager and pick the View/Select Columns tab. You'll be
able to add counters for memory-related usage and see which programs
are doing what. There's lots there I don't understand for Windows but
to me the interesting data is "PF delta" which is how many times in
the update interval an apllication needed a page what wasn't in it's
cache.
If there is a Page Fault it means that a page your application needs
isn't in the VM mapping tables and the OS takes over and updates the
VM tables, bringing a page in, if necessary. If you are short on real
memory that may mean forcing a physical write of some other page to
make room, so there were two disk I/O ops instead of zero. Even if a
page is in memory a PF takes CPU time away from useful work and slows
down your app. A "soft PF" means that the page was in memory and no
I/O was necessary to resolve. a "hard PF" means that I/O was
necessary. (anyone that can correct my terminology for WIndows please
chip in.)
As someone else described, each program has a "working set", the
minimum number pf pages it needs to do it's job with essentially zero
page faults (except for startup). The total size of the program is
frequently many times the working set size. As long as the total of
the working set for all running processes is less than the total real
memory you've got a system that is running efficiently.
I used to be able to quote microsecond figures for page fault handling
for certain mainframes. Soft faults were in microseconds, hard faults
are in milliseconds. (they still are.) In the day, I knew that 25 soft
faults per second meant we either had to tune our application mix
(might be expensive) or buy another chunk of memory (expensive.)
At least one major mainframe operating systems that was current in the
late 70's was even more tightly coupled to the VM architecture than
Windows is. The hardware and OS managed a data page of the file
system the same way it handled a memory page. All of memory was one
big cache. Top-20, fast as h**l for it's day.
Many PhD papers were were written in the 60's and 70's about memory
management strategies for virtual systems and there were loud
arguements at perfessional meetings about how they worked with
different process scheduling algoritms. Something we take for granted
now.
Now I'll return your TV channel to the 21st century......
>
>--=20
>----------------------------------------------------------
>http://www.microscum.com/mscommunity/
>"Ron Martell" <ron.m...@gmail.com> wrote in message =
>news:867o21ttifskdf1ak...@4ax.com...
>> "axis" <nos...@nospam.org> wrote:
>>=20
>>>Why do I still need a page file, even when I have 1 Gig of ram and my =
>RAM=20
>>>usage normally hovers around 3-400mb? If I set the page file to be =
>very=20
>>>small windows XP goes nuts. I understand the need for page files in =
>memory=20
>>>constrained situations, I would appreaciate some info as to why one =
>needs it=20
>>>even in a situation where we shouldn't need to page any data our of =
>memory=20
>>>to disk.
>>>
>>>thanks=20
>>>
>>=20
>> One big reason is that Windows uses the page file to satisfy the
>> memory address space requirements for the unused portions of memory
>> allocation requests.
>>=20
>> By design Windows must identify specific memory address space for all
>> of the memory allocation requests that are issued, whether by Windows
>> itself, device drivers, or application programs. And all of these
>> typically ask for allocations that are larger that what is usually
>> needed under normal circumstances. So what Windows does is to
>> allocate RAM only to those portions of these requests that are
>> actually used and uses space in the page file for the unused portions.
>>=20
>> Two points about this:
>> 1. Mapping of these unused portions of memory requests to the page
>> file does not require any actual writing to the hard drive. All that
>> is need is entries in the memory mapping tables maintained by the CPU.
>> 2. Windows Task Manager includes the swap file space allocated to
>> these unused ports as Page File Usage in the data reported on the
>> performance tab.
>>=20
>> And if subsequent events result in the usage of previously requested
>> but unused memory then it can be instantaneously remapped from the
>> page file to an available location in RAM. =20
>>=20
>> The bottom line, insofar as the current topic is concerned, is that
>> the existence of the page file will make the actual usage of your RAM
>> more efficient. Without a page file it is quite possible, indeed even
>> likely, that you would have a couple of hundred megabytes of RAM tied
>> up for memory that was requested but never used.
>>=20
>>=20
>> Also you need to be aware that Windows does use the page file for more
>> than just swapping out of memory content from RAM. It is also used
>> for:
>> a: System Failure Memory Dumps, unless you have this option
>> configured as "no memory dump". And in order for this option to be
>> usable there must be an existing page file on the boot drive that is
>> at least as large as the dump size option selected.
>> b: If you have multiple users configured on the computer and if you
>> have the "fast user switching" option in effect then Windows will use
>> the page file to "roll out" the memory contents of the previous user
>> when the machine is switched to a new user.
>>=20
>> Hope this explains the situation.
>>=20
>> Good luck
>>=20
>>=20
>> Ron Martell Duncan B.C. Canada
>> --=20
>> Microsoft MVP
>> On-Line Help Computer Service
>> http://onlinehelp.bc.ca
>>=20
>> "The reason computer chips are so small is computers don't eat much."
There was a man here a while ago complaining that IE had a hard coded limit of 34 windows (or something like that) and no error messages. Classic symptoms of a person with a too small a page file. I said increase page file size. He said no and wouldn't believe me. After a few days he tried my suggestion and went away happy.
Larry is no page file expert (there aren't that many people working on the page file code at MS - the number of experts is very small) but knows a thing or two. I'll refer you to his articles. You need to read both.
http://weblogs.asp.net/larryosterman/archive/2004/03/18/92010.aspx
http://weblogs.asp.net/larryosterman/archive/2004/05/05/126532.aspx
So I don't expect you to to quote the clerical staff again.
But lets play a game.
Q. How much memory can a program use?
--
----------------------------------------------------------
http://www.microscum.com/mscommunity/
"perris" <perris...@no-mx.forum.osnn.net> wrote in message news:perris...@no-mx.forum.osnn.net...
believe me though, I'll quote those people that are giving the correct
answers...mike is among those people...I also liked your answer, and I
skimmed the article from Larry, and it's funny but his paper says
almost exactly what I said...I'll use it as a reference also I
think...great job
here's a quote from his paper, by the way;
"If the page is backed by an executable (in other words it's code or
static data), then the page will be reloaded from the executable file
on disk. If the page isn't backed by an executable, then NT needs to
have a place to put it
And that place is the paging file."
which is exactly what I've been trying to get across in this news
group...you should have seen the furor the first time I posted
information of that sort...mvp's that didn't know it going nutz.
anyway, thanx for the link...I'll look forward to more from you
:smile:
David Candy Wrote:
>
>
> ...I don't expect you to to quote the clerical staff again.
even though white papers tell you xp is going to set 1.5 memory for the
pagefile if there's room on the hardrive, this isn't correct.
the largest initial minimum the os is going to set is 2 gigs...for
instance, if you have 4 gigs of memory, the pagefile will be set to 2
gigs by xp.
a user would be wise to then create a second pagefile with an initial
minimum od zero, and the max of 4 gigs...in this fasion, backing store
will always be available if those 4 gigs ever do go under pressure.
great stuff David, thanx for the links, which I'll use for referance in
the future as well
I think part of the misunderstanding is that NT is designed to never need rebooting (not quite there yet). So MS think how to manage memory for ever while some turn off their computers everyday and think NT/XP is designed to manage their memory for only 8 hours. I've been up for 4 days (storms 4 days ago).
In designing servers one also has to consider disk space. It's really bad if the swap stops the company database from updating due to lack of space. Or an excel spreadsheet from saving (especially if temp files are involved). This is normally caused by a program that goes wild. But somthing to consider. It's mostly theoretical.
I know that 2 gig will always handle my workload (256meg will also but I have the rest for days like today when working with large video and graphic files so I never need to think about it again. I last adjusted my swap file 18 months ago - the last time chkdsk deleted 90% of my files.
I was reading working set in some post today. There's a tool somewhere that lists each apps working set. 99.999999999% of apps had the standard setting of 2 meg. Only office had changed the default (and they were being a bit greedy I thought).
the OS will aggressively release memory from minimized windows is
almost but not quite correct...
that dati is actually sent to the standby pagelist...if it gets
referenced again before the physical memory is claimed, it's brought in
with a soft fault..in other words, from memory even though it was
released.
minimizing a window will tell the OS; "get ready to use this dati as
the first candidate for release if you need memory"
so, instead of shrinking a working set when a feature is added, the
data will come from the minimized window in a first in first out policy
(fifo)
in other words, even though you might see a window get paged back in
because you minimized it some time ago, this released memory would have
come from somewhere else if it didn't come from the minimized window.
in this same process, working sets are actually much larger then it
would appear in counters, since on a system with enough memory, data
goes to the standby list instead of getting zero written
David, I must say that of anyone I've spoken to that doesn't have first
hand info from the kernel team, you do know more about memory management
then anyone else.
a very nice conversation we've had, I must say