[P1] RAM question

J.C. Webber III jcw at kingoblio.com
Thu Mar 18 21:06:03 PST 2004


Sarah Andrews Cook wrote:
> Hi everyone,

> And after all of this exposition, finally, here is my dilemma:
> the director of our data unit (who is in charge of hardware
> buying and upgrades) is telling me that, for the applications I
> use, an increase from 384 to 640MB will make minimal difference,
> that I wouldn't really notice an increase in performance, due
> mainly to the limitations of the processor. This runs counter to
> everything I've heard (basically, that increasing RAM will always
> help), but he's also much more of an expert than I am, so I'm
> wondering if he's right. Can anyone shed any light on this for
> me? Any websites out there, benchmarking, etc. you could direct
> me to?

More memory won't help at all unless you are using up what you have.  
It will not speed up anything if you can already fit (and run) all your
current applications without having to use swap space.  What is swap
space?  That's disk drive space that is used to extend your memory when
your physical memory is full.  It is very slow compared to RAM.  When
your system needs more memory for the currently running process it
'swaps out' some pieces of your idle processes to that reserved disk
space.  When you want to use one of those idle processes again the
system must bring that program (and any data it is manipulating) back in
from the disk.  This is a very slow operation when compared to switching
applications when the both fit in existing physical RAM.

How do you know if you're swapping?  Well, being an old Unix guy myself,
I'd launch "/usr/bin/vm_stat 2" in the terminal app (that '2' means
refresh every 2 seconds), but I know most of you old time Mac-heads
cringe at the mere mention of the command line, so I would point you to
/Applications/Utilities/Activity Monitor.  Click on the 'System Memory'
tab towards the bottom of the window and then launch every application
you want to use, all at the same time.  Then watch the pretty picture and
see your free memory disappear.  An interesting statistic to watch is
the Page ins/outs.  The page-ins are going to be high because I believe
they count normal disk reads that happen when you launch any program, 
which is combined with the number of page-ins from swap.  But the
page-outs shouldn't be very high.  My system has been up for 2.5 days
and my page-outs number is only ~4500.  I've got 1.5Gigs of RAM and I
just launched every app on my dock and I never paged out once, so more
memory added to my system wouldn't speed anything up for me.

But if you are swapping (paging in and out) then you will benefit
GREATLY from additional RAM.

BTW, this activity is thanks to the virtual memory management
capabilities of Unix.

8^)
-- 
J.C. Webber III
Technical Lead, Unix System Administrator
jcw at kingoblio.com       www.kingoblio.com
Please, if you use Windows, do not add my address to your Address Book.
I do not wish to be spammed or have my email address hijacked by a virus
and used for fraudulent purposes.  Thank you.
If you use a Mac, never mind.  Mac's don't get viruses.



More information about the iBook mailing list