Question about virtual memory setting and how much to use

L

Leeharveyoswald

Hello there, I have read off of Sandra2005 that virtual memory should be set
for 2.5 times the amount of memory you have. Now, i read a question off of
Microsoft's quiz and they asked about the performance and what is optimal if
you have more than one drive. I have 3 hardrives and i have each set at
2.5times teh amount of ram i have, which is 3072 because i have 2gb of
physical ram. Now, each should have it right? I do not have xp 32bit
installed on my 36gb raptor, so should i disable paging file on that drive?
And then only have virtual memory on my ide which has my x64 on it and my
74gb raptor which has the 32bit xp on it? Thanks in advance

3200+ winchester athlon64
Abit AV8 3rd eye K8T800pro
4 x 512 pc3200 kingston ram dual channeled on board
36gb raptor 10,000rpm hd
74gb raptor 10,000rpm hd
250gb caviar 7200rpm 8mb cache hd
9550se 128mb radeon
TDK 12x DVDRW
Liteon 16xDVDROM
Foxconn diabolic case with 400w powersupply
Xp professional edition
x64 xp professional edition eval. v1218
 
R

R. McCarty

Virtual memory is best explained by Alex Nichol's article.
http://www.aumha.org/win5/a/xpvm.htm

It's a contentious issue & there aren't hard and fast rules that
apply in every situation, configuration or program usage.

Let the point-and-counterpoint postings begin.....
 
K

Ken Blake

In
Leeharveyoswald said:
Hello there, I have read off of Sandra2005 that virtual memory
should
be set for 2.5 times the amount of memory you have.


Very poor advice. The page file is used when you don't have
enough memory for what the apps you're running require. The more
RAM you have, the less page file you need.

Now, i read a
question off of Microsoft's quiz and they asked about the
performance
and what is optimal if you have more than one drive. I have 3
hardrives and i have each set at 2.5times teh amount of ram i
have, which is 3072 because i have 2gb of
physical ram. Now, each should have it right?


No, wrong. Having 3072MB of page page on just *one* drive is
almost certainly *way* more than you need. Having 9216MB is
absurd, and just a waste of disk space.

How many drives you have is completely irrelevant. How much page
file you need depends on what apps you run, but with as much as
2GB of RAM, you almost certainly need none at all, unless your
workload is very unusual.

You shouldn't eliminate the page file at all, but a starting
value of 100MB or so should be more than enough. Keep the maximum
size high, because there's no disadvantage in doing so.

--
Ken Blake - Microsoft MVP Windows: Shell/User
Please reply to the newsgroup




I do not have xp 32bit
 
U

Uncle John

Hi Ken,

There is a very good guide on this link on Adrian Wong's forum:

http://www.rojakpot.com/default.aspx?location=3&var1=143&var2=0

However SP2 has introduced some new considerations and my advice is

1 If you have got Norton (or Symantec) Antivirus 2004/2005 installed and
SP2, Windows is probably ignoring any settings you made and doing its own
thing: either disable automatic autoprotect in NAV and enable it to after
Windows has finished loading or set it in the all user's start-up folder in
stead of HKLM.
2 Monitor the actual use of the pagefile by having Task manager\performance
enabled and see what Windows is using by the end of the day
3 Set a permanent pagefile [max and min identical] on drive C:\ [assuming
that is the system drive] and turn it off on all other drives a few kb
larger than your observed maximum use.
4 If you never get Windows reporting that it has run out of memory you are
OK if it does so just increase the permanent size.

In my case I have 4 GM RAM, the mother board does not support PAE, a
pagefile of 1GB is good even for heavy use of Photoshop CS plus all Office
2003 applications
 
L

Leeharveyoswald

Thanks, and forgive the name lol, i was only experimenting if i could change
my name and as a joke prior i just wanted to see if i could create an
account with a name of oswald lol, i forgot to put it back lol. Thanks for
the information.
What i have taken from the information is, that the memory that is not
intensive gets put to pagefile, so xp will put the memory that is needed for
operation to physical ram and what is not necessarily needed for physical to
the virtual? thanks
 
K

Ken Blake

In
perris said:
the pagefile is a place to image modified pages because there
is no
image for the memory manager to back the info..when a page is
modified, it's marked as dirty, and the area for dirty pages is
the
pagefile

