Re: [expert] Fwd: memory leak

2002-08-12 Thread Michael Scottaline

On Sun, 11 Aug 2002 18:32:33 -0700
gene [EMAIL PROTECTED] scribbled intuitively:

snippage
OK, here are the results of free and top.  I can see that a lot of 
memory is cached.  So you're saying that the cached memory is actually 
available?

  free -m
  total   used   free sharedbuffers
  cached
Mem:   753750  2  0 11504
-/+ buffers/cache:234518
Swap:  784  0784


  top
6:29pm  up 23:15,  2 users,  load average: 0.06, 0.18, 0.15
92 processes: 91 sleeping, 1 running, 0 zombie, 0 stopped
CPU states:  6.2% user, 30.5% system,  0.0% nice, 63.1% idle
Mem:   771192K av,  768136K used,3056K free, 116K shrd,   11384K 
buff
Swap:  803176K av,   0K used,  803176K free  514912K 
cached

   PID USER PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM   TIME COMMAND
26307 apache 9   0 14388  14M  2872 S 0.0  1.8   0:04 httpd-perl
26302 apache 9   0 14228  13M  2876 S 0.0  1.8   0:04 httpd-perl
26301 apache 9   0 14092  13M  2876 S 0.0  1.8   0:04 httpd-perl
26303 apache 9   0 14032  13M  2872 S 0.0  1.8   0:03 httpd-perl
26306 apache 9   0 14024  13M  2876 S 0.0  1.8   0:03 httpd-perl
26319 apache 9   0 13964  13M  2868 S 0.0  1.8   0:02 httpd-perl
26305 apache 9   0 13848  13M  2872 S 0.7  1.7   0:02 httpd-perl
26311 apache 9   0 13316  13M  2876 S 0.0  1.7   0:02 httpd-perl
26312 apache 9   0 13120  12M  2868 S 0.0  1.7   0:03 httpd-perl
  2081 root  12   0 12980  12M  1848 S 5.0  1.6  28:25 server.pl
26318 apache 9   0 12836  12M  2872 S 0.0  1.6   0:02 httpd-perl
  2240 mysql  9   0  5136 5136  2168 S 0.0  0.6   0:00 mysqld
  2242 mysql  8   0  5136 5136  2168 S 0.0  0.6   0:00 mysqld
  2243 mysql  9   0  5136 5136  2168 S 0.0  0.6   0:00 mysqld
  2244 mysql  9   0  5136 5136  2168 S 0.0  0.6   0:00 mysqld
  1443 root   9   0  3888 3888  1592 S 0.0  0.5   0:00 ntpd
  1447 root   9   0  3888 3888  1592 S 0.0  0.5   0:00 ntpd
  1452 root   9   0  3888 3888  1592 S 0.0  0.5   0:00 ntpd
  1391 snort  9   0  3624 3624  1140 S 0.3  0.4   0:25 snort
  1753 xfs9   0  3448 3448   912 S 0.0  0.4   0:00 xfs
26270 root   8   0  3180 3180  2456 S 0.0  0.4   0:00 httpd-perl
  1415 named  9   0  2912 2912  1768 S 0.0  0.3   0:00 named
  1419 named  9   0  2912 2912  1768 S 0.0  0.3   0:00 named
  1420 named  9   0  2912 2912  1768 S 0.0  0.3   0:08 named
  1425 named  9   0  2912 2912  1768 S 0.0  0.3   0:00 named
  1426 named  9   0  2912 2912  1768 S 0.0  0.3   0:01 named
26740 gene   9   0  2104 2104  1888 S 0.7  0.2   0:00 sshd
25221 gene   9   0  2036 2036  1652 S 0.0  0.2   0:00 imapsd
25222 admin  9   0  2012 2012  1648 S 0.0  0.2   0:00 imapsd
26738 root   9   0  1912 1912  1720 S 0.0  0.2   0:00 sshd
26299 apache 9   0  1788 1788  1488 S 0.0  0.2   0:00 httpd
26300 apache 9   0  1788 1788  1488 S 0.0  0.2   0:00 httpd
26304 apache 9   0  1784 1784  1488 S 0.0  0.2   0:00 httpd
26282 apache 9   0  1756 1756  1484 S 0.0  0.2   0:00 httpd
26308 apache 9   0  1748 1748  1484 S 0.0  0.2   0:00 httpd
26283 apache 9   0  1744 1744  1484 S 0.0  0.2   0:00 httpd
26293 apache 9   0  1744 1744  1484 S 0.0  0.2   0:00 httpd
26294 apache 9   0  1744 1744  1484 S 0.0  0.2   0:00 httpd
26295 apache 9   0  1744 1744  1484 S 0.0  0.2   0:00 httpd
26298 apache 9   0  1744 1744  1484 S 0.0  0.2   0:00 httpd
  2131 root   8   0  1644 1644  1112 S 0.0  0.2   0:01 bash
