[K12OSN] Real Culprit

Jim McQuillan jam at mcquil.com
Tue Sep 14 13:48:15 UTC 2004


Liam,

The question about maxing out memory comes up all the time, and it's a 
subject that seems to be not well understood.

The Linux kernel will allocate all available memory to buffers.  Seeing 
1.9mb out of 2.0mg used is no big deal.  The important thing is how much 
swapping is going on?

if no swapping is happening, then you are NOT short of memory.

if you want to see how much swap is being used, then run:

     free

It will show you something like:

                      total     used   free shared buffers  cached
Mem:               2077220  1699756 377464     0    8612  585400
-/+ buffers/cache: 1105744   971476
Swap:             3903784     11352 3892432

I've got 2mb of ram in my machine, and you can see that about 594mb
is being used for buffers and cache.

You can also see that i've touched swap just a bit.  I'm not too
worried about 11mb of swap being used.

You can also run 'vmstat' and look at the 'swap si' and 'swap so'
columns.  that's "swap ins" and "swap outs".
You can also add a number seconds, after the 'vmstat' command.

I run:   vmstat 5
and it shows me a line of info every 5 seconds.

Try running that on a terminal while other terminals are busy loading or 
running programs.

If you aren't getting any swapping, then you aren't at a critical point 
with your ram.

BUT, more ram does help performance, even if you aren't swapping, 
because as I've shown above, Linux will use that ram for buffers, and
that should help.

If you have the 'sysstat' package installed, then 'sar' can help you to 
figure out where the problems are.  I run:

    sar -u 5 100

That will give me a snapshot of cpu utilization every 5 seconds. the 
'100' means to do it 100 times.

On my system, that produces this:

Linux 2.6.7-jam-2-smp (BigDog)  09/14/04

09:44:32     CPU     %user     %nice   %system   %iowait     %idle
09:44:37     all      0.20      0.00      1.70      0.00     98.10
09:44:42     all      2.50      0.10      2.70      0.30     94.40


I have a hunch that part of your bottleneck will show up in the %iowait
column, meaning the system is waiting on your disk to provide data.


Hope that helps,

Jim McQuillan
jam at Ltsp.org




On Mon, 13 Sep 2004, Liam Marshall wrote:

> I began this thread under the subject, bottleneck Question.  I am starting a 
> new thread for a variety of reasons.  Thanks to Les and others, I have 
> narrowed down some of the problems, now I would like some clarification
>
> Today I had 28 grade 7 students all log in at the exact same time, this made 
> the log in process slow for everyone.  CPU usage went to 100% for a while, 
> and memory usage went close to 100%  1.9GB used out of 2GB
>
> After all got in, the cpu usage went down, but memory stayed very high.  Then 
> they went into oowriter, again with real slow down.  Once they were in and 
> doing their individual assignments, TOP showed cpu usage of about 10-12% but 
> memory stayed maxed at 1.9 out of 2
>
> If I stagger the time for entering oowriter, ei allowing 5-6 to click on it 
> at the same time, speed is acceptable, but unrealistic for teaching purposes. 
> Teachers need to give instructions and the kids need to be able to execute 
> instructions near the same time.  "OK, class, everyone start oowriter..." or 
> similar is a standard method, but it leads to near simultaneous 
> accessing/starting of programs.
>
> Whether it is and OpenOffice app , or Mozilla, or something as silly as Super 
> Tux Racer, both cpu and memory seem to be maxing out, at least temporarily 
> when programs are loading, then the cpu use usually settles down, (except for 
> the games which seem to keep the cpu use maxed, but then again I don't care 
> much about that, I am not teaching game play)
>
> My long winded question is this.  Both cpu and memory max at some point.  I 
> have ordered more memory, to increase memory to 4GB,  My existing motherboard 
> will handle that, but it won't handle upgrading cpu
>
> It is only a single cpu multithreading 3.06.  If I need to do that upgrade I 
> need to buy a board and cpu's. 
> Question:  Nothing but upgrading to a true dual cpu will stop the cpu usage 
> from maxing out, right?  I mean, no matter how much memory I get, if the cpu 
> maxes, even temporarily, it will always do that, right?
>
> sorry for the long winded preamble, I am just trying to get my head around 
> paying the extra money
>
>
> _______________________________________________
> K12OSN mailing list
> K12OSN at redhat.com
> https://www.redhat.com/mailman/listinfo/k12osn
> For more info see <http://www.k12os.org>
>





More information about the K12OSN mailing list