[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-users] Fw: Qube 2 - problems
- Subject: Re: [cobalt-users] Fw: Qube 2 - problems
- From: Brian Curtis <admin@xxxxxxxxxxx>
- Date: Thu Jan 25 11:25:19 2001
- Organization: Pomfret Computer Technologies, LLC
- List-id: Mailing list for users to share thoughts on Cobalt products. <cobalt-users.list.cobalt.com>
>> Here is my memory usage for a idle system:
>>
>> [admin@vanecek /etc]$ top
>>
>> 7:19pm up 49 days, 21:31, 1 user, load average: 0.00, 0.00, 0.00
>> 51 processes: 50 sleeping, 1 running, 0 zombie, 0 stopped
>> CPU states: 1.5% user, 2.8% system, 0.0% nice, 95.8% idle
>> Mem: 63304K av, 49092K used, 14212K free, 36936K shrd, 6476K buff
>> Swap: 130748K av, 1348K used, 129400K free 23036K cached
>>
>> What should I be looking for in terms of a memory leak?
>>
JK> If you had one, your mem free would continue to shrink over time, and
JK> your swap used would continue to grow. As you can see from my used system,
JK> only been up 6 1/2 hours and already K free is about gone and swap is over 3
JK> mb. What patches have you installed? Have you updated the imap or qpopper
JK> at all?
Not quite entirely true. From the Linux FAQ:
(http://www.linuxdoc.org/FAQ/Linux-FAQ/x1925.html#AEN2027)
-----
7.8. Free Memory as Reported by free Keeps Shrinking.
The ``free'' figure printed by free doesn't include memory used as a
disk buffer cache?shown in the ``buffers'' column. If you want to know
how much memory is really free add the ``buffers'' amount to ``free.''
Newer versions of free print an extra line with this info.
The disk buffer cache tends to grow soon after starting Linux up. As
you load more programs and use more files, the contents get cached. It
will stabilize after a while.
-----
Here's the output from one of our servers that has been up over 4
months:
$ top
12:16pm up 124 days, 3:41, 4 users, load average: 2.19, 2.24, 2.15
89 processes: 86 sleeping, 3 running, 0 zombie, 0 stopped
CPU states: 0.2% user, 2.0% system, 97.6% nice, 0.0% idle
Mem: 517104K av, 492828K used, 24276K free, 171232K shrd, 285176K buff
Swap: 525288K av, 22608K used, 502680K free 100908K cached
$ free
total used free shared buffers cached
Mem: 517104 492692 24412 170696 285176 100908
-/+ buffers/cache: 106608 410496
Swap: 525288 22608 502680
It looks alarming to someone who does not understand the output and
how Linux utilizes available memory. This box serves 40-50GB of WWW
traffic monthly, and the 'free' memory almost never goes above 25MB.
When you start seeing a lot of swap usage, then you know you either
have a mem leak, or you're trying to do too much with the available
physical memory.
What you should be doing is graphing the output of the processes that
run continually. Granted some will usually rise in memory usage as
the system is used, but what you want to look out for are extreme
spikes in memory usage that don't scale back to 'average' when the
process returns to it's idle state, or continually consume absurd
amounts of memory and run for long periods of time. (The latter has
to be measured against the process that's running and it's function.)
There's really no fool proof way of detecting [small] memory leaks
unless you have the time to sit in front of the box and document the
memory usage just about every second and compile historical charts as
a reference. Quite a boring job! Then again, there's many utilities
available that do this sort of thing.
--
Best regards,
Brian Curtis