26741 gene   9   0  1576 1576  1088 S 0.0  0.2   0:00 bash
26281 root   8   0  1448 1448  1272 S 0.0  0.1   0:00 httpd

==
Looks as if the bulk of your mem (over half a gig) is simply being cached
by the system.  I'm not sure that's a problem as I believe it will be
released when need for apps or processes.  Others, more knowledgeable
might have better info for you.

Mike
-- 
Give me a woman who loves beer and I will conquer the world.
-- Kaiser Wilhelm



Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



Re: [expert] Fwd: memory leak

2002-08-11 Thread James Sparenberg

Haven't tried it yet but just found it on my install disks.  The
rpm is insure++5.2-1mdk  and it's supposed to aimed right at
memory leaks in C/C++ programs.

James


On Sat, 10 Aug 2002 18:43:12 -0700
gene [EMAIL PROTECTED] Grabed a keyboard and said:

 
 Does anyone have advice for tracking down a memory leak?
 
 I'm getting down to 2M of RAM.  Running 'top' doesn't show
 anything using much memory, and I've tried killing most of the
 running processes but that doesn't help.  I can only free up the
 memory by restarting my server.
 
 I'm running kernel 2.4.7-12.3mdk.
 
 Any advice is appreciated.
 
 
 



Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



Re: [expert] Fwd: memory leak

2002-08-11 Thread gene


On Saturday, August 10, 2002, at 07:01  PM, Michael Scottaline wrote:

 On Sat, 10 Aug 2002 18:43:12 -0700
 gene [EMAIL PROTECTED] scribbled intuitively:


 Does anyone have advice for tracking down a memory leak?

 I'm getting down to 2M of RAM.  Running 'top' doesn't show anything
 using much memory, and I've tried killing most of the running processes
 but that doesn't help.  I can only free up the memory by restarting my
 server.

 I'm running kernel 2.4.7-12.3mdk.

 Any advice is appreciated.
 
 What *exactly* is top reporting to you.  You may not actually have a
 memory leak.  Linux tends to view unused memory as wasted memory.
 Howmuch of that mem is actually cached.

OK, here are the results of free and top.  I can see that a lot of 
memory is cached.  So you're saying that the cached memory is actually 
available?

  free -m
  total   used   free sharedbuffers cached
Mem:   753750  2  0 11504
-/+ buffers/cache:234518
Swap:  784  0784


  top
6:29pm  up 23:15,  2 users,  load average: 0.06, 0.18, 0.15
92 processes: 91 sleeping, 1 running, 0 zombie, 0 stopped
CPU states:  6.2% user, 30.5% system,  0.0% nice, 63.1% idle
Mem:   771192K av,  768136K used,3056K free, 116K shrd,   11384K 
buff
Swap:  803176K av,   0K used,  803176K free  514912K 
cached

   PID USER PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM   TIME COMMAND
26307 apache 9   0 14388  14M  2872 S 0.0  1.8   0:04 httpd-perl
26302 apache 9   0 14228  13M  2876 S 0.0  1.8   0:04 httpd-perl
26301 apache 9   0 14092  13M  2876 S 0.0  1.8   0:04 httpd-perl
26303 apache 9   0 14032  13M  2872 S 0.0  1.8   0:03 httpd-perl
26306 apache 9   0 14024  13M  2876 S 0.0  1.8   0:03 httpd-perl
26319 apache 9   0 13964  13M  2868 S 0.0  1.8   0:02 httpd-perl
26305 apache 9   0 13848  13M  2872 S 0.7  1.7   0:02 httpd-perl
26311 apache 9   0 13316  13M  2876 S 0.0  1.7   0:02 httpd-perl
26312 apache 9   0 13120  12M  2868 S 0.0  1.7   0:03 httpd-perl
  2081 root  12   0 12980  12M  1848 S 5.0  1.6  28:25 server.pl
