Setting VM with WinXP-2K_Pagefile.vbs

L

Larry(LJL269)

Have 2 q's at *'s below:

On my XPhome with 1.8P4 & 1GB RAM, ran WinXP-2K_Pagefile.vbs
@
( http://billsway.com/notes_public/WinXP_Tweaks/ ) &
got readings for 6 time periods between restarts that are
summarized below (all MB):

MIN MAX
Current Pagefile Usage: 30 139
Session Peak Usage: 41 159*
Current Pagefile Size: 53 690
* So I should set initialVM=~170 & max=2000 since
its alone in its partition of 2GB ?

A sample reading of:
Current Pagefile Usage: 30 vs 311=TM PF Usage**
Session Peak Usage: 41**
Current Pagefile Size: 170**
shows ** inconsistencies because TM shows
allocated PFile vs WinXP-2K_Pagefile.vbs shows actually used
PF?

During most of this time TM shows TotalCommit=319 & Avail
RAM=607

Your help is MUCH appreciated. Thanks- bye- Larry


Any advise given is my attempt to show appreciation for all
the excellent help I've received here but I'm no MVP so it
may only apply NUGS (Normally, Usually, Generally, Sometimes :)
 
R

Ron Martell

Larry(LJL269) said:
Have 2 q's at *'s below:

On my XPhome with 1.8P4 & 1GB RAM, ran WinXP-2K_Pagefile.vbs
@
( http://billsway.com/notes_public/WinXP_Tweaks/ ) &
got readings for 6 time periods between restarts that are
summarized below (all MB):

MIN MAX
Current Pagefile Usage: 30 139
Session Peak Usage: 41 159*
Current Pagefile Size: 53 690
* So I should set initialVM=~170 & max=2000 since
its alone in its partition of 2GB ?

A sample reading of:
Current Pagefile Usage: 30 vs 311=TM PF Usage**
Session Peak Usage: 41**
Current Pagefile Size: 170**
shows ** inconsistencies because TM shows
allocated PFile vs WinXP-2K_Pagefile.vbs shows actually used
PF?

During most of this time TM shows TotalCommit=319 & Avail
RAM=607

Your help is MUCH appreciated. Thanks- bye- Larry

Hi Larry.

The first thing I would say regarding the results you have reported is
that with 41 mb of actual page file usage you are at or close to the
point where adding additional RAM will result in a noticeable
improvement in overall system performance. I usually consider 50 mb
of actual usage as the "trigger point" for adding more. What your
figure means is that Windows found it necessary to move 41 mb of
active RAM content out to the page file so as to allow that RAM to be
used for other, currently more important tasks. This involves some
disk activity which takes time. And then when the moved-out RAM
content was needed again at some later time it had to first be loaded
back into RAM and before that could be done it was probably necessary
to move something else out from RAM to the page file to make room for
it. Again, disk activity slowing things down. More RAM would
reduce or perhaps even eliminate entirely this actual page file usage
and the associated disk activity thereby speeding things up somewhat.

Now to the more technical item.
Task Mangler////Manager reports a page file usage value that is much
larger than the values reported by Bill James' utility. This is
because of the unused portions of memory allocation requests. By
design Windows must identify memory address space to satisfy all of
the memory allocation requests that are issued. And again by design
most items, including Windows components, device drivers, and
application programs, issue memory allocation requests that are larger
than what they usually need under normal circumstances.

If all of the requested memory was allocated from RAM then there would
be a considerable quantity of RAM tied up doing nothing because of
these unused portions of memory requests. So what Windows does is to
allocate addresses in RAM only to those portions of the requests that
are actually used and to allocate space in the page file for those
portions that are not used. Note that the allocation of page file
space to these unused portions does not involve any actual disk
activity. All that is required is for entries to be made in the
internal memory mapping tables maintained by the CPU. With Windows XP
a further enhancement of this procedure was introduced whereby the
page file space allocated to the unused requests does not even have to
physically exist *provided* there is the potential to do so if needed
without exceeding either the specified maximum size limit for the page
file or the available unused space on the hard drive.

So when I look back at one of your sets of numbers I see that Bill
James' utility showed PF usage of 30 mb and at the same time Task
Manager reported 311 mb. The difference between these two values is
281 mb and that represents the sum total of the unused portions of all
of the memory allocations issued by the active Windows components,
loaded device drivers, and open application programs.

I hope that this explains at least some of your concerns.


PS: If MVP Alex Nichol also replies to your posting (and he probably
will) then you should take his advice rather than mine wherever we
differ. Whatever I know on this topic was mostly learned from Alex.

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."
 
A

Alex Nichol

Larry(LJL269) said:
MIN MAX
Current Pagefile Usage: 30 139
Session Peak Usage: 41 159*
Current Pagefile Size: 53 690
* So I should set initialVM=~170 & max=2000 since
its alone in its partition of 2GB ?

Correct - or make initial a bit bigger, say up to 200. Really it is
wasteful of disk space to have a partition all to itself with space
sitting around unused
A sample reading of:
Current Pagefile Usage: 30 vs 311=TM PF Usage**
Session Peak Usage: 41**
Current Pagefile Size: 170**
shows ** inconsistencies because TM shows
allocated PFile vs WinXP-2K_Pagefile.vbs shows actually used
PF?

During most of this time TM shows TotalCommit=319 & Avail
RAM=607

TM is misleading. Its figures include all the potential file use that
would arise if programs actually made use of the space they have asked
for.

Make sure you have a 'min' file still allowed on C: - say initial2 max
50
 
A

Alex Nichol

Ron said:
I usually consider 50 mb
of actual usage as the "trigger point" for adding more. What your
figure means is that Windows found it necessary to move 41 mb of
active RAM content out to the page file so as to allow that RAM to be
used for other, currently more important tasks.

XP though seems to have taken to 'parking' a small amount, up to about
40 MB in the page file anyway. But 160 of peak use does suggest a
possibility that more RAM would pay off. If this machine has only 256 I
would increase it; on 512 it is a marginal choice
 
L

Larry(LJL269)

Greetings Ron & thank you for your response.
My responses r inserted in ur response & can be found by
searching for ¿ ( which I use as sub 4 ? in filenames &
pointers)


Hi Larry.

The first thing I would say regarding the results you have reported is
that with 41 mb of actual page file usage you are at or close to the
point where adding additional RAM will result in a noticeable
improvement in overall system performance. I usually consider 50 mb
of actual usage as the "trigger point" for adding more.

¿ This line 'Session Peak Usage: 41 159' means that
in 1 session I needed 159, not 41. 41 will be swapped out in
every session but once/2 days I'll swap 159.
Also this is on my Backup XP where I have no RAM hogs
like VR,APS,Video recording, Scanner but I do have 1GB RAM &
new 256MB Vcard. I did have 20 windows open which is usual 4
me. 'adding additional RAM' is NOT what I want to hear &
doesn't ring true since with 512MB RAM my only complaint was
re video performance.
What your
figure means is that Windows found it necessary to move 41 mb of
active RAM content out to the page file so as to allow that RAM to be
used for other, currently more important tasks.

¿ BUT During most of this time TM shows TotalCommit=319 &
Avail RAM=607, unless this is mislabeled
This involves some
disk activity which takes time.

¿ On this HD, 9 ms seek + 41/33 secs transfer=~1.3sec
And then when the moved-out RAM
content was needed again at some later time it had to first be loaded
back into RAM and before that could be done it was probably necessary
to move something else out from RAM to the page file to make room for
it. Again, disk activity slowing things down. More RAM would

Now to the more technical item.
Task Mangler////Manager reports a page file usage value that is much
larger than the values reported by Bill James' utility. This is
because of the unused portions of memory allocation requests. By
design Windows must identify memory address space to satisfy all of
the memory allocation requests that are issued. And again by design
most items, including Windows components, device drivers, and
application programs, issue memory allocation requests that are larger
than what they usually need under normal circumstances.

If all of the requested memory was allocated from RAM then there would
be a considerable quantity of RAM tied up doing nothing because of
these unused portions of memory requests. So what Windows does is to
allocate addresses in RAM only to those portions of the requests that
are actually used and to allocate space in the page file for those
portions that are not used. Note that the allocation of page file
space to these unused portions does not involve any actual disk
activity. All that is required is for entries to be made in the
internal memory mapping tables maintained by the CPU. With Windows XP
a further enhancement of this procedure was introduced whereby the
page file space allocated to the unused requests does not even have to
physically exist *provided* there is the potential to do so if needed
without exceeding either the specified maximum size limit for the page
file or the available unused space on the hard drive.

So when I look back at one of your sets of numbers I see that Bill
James' utility showed PF usage of 30 mb and at the same time Task
Manager reported 311 mb. The difference between these two values is
281 mb and that represents the sum total of the unused portions of all
of the memory allocations issued by the active Windows components,
loaded device drivers, and open application programs.

¿ Task Manager might call this PF Requests not PF Usage.
So app requests 100MB memory but only uses 30MB initially so
70MB assigned VM. TM reports 70 under PF Usage but Bill's
app reports 30MB & If app needs another 10, Bill would
report 40MB.
I hope that this explains at least some of your concerns.

¿ Thx- it goes a long way. How about bottom line: So I
should set initial VM=~170 & max=2000 since its alone in its
partition of 2GB ?
PS: If MVP Alex Nichol also replies to your posting (and he probably
will) then you should take his advice rather than mine wherever we
differ. Whatever I know on this topic was mostly learned from Alex.
¿ Alex is no-show so far. Maybe he's wasting time
sleeping @ 0500 GMT :) I used his XP VM page here but I
always investigate inconsistencies within/between sources of
data.(ie. max<any 1 observation)

Your help is MUCH appreciated. Thanks- bye- Larry



Any advise given is my attempt to show appreciation for all
the excellent help I've received here but I'm no MVP so it
may only apply NUGS (Normally, Usually, Generally, Sometimes :)
 
L

Larry(LJL269)

TM is misleading. Its figures include all the potential file use that
would arise if programs actually made use of the space they have asked
for.
You say at ur site 'The reason is that when programs ask for
an allocation of Virtual memory space, they may ask for a
great deal more than they ever actually bring into use — the
total may easily run to hundreds of megabytes' This implies
apps say 'Give me R bytes of RAM & V bytes of VM which I
may/may not use' and would explain most of inconsistencies I
noted. Also explains why InitalVM=Max(Peaks) over sessions
during 2-3 days. This is unlike any IBM/CDC OS I used pre
1990. 4 ex: U could allocate all RAM needed by task
currently using the stack & bump other tasks to VM if need
be. Each task would run very fast but swapping overhead
would be tremendous.
Make sure you have a 'min' file still allowed on C: - say initial2 max
50
Done

This was 4 my Backup XP where I have no RAM hogs
like VR,APS,Video recording, Scanner but I do have 1GB RAM &
new 256MB Vcard. I did have 20 windows open which is usual 4
me. Today I will switch to my XP with all apps/hardware &
shall repeat this analysis-a comparison should be
interesting. How high will MaxPeak go?

Happy Holidays Alex.
Larry

Any advise given is my attempt to show appreciation for all
the excellent help I've received here but I'm no MVP so it
may only apply NUGS (Normally, Usually, Generally, Sometimes :)
 
K

Ken Blake

In
Larry(LJL269) said:
You say at ur site 'The reason is that when programs ask for
an allocation of Virtual memory space, they may ask for a
great deal more than they ever actually bring into use - the
total may easily run to hundreds of megabytes' This implies
apps say 'Give me R bytes of RAM & V bytes of VM which I
may/may not use' and would explain most of inconsistencies I
noted.


Actually that's not what happens. Although some people use the
term "virtual memory" to refer to the page file, Microsoft uses
it to refer to all the memory available--the combination of RAM
and Page file. So the app doesn't ask separately for R bytes and
V bytes, it asks just for V bytes of virtual memory.

Those V bytes will initially be allocated in RAM if it's
available. Any part of V that isn't available in RAM will be
allocated in the page file. Then what happens to the bytes in RAM
if they aren't actually used is that, as other demands on memory
are made, these unused allocations will quickly be paged out to
the page file in accordance with the Least Recently Used
algorithm.

This is why it hurts you if you turn off the page file. Those
unused allocations stay in RAM, locking out their use for other
applications, because they have nowhere else to go.
 
L

Larry(LJL269)

If this machine has only 256 I
would increase it; on 512 it is a marginal choice

In reality it has 1GB RAM. Look like u r saying if Max Peak
PF Usage / RAM > .3 -> more RAM would be beneficial?

Your help is MUCH appreciated. Thanks- bye- Larry


Any advise given is my attempt to show appreciation for all
the excellent help I've received here but I'm no MVP so it
may only apply NUGS (Normally, Usually, Generally, Sometimes :)
 
L

Larry(LJL269)

Really it is
wasteful of disk space to have a partition all to itself with space
sitting around unused

So I should make PFmin=PFmax=2GB?

This PF is not only in its own partition, the only other 1
on this HD is huge, hidden & only used when running in DOS
when I run DI6.

Comments/suggestions/corrections appreciated. Thanks- bye-
Larry



Any advise given is my attempt to show appreciation for all
the excellent help I've received here but I'm no MVP so it
may only apply NUGS (Normally, Usually, Generally, Sometimes :)
 
L

Larry(LJL269)

On Fri, 17 Dec 2004 13:11:16 -0700, "Ken Blake"

Greetings Kem & thank you for your response.
Actually that's not what happens. Although some people use the
term "virtual memory" to refer to the page file, Microsoft uses
it to refer to all the memory available--the combination of RAM
and Page file. So the app doesn't ask separately for R bytes and
V bytes, it asks just for V bytes of virtual memory.

Henceforth I shall differentiate between VM & PF.
Those V bytes will initially be allocated in RAM if it's
available. Any part of V that isn't available in RAM will be
allocated in the page file. Then what happens to the bytes in RAM
if they aren't actually used is that, as other demands on memory
are made, these unused allocations will quickly be paged out to
the page file in accordance with the Least Recently Used
algorithm.


During most of this time TM shows PF Usage=~319 & Avail
RAM=607 which would contradict ur explanation unless some
GIANT sys app requested HUGE amounts of VM & when it is
finished XP did NOT reallocate PF space it was forced to
create back to RAM. This did in fact happen during 5 mins
when I started/stopped NO apps:

12/14/2004 11:40:13 PM
Current Pagefile Size: 53 MB even tho Avail RAM = 700

12/14/2004 11:35:09 PM here TM shows TotalCommit =~1700
Current Pagefile Size: 690 MB

In fact I am constantly running with TM PF Usage= ~300 &
Current Pagefile Size = ~50 MB which could easily fit
into 600 Avail RAM !!
That is why I posted 'How to force XP to use RAM'- I'm
missing a key point somewhere.

An interesting case would be running in SAFE mode & look at
PF Usage then. I gotta do this 1x anyway so I might as well
keep some stats from TM.

Comments/suggestions/corrections appreciated.
Thanks- bye- Larry



Any advise given is my attempt to show appreciation for all
the excellent help I've received here but I'm no MVP so it
may only apply NUGS (Normally, Usually, Generally, Sometimes :)
 
A

Alex Nichol

Larry(LJL269) said:
In reality it has 1GB RAM. Look like u r saying if Max Peak
PF Usage / RAM > .3 -> more RAM would be beneficial?

A peak of 150 or so on that size RAM is unlikely to be worth bothering
about; something decided to have a very large file in RAM somewhere
along the line.
 
A

Alex Nichol

Larry(LJL269) said:
You say at ur site 'The reason is that when programs ask for
an allocation of Virtual memory space, they may ask for a
great deal more than they ever actually bring into use — the
total may easily run to hundreds of megabytes' This implies
apps say 'Give me R bytes of RAM & V bytes of VM which I
may/may not use' and would explain most of inconsistencies I
noted.

In effect - but they say give me N bytes of memory, - total - and the
system decides how to allocate it. It starts by allocating to potential
page file, and only when the program decides to write to a page does it
switch the allocation (as near instantaneously as makes no difference)
to real RAM. It may then find a need to drop a page from memory to make
room - usually one used for caching old files just in case. It is only
when pages actually in use overflow RAM that it needs to page something
out. And as I said, it does park a bit in the file for contingencies of
some sort - I'm not sure why
 
A

Alex Nichol

Ken said:
Those V bytes will initially be allocated in RAM if it's
available. Any part of V that isn't available in RAM will be
allocated in the page file. Then what happens to the bytes in RAM
if they aren't actually used is that, as other demands on memory
are made, these unused allocations will quickly be paged out to
the page file in accordance with the Least Recently Used
algorithm.

Not quite in XP. It handles things differently from earlier systems,
and only makes an allocation into RAM once the page gets used. So it
does not go 'paging out' on pages that have never been used. They
retain their initial allocation to 'potential' page file space
 
A

Alex Nichol

Larry(LJL269) said:
So I should make PFmin=PFmax=2GB?

This PF is not only in its own partition, the only other 1
on this HD is huge, hidden & only used when running in DOS
when I run DI6.

It won't do any harm to make initial big if you have no other use for
the space. Most people do have other uses
 
L

Larry(LJL269)

In effect - but they say give me N bytes of memory, - total - and the
system decides how to allocate it. It starts by allocating to potential
page file, and only when the program decides to write to a page does it
switch the allocation (as near instantaneously as makes no difference)
to real RAM. It may then find a need to drop a page from memory to make
room - usually one used for caching old files just in case. It is only
when pages actually in use overflow RAM that it needs to page something
out. And as I said, it does park a bit in the file for contingencies of
some sort - I'm not sure why

Greetings Alex & thank you for your response.

I gathered more data from run in SAFE mode where there's
less noise & less RAM being used. Cant post now since I'm
away until 12/20 but will when I return.

Your help is MUCH appreciated. Thanks- bye- Larry


Any advise given is my attempt to show appreciation for all
the excellent help I've received here but I'm no MVP so it
may only apply NUGS (Normally, Usually, Generally, Sometimes :)
 
K

Ken Blake

In
Alex Nichol said:
Not quite in XP. It handles things differently from earlier
systems,
and only makes an allocation into RAM once the page gets used.
So it
does not go 'paging out' on pages that have never been used.
They
retain their initial allocation to 'potential' page file space


Thanks for the clarification, Alex. But I think that even if the
details aren't exactly right, the point I was making is. The
request is made for total virtual memory, not separately for RAM
and page file. The operating system then handles the allocation
and decides where to pu it.
 
L

Larry(LJL269)

On Sat, 18 Dec 2004 11:54:05 +0000, Alex Nichol

|In effect - but they say give me N bytes of memory, - total - and the
|system decides how to allocate it

Looking at Processes of TM under headings Memory & VM
(which must really be Pagefile Allocated, NOT Pagefile
Used), we see that VM= .5 to 4 times Memory with
larger & more used apps(IE & WE) closer to 1. Even so
they totaled 150,000 PFaults & if u add in ZApro VSMON
they total 220,000 PFaults which is 3x PFaults of all
other processes COMBINED.

Increase input 2 IE by opening 2 more websites, u find
thay Memory & VM both increase so their ratio remains
the same.

All this running with 700MB Avail Memory.

So I would say that the presence of the following is
NOT an indication of insufficient RAM:

1-Lots of Page Faults
2-Pagesile Size = 2x/3x RAM
3-Pagefile Use to a point.
cause XP allocates & ases pagefile even if u have
loads of RAM.

XP does have tools that give good indications in
C:\WINDOWS\system32\perfmon.msc where they even give 3
to monitor & guidelines:

1-MemoryAvailable(MB) <4 MB
2-MemoryPages/sec <20
3-Paging File % Usage >70%

I ran for 3 hrs looking at the graph & 2 above would
peak to 80 and more when I opened files.(See Attach). I
suspect they mean 'steady state' !

Later I will determine how to do logging & then load my
XP with lots of RAM hogs & measure its performance re
1-3 above.

Comments/suggestions/corrections appreciated.
Thanks- bye- Larry

Any advise is my attempt to contribute more than I have received but I can only assure you that it works on my PC. GOOD LUCK.
 
S

SFB - KB3MM

Doesn't virtual mean 'as if it existed'?

RAM really exists and you can execute code from it.

That's not true of a file.
 
K

Ken Blake

In
SFB - KB3MM said:
Doesn't virtual mean 'as if it existed'?

RAM really exists and you can execute code from it.

That's not true of a file.


You've found a *very* old message to answer.

But it doesn't matter what the dictionary says "virtual" means.
When you're dealing with virtual memory in Windows, you need to
use Microsoft's definition. If you don't, you won't understand
what you read and what you're told, and others won't understand
what you're talking about.
 

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