Hi I have a email box where the mem usage grows by 4% a day. The only thing that we can do is to reboot the box to clear out the memory? Being Linux this should not be! A friend told be it could be with the mirrored drive. This box runs POSTFIX with 600 users (local yuk!), apache2, rysnc (not in current use for SuSE update site). 2 gig ram, 2 80 gig SIDE hardware mirror, 2 - 200 gig for backup and install drives. When the box is first started you see 600 meg of ram being used, now its at 1.3 gig being used. What can I do to see what is taking the memory? And what can I do to flush the memory usage, We also get about 7 thousand emails per day. 70% spam of course..thanks ASSP. Thanks for the help Neal
On 24.08.04,09:50, nhaas wrote:
Hi I have a email box where the mem usage grows by 4% a day. The only thing that we can do is to reboot the box to clear out the memory? Being Linux this should not be! A friend told be it could be with the mirrored drive.
This box runs POSTFIX with 600 users (local yuk!), apache2, rysnc (not in current use for SuSE update site).
2 gig ram, 2 80 gig SIDE hardware mirror, 2 - 200 gig for backup and install drives.
When the box is first started you see 600 meg of ram being used, now its at 1.3 gig being used. What can I do to see what is taking the memory? And what can I do to flush the memory usage, We also get about 7 thousand emails per day. 70% spam of course..thanks ASSP.
Thanks for the help
Try to run "top" over some time to see what is stealing memory. To flush
the memory you have to stop the processes that steals the RAM. Check for
errors in /var/log/messages. Shut down unecessary programs and services.
Try f.ex. Blackbox as Window Manager, instead of the heavier KDE/Gnome,
if this is a dedicated email box.
- Jostein
--
Jostein Berntsen
Jostein wrote regarding 'Re: [SLE] Memory problems suse 9.1' on Tue, Aug 24 at 12:03:
On 24.08.04,09:50, nhaas wrote:
Hi I have a email box where the mem usage grows by 4% a day. The only thing that we can do is to reboot the box to clear out the memory? Being Linux this should not be! A friend told be it could be with the mirrored drive. [...]
Try to run "top" over some time to see what is stealing memory. To flush the memory you have to stop the processes that steals the RAM. Check for errors in /var/log/messages. Shut down unecessary programs and services. Try f.ex. Blackbox as Window Manager, instead of the heavier KDE/Gnome, if this is a dedicated email box.
Try a command line if this is a dedicated email box. GUIs are for workstations. :) Anyway, while you're running top, try pressing "G" and then "3". That'll get you to the memory usage view (sorted by memory consumption), assuming a pretty recent top. --Danny, amazed at the stuff that's in the newer "top" variants...
Anyway, while you're running top, try pressing "G" and then "3". That'll get you to the memory usage view (sorted by memory consumption), assuming a pretty recent top.
G works but sadly "3" does nothing. Numbers are getting bigger for usage and free are getting smaller..... Thanks for the command stuff for top -- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
nhaas wrote regarding 'RE: [SLE] Memory problems SuSE 9.1' on Thu, Aug 26 at 22:58:
Anyway, while you're running top, try pressing "G" and then "3". That'll get you to the memory usage view (sorted by memory consumption), assuming a pretty recent top.
G works but sadly "3" does nothing. Numbers are getting bigger for usage and free are getting smaller.....
Really? Does pressing "A" give you a display with 4 views, or does it sort by age? You might try to find a newer procps - I'm referring to the top from procps-3.2.1, as included with SuSE 9.1. --Danny
On Tue, 2004-08-24 at 12:50, nhaas wrote:
Hi I have a email box where the mem usage grows by 4% a day. The only thing that we can do is to reboot the box to clear out the memory? Being Linux this should not be! A friend told be it could be with the mirrored drive.
This box runs POSTFIX with 600 users (local yuk!), apache2, rysnc (not in current use for SuSE update site).
2 gig ram, 2 80 gig SIDE hardware mirror, 2 - 200 gig for backup and install drives.
When the box is first started you see 600 meg of ram being used, now its at 1.3 gig being used. What can I do to see what is taking the memory? And what can I do to flush the memory usage, We also get about 7 thousand emails per day. 70% spam of course..thanks ASSP.
Thanks for the help
Neal
This is normal memory usage, the system is cacheing filesytem use and storing it in ram. If the usage grows at a much faster rate then become concerned. -- Ken Schneider unix user since 1989 linux user since 1994 SuSE user since 1998 (5.2) * PLEASE only reply to the list *
Hi I have a email box where the mem usage grows by 4% a day. The only
that we can do is to reboot the box to clear out the memory? Being Linux this should not be! A friend told be it could be with the mirrored drive.
This box runs POSTFIX with 600 users (local yuk!), apache2, rysnc (not in current use for SuSE update site).
2 gig ram, 2 80 gig SIDE hardware mirror, 2 - 200 gig for backup and install drives.
When the box is first started you see 600 meg of ram being used, now its at 1.3 gig being used. What can I do to see what is taking the memory? And what can I do to flush the memory usage, We also get about 7 thousand emails
From: Ken Schneider [mailto:suselist@rtsx.com] Sent: Tuesday, August 24, 2004 10:31 AM To: suse-linux-e@suse.com Subject: Re: [SLE] Memory problems suse 9.1 On Tue, 2004-08-24 at 12:50, nhaas wrote: thing per
day. 70% spam of course..thanks ASSP.
Thanks for the help
Neal
This is normal memory usage, the system is cacheing filesytem use and storing it in ram. If the usage grows at a much faster rate then become concerned. So when does the memory ever get released. It just grows and grows and grows. Out of 2 gigs I have 19,124k free and starting on swap 8k used. Should I not be alarmed on this? An old UNIX guy is telling me that there is a memory leak somewhere.... -- Ken Schneider unix user since 1989 linux user since 1994 SuSE user since 1998 (5.2) * PLEASE only reply to the list * -- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
nhaas writes:
This is normal memory usage, the system is cacheing filesytem use and storing it in ram.
If the usage grows at a much faster rate then become concerned.
So when does the memory ever get released. It just grows and grows and grows. Out of 2 gigs I have 19,124k free and starting on swap 8k used. Should I not be alarmed on this? An old UNIX guy is telling me that = there is a memory leak somewhere....
Typically the memory used by the cache will be persistent until
some user process allocates more memory than there is available memory,
then the kernel will free up the cache memory and flush data to
disk if needed.
Linux takes the philosophy that "free memory is bad memory". If
memory isn't used then it's a waste of resources, why not use what
it could for filesystem cache (for performance)?
I have been running "xosview" to monitor memory usage, and the
blue portion of the MEM bar graph is actual program use, the orange
for kernel buffering, and the red for filesystem cache. Typically
the red will grow and fill up almost all of the memory. However
if a user program attempts to allocate a lot of memory, then the
cache use will decrease.
I wrote a test program in C that demonstrates this phenomenon.
The source code is included below. Compile this program and run it
when your physical memory is all used up. Watch the MEM bar in
"xosview" while you do this. Save the contents between the "snip"
lines into a file "allocmem.c", then compile as follows in a konsole
window:
gcc -O -o allocmem allocmem.c
To run, use the following syntax:
./allocmem n
Where n is the number of megabytes you want this program to attempt
to allocate. The program will allocate the memory, and if successful,
write to all pages of the allocated memory, and then free it and exit.
If you ask for more memory than what could be freed from buffer and
cache, then the kernel will page out other program memory to your
swap device. You'll see the SWAP bar in xosview increase.
Here is the code:
-----------X snip X-----------
/* @(#)allocmem.c 1.1 04/08/18
*
* allocmem
*
* A program to test memory allocation
* Usage: allocmem n
* where n is the number of megabytes to allocate.
*
* Ti Kan
*/
#include
nhaas wrote: <STUFF DELETED>
This is normal memory usage, the system is cacheing filesytem use and storing it in ram.
If the usage grows at a much faster rate then become concerned.
So when does the memory ever get released. It just grows and grows and grows. Out of 2 gigs I have 19,124k free and starting on swap 8k used. Should I not be alarmed on this? An old UNIX guy is telling me that there is a memory leak somewhere....
From an older Unix guy and a very old Linux guy (since version 0.xx). If you start getting out-of-memory conditions and your machine begins to run like a sloth, then worry. I don't remember what the figures look like under Solaris, must check with vmstat in a bit and compare. You can't make the assumption that Linux and any other Unix are organised to behave the same. Harping back to one big discussion topic that the Linux kernel should handle a particular function in the same manner as Solaris - a far better way they argued, the guy who developed it for Solaris chimed in that after he implemented it, he thought it was a bad idea and that Linux did it better - end of argument. Though many things are similar, "Linux is not Unix", please repeat that before every boot and tell the old Unix guy also. Regards Sid. -- Sid Boyce .... Hamradio G3VBV and keen Flyer =====LINUX ONLY USED HERE=====
On Thursday 26 August 2004 08:00 pm, nhaas wrote:
So when does the memory ever get released. It just grows and grows and grows. Out of 2 gigs I have 19,124k free and starting on swap 8k used. Should I not be alarmed on this?
In a word, NO. Just because something is swapped out onto the swap partition is not cause for alarm. There is no reason to bring something back in from swap until it is needed again. So a momentary high memory load will swap out memory used by dormant tasks, and the kernel will not waste time swapping it back in until needed EVEN IF there becomes much unused memory. -- _____________________________________ John Andersen
participants (7)
-
Danny Sauer
-
John Andersen
-
Jostein Berntsen
-
Ken Schneider
-
nhaas
-
Sid Boyce
-
ti@amb.org