26318 apache 9   0 12836  12M  2872 S 0.0  1.6   0:02 httpd-perl
  2240 mysql  9   0  5136 5136  2168 S 0.0  0.6   0:00 mysqld
  2242 mysql  8   0  5136 5136  2168 S 0.0  0.6   0:00 mysqld
  2243 mysql  9   0  5136 5136  2168 S 0.0  0.6   0:00 mysqld
  2244 mysql  9   0  5136 5136  2168 S 0.0  0.6   0:00 mysqld
  1443 root   9   0  3888 3888  1592 S 0.0  0.5   0:00 ntpd
  1447 root   9   0  3888 3888  1592 S 0.0  0.5   0:00 ntpd
  1452 root   9   0  3888 3888  1592 S 0.0  0.5   0:00 ntpd
  1391 snort  9   0  3624 3624  1140 S 0.3  0.4   0:25 snort
  1753 xfs9   0  3448 3448   912 S 0.0  0.4   0:00 xfs
26270 root   8   0  3180 3180  2456 S 0.0  0.4   0:00 httpd-perl
  1415 named  9   0  2912 2912  1768 S 0.0  0.3   0:00 named
  1419 named  9   0  2912 2912  1768 S 0.0  0.3   0:00 named
  1420 named  9   0  2912 2912  1768 S 0.0  0.3   0:08 named
  1425 named  9   0  2912 2912  1768 S 0.0  0.3   0:00 named
  1426 named  9   0  2912 2912  1768 S 0.0  0.3   0:01 named
26740 gene   9   0  2104 2104  1888 S 0.7  0.2   0:00 sshd
25221 gene   9   0  2036 2036  1652 S 0.0  0.2   0:00 imapsd
25222 admin  9   0  2012 2012  1648 S 0.0  0.2   0:00 imapsd
26738 root   9   0  1912 1912  1720 S 0.0  0.2   0:00 sshd
26299 apache 9   0  1788 1788  1488 S 0.0  0.2   0:00 httpd
26300 apache 9   0  1788 1788  1488 S 0.0  0.2   0:00 httpd
26304 apache 9   0  1784 1784  1488 S 0.0  0.2   0:00 httpd
26282 apache 9   0  1756 1756  1484 S 0.0  0.2   0:00 httpd
26308 apache 9   0  1748 1748  1484 S 0.0  0.2   0:00 httpd
26283 apache 9   0  1744 1744  1484 S 0.0  0.2   0:00 httpd
26293 apache 9   0  1744 1744  1484 S 0.0  0.2   0:00 httpd
26294 apache 9   0  1744 1744  1484 S 0.0  0.2   0:00 httpd
26295 apache 9   0  1744 1744  1484 S 0.0  0.2   0:00 httpd
26298 apache 9   0  1744 1744  1484 S 0.0  0.2   0:00 httpd
  2131 root   8   0  1644 1644  1112 S 0.0  0.2   0:01 bash
26741 gene   9   0  1576 1576  1088 S 0.0  0.2   0:00 bash
26281 root   8   0  1448 1448  1272 S 0.0  0.1   0:00 httpd




Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



Re: [expert] Fwd: memory leak

2002-08-11 Thread dfox

   total   used   free sharedbuffers cached
 Mem:   753750  2  0 11504
 -/+ buffers/cache:234518
 Swap:  784  0784

Well, that seems reasonable. Cached RAM is pretty high, but that just
depends on prior activity - for instance using gcc a lot or other big
jobs, the cache will get utilized to remember those pages because they
may be pressed into service again (like another gcc run). But if processes
come along and request RAM, the OS will just reuse what's in buffers and
cache. So, your memory isn't 'gone' it is just allocated in case something
comes along again that needs it.  Buffers (i.e., disk cache) get reused
for process memory if there isn't disk activity going on -- if there's
plenty of memory available elsewhere, buffers tend to not take up that
much space, unless there's a lot of recent disk activity. For instance if
you get up in the morning you may notice a large number in buffers first
thing in the morning. That's because 'locate' was just run a few hours
before -- and that works the disk.



Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com



Re: [expert] Fwd: memory leak

2002-08-10 Thread Michael Scottaline

On Sat, 10 Aug 2002 18:43:12 -0700
gene [EMAIL PROTECTED] scribbled intuitively:


Does anyone have advice for tracking down a memory leak?

I'm getting down to 2M of RAM.  Running 'top' doesn't show anything 
using much memory, and I've tried killing most of the running processes 
but that doesn't help.  I can only free up the memory by restarting my 
server.

I'm running kernel 2.4.7-12.3mdk.

Any advice is appreciated.

What *exactly* is top reporting to you.  You may not actually have a
memory leak.  Linux tends to view unused memory as wasted memory. 
Howmuch of that mem is actually cached.
Mike

-- 
Education is a progressive discovery of our own ignorance.
   --Will Durant



Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com