the pagefile is not there for "when you don't have enough
memory to
run the programs you have"

NOBODY has enough ram to run the programs they have.

sophisticated programs are written with the "90/10" rule...they
spend
90% of the time accessing 10% of there code.

the more ram you have in use, the bigger the image area needs
to be
for those pages so they can be part of the memory management
strategy...the more ram in use, the bigger the pagefile needs
to be.


As you know, from previous threads about this, I completely
disagree with you. But I'm not going to get into a fight with you
over it.
 
J

James Hahn

This is complete nonsense.. Are you making this up as you go along?

A memory page doesn't have to be modified to be eligible for paging. Marking
pages as modified is a useful tool in managing what gets paged and what
doesn't, but it's only one rule.

"when you don't have enough memory to run the programs you have" is exactly
what the pagefile is there for, provided that memory refers to RAM.

It's quite possible to have enough memory to run the programs you have.
What you might be referring to is that it's not possible to prevent XP from
attempting to use the page file, which is a completely different concept.

Sophisticated programs aren't written to any 90/10 rule. They are (or
should be) written to a design that makes it likely that a very significant
part of the code will never get executed (such as error handling). However,
you haven't indicated why this comment is relevant - perhaps because
attempting to do so would indicate the nonsense in your 'modified pages'
assertion above.

The more RAM you have the less page file is likely to be used. In fact, with
enough RAM you could eliminate the need for a page file (although
eliminating the actual usage is harder).

For a very good description of Windows memory management, including what a
page file is and how it gets used, please see:
http://www.aumha.org/win5/a/xpvm.htm
 
F

Frank

Ken Blake said:
In


Very poor advice. The page file is used when you don't have enough memory
for what the apps you're running require. The more RAM you have, the less
page file you need.

What about a memory dump????
Better advice would be to read the following web pages....

http://support.microsoft.com/default.aspx?scid=kb;en-us;555223

http://www.microsoft.com/resources/...e_size_of_the_virtual_memory_paging_file.mspx

http://www.microsoft.com/resources/.../sysdm_advancd_perform_change_vmpagefile.mspx
 
A

Alex Nichol

Leeharveyoswald said:
Hello there, I have read off of Sandra2005 that virtual memory should be set
for 2.5 times the amount of memory you have. Now, i read a question off of
Microsoft's quiz and they asked about the performance and what is optimal if
you have more than one drive.

Sandra is, as often giving bad advice. And a Microsoft quiz is quite
likely wrong too: they did not catch up in some respects when XP came
out, as one of the developers admitted to me. See my page
www.aumha.org/win5/a/xpvm.htm
 
J

James Hahn

What you said was "the pagefile is a place to image modified pages because
there is no
image for the memory manager to back the info..when a page is modified,
it's marked as dirty, and the area for dirty pages is the pagefile". This is
not correct. Pages can be modified and not be in the pagefile, and there
are pages in the page file that are not modified or are not 'dirty'. I have
not misinterpreted your writing - your writing has incorrectly expressed
your meaning. It appears that you weren't talking about "the pagefile" at
all, but you were actually talking about the Windows virtual memory
management system, of which the pagefile is one, very distinct, component

Your description of the pagefile seems to presume that it is laid out as a
copy of the virtual address space. I can't think of any other way that you
could imagine that the more memory you have the more page file is required.
It's not laid out like that. It is allocated as required, and the more
memory you have the less is required and the less is allocated. A simple
comparison of several machine with different configurations running similar
tasks will demonstrate this. And please do not assert that I am agreeing
with you - as far as I can tell that's not going to happen.

I believe you are now saying that with gigs of memory it is possible that
the machine will have enough memory to run the applications it needs.
That's a significant step forward from your original assertion that "NOBODY
[sic] has enough ram to run the programs they have." Now, you only need to
go out and observe some real users using real machines and you will be able
to revise you 'gigs' figure downward to something more realistic.

Your apartment analogy is completely off the mark. If I had to use it, I
would instead relate the swap file to the washing machines in the utility
room - there are not enough for every resident to be doing their washing at
the same time, but there are enough for the typical, or even the likely
maximum, number of users that will occur at any one time. But analogies are
a generally ineffective way to make your point, and it certainly doesn't
serve you very well here.
--
perris said:
James said:
This is complete nonsense.. Are you making this up as you go along?
no

A memory page doesn't have to be modified to be eligible for paging.
Marking

you are exactly correct and this repeats what I've said, so you've
misinterpreted my writing

paging happens within every .dll and .exe weather or not they are
dirty...when the os "releases a .dll" or portions of it, this is
paging, the data is simply released, not written to the pagefile
because there's already a clean image to retrieve that data...pages are
part of the memory management strategy regardless of being dirty or
clean

It's quite possible to have enough memory to run the programs you have.

very few desktops have gigs of memory.
What you might be referring to is that it's not possible to prevent XP
from attempting to use the page file, which is a completely different
concept.

you have this backward, and this is not what I'm either insinuating
..plus, it is possible to keep xp from paging to the pagefile, it
isn't possible to keep xp from pages to the other images on the disk
that are not the pagefile
Sophisticated programs aren't written to any 90/10 rule.

yes, most of them are
(they are)...written to a design that makes it likely that a very
significant
part of the code will never get executed (such as error
handling)ummm...you just made the point...thanx for not making me explain
it
again

[quoteyou haven't indicated why this comment is relevant -

you mean on this thread I haven't *yet*, I have on other threads and I
will on this one...here's why it's relevant;

just about all programs reserve more virtual memory then they need...

The reservation process is simply a way NT tells the Memory Manager to
reserve a block of virtual memory pages to satisfy other memory requests
by the process...There are many cases in which an application will want
to reserve a large block of its address space for a particular purpose
(keeping data in a contiguous block makes the data easy to manage) but
might not want to use all of the space.


the virtual memory a program requests is the "commit charge" for that
process...trimming the pagefile lower then the commit charge as a total
circumvents this strategy, and is ALWAYS a performance liability.


The more RAM you have the less page file is likely to be used.

first of all, what I said was the more computer has in use, and yes,
you're correct, the more memory a person has the LESS OFTEN the pagefile
will be used, but the more room the pagefile will be needed to facilitate
an area to image for the memory being used

yes, if a user has a gig of memory, but his commit charge is only 250
mb's, he doesn't "need" a gig pagefile, but he suffers nothing for having
a gig pagefile, and he suffers nothing for keeping his box ready to use it
to it's capacity

now, I'll make the numbers smaller so it's easier to follow...and yes,
this analogy holds true for whatever amount of memory you have;

you are assuming that if I have 3 mbs of memory yet only one mb is ever
written to the pagefile, all I need is a mb of pagefile.

no

this is what most people assume, but no, all three mb's need their own
area to image, they don't share that the area that they get imaged to
just because nobody else will ever be there when they are.

This is simplest to explain using the following analogy:
If you were to look to any 100% populated apartment building in
Manhattan, you would see that at any given time throughout the day, there
are less then 25% of the residents in the building at once!

Does this mean the apartment building can be 75% smaller?
Of course not, you could do it, but man would that make things tough. For
best efficiency, every resident in this building needs their own address.
Even those that have never shown up at all need their own address, don't
they? We can't assume that they never will show up, and we need to keep
space available for everybody.

here's an internal if you'd care;

re are quite a few pages that are very rarely used but you may not know
that there are a lot of unreferenced but committed pages in the system
which reserve virtual space (physmem+pagefile) but don't have physical
memory committed for them. If you don't have a pagefile then that
commitment is taken out of physical memory. An example of that is
committed stack pages which are never or extremely rarely touched. These
are committed.

In other words, if you run without a pagefile your system will actually
use MORE memory.

as far as code, and data that's not meant to get modified...these simply
get released, no pagefile used for this paging at all

however, a page on the modified page list moves to the standby page list
after the Memory Manager's modified page writer writes the page's data to
disk. (usually the pagefile, sometimes a data file)

However, while the modified page writer is writing its data to disk, the
page makes a stop in the transition state (which has no list).

this doesn't happen until the number of pages on the modified page list
exceed a threshold, or when free memory drops below a threshold (which is
based on the amount of physical memory on the system and determined during
the boot), one of two modified page writer threads wakes up to perform
disk I/O that sends the data to a paging file {or a data file. but it
can't be released to the original file since it's been modified).



perris said:
snip <

the pagefile is a place to image modified pages because there is no
image for the memory manager to back the info..when a page is modified,
it's marked as dirty, and the area for dirty pages is the pagefile

the pagefile is not there for "when you don't have enough memory to run
the programs you have"

NOBODY has enough ram to run the programs they have.

sophisticated programs are written with the "90/10" rule...they spend
90% of the time accessing 10% of there code.

the more ram you have in use, the bigger the image area needs to be for
those pages so they can be part of the memory management strategy...the
more ram in use, the bigger the pagefile needs to be.
 
J

James Hahn

perris said:
snip <

users that have installed more memory will eventually use more memory
This was your initial assertion, and as I explained it comes about because
Windows will always find a use for more RAM, no matter how trivial.
However, this use that Windows finds for more RAM means that Windows has
LESS need for swap file space, not more.

This is not the case, however, if the increased use of RAM comes about
because the user is now running more applications or is running applications
with increased data sizes. If the user changes their behaviour in this way,
in addition to simply adding more RAM, then the results in terms of system
performance are unpredicatable. It is quite possible that a user with
expanded RAM will load so much into it that performance degrades. If this is
what you are suggesting then the discussion is pointless, as you are
changing several variables at once, one of them (user behaviour) in an
unspecified manner, and any points you make about how the system responds
are meaningless.
 
P

Pop

Boy, do you seem misinformed. Have you actually TRIED your own advice here?
My empiracal testing shows that, with enough RAM, pagefile gets very little
use, even under multi-app, heavy cpu load, concurrrntly running applications
where I can put the cpu at nearly 100% for minutes at a time.
I'd be interested in seeing some of your numbers because my experience
says you are all wet. 1 Gig RAM, small pagefile on boot drive, larger, 2
Gig pagefile on separate, PHYSICAL hard drive, none on the third, plus a
Virtual Ram drive, which DOES get used. Pagefile monotor NEVER moves off
0%, though all that really means is less than 1%; still a great number.
So, to appearances, I'm presently WASTING the pagefile space on E and
even the small one on C is hardly used.
What did I do right? Or, wrong, I suppose, from your view. Or are you
just guessing because it seems "logical"?

Pop
 
P

Pop

James said:
This is complete nonsense.. Are you making this up as you go along?

A memory page doesn't have to be modified to be eligible for paging.
...

The more RAM you have the less page file is likely to be used. In
fact, with enough RAM you could eliminate the need for a page file
(although eliminating the actual usage is harder).

That's wrong: XP will not allow you to set no pagefile. There MUST be at
least a pagefile, albeit a small one, on the boot drive or XP will refuse to
run in my experience.
 
T

Tom

Pop said:
That's wrong: XP will not allow you to set no pagefile. There MUST be at
least a pagefile, albeit a small one, on the boot drive or XP will refuse to
run in my experience.

So, if in your experience XP refused to run by having no pagefile, how did you turn it back on? By the way, you can run XP (albeit, very unwisely) without a pagefile, it will complain after a while if things get hectic.
 
A

Alex Nichol

Pop said:
That's wrong: XP will not allow you to set no pagefile. There MUST be at
least a pagefile, albeit a small one, on the boot drive or XP will refuse to
run in my experience.

Wrong. It will allow no pagefile, but this should be regarded as for a
very specific purpose, troubleshooting, and should *not* be done in
normal use.

Read up at www.aumha.org/win5/a/xpvm.htm
 
A

Alex Nichol

Pop said:
Boy, do you seem misinformed. Have you actually TRIED your own advice here?
My empiracal testing shows that, with enough RAM, pagefile gets very little
use, even under multi-app, heavy cpu load, concurrrntly running applications
where I can put the cpu at nearly 100% for minutes at a time.
I'd be interested in seeing some of your numbers because my experience
says you are all wet. 1 Gig RAM, small pagefile on boot drive, larger, 2
Gig pagefile on separate, PHYSICAL hard drive, none on the third, plus a
Virtual Ram drive, which DOES get used. Pagefile monotor NEVER moves off
0%, though all that really means is less than 1%; still a great number.
So, to appearances, I'm presently WASTING the pagefile space on E and
even the small one on C is hardly used.
What did I do right? Or, wrong, I suppose, from your view. Or are you
just guessing because it seems "logical"?

Your initial size pagefile will be grossly wasteful. On such a machine
you need a smallish start (say 100MB) and always retain a notional file
on C:. Read my page www.aumha.org/win5/a/xpvm.htm
 

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