Memory slipping away

Memory slipping away

Post by Tyson Oswal » Sun, 11 May 2003 22:08:43



I have this issue that I can't quite figure out how to fix. I have noticed
that after I boot my linux 2.4.20 system, memory slips away at
about 4-10k per second.  I have shutdown nearly all non essential services
such as httpd, crond, upsd,xfs,xinetd, sendmail etc. And, nothing seems to
slow it down.  I did try run level 1 and it did not have any memory problem so I
doubt it is with the kernel itself, but I maybe within a module.

Does anyone know of a way to track down what process is leaking memory, or
is this just a trait of Linux (which I doubt)?  I do not have anything
running that I developed.  The only thing I have written would be running
from cron, and I disabled that job in my crontab.

If someone soukld help me out with this it would be greatly appreciated.

thanks,

Tyson Oswald

p.s I have included the output from free

Quote:>uptime

  8:08am  up  7:50,  3 users,  load average: 0.05, 0.05, 0.00

Quote:>free

             total       used       free     shared    buffers     cached
Mem:        515468     509584       5884          0      75200     242672
-/+ buffers/cache:     191712     323756
Swap:      1044184        508    1043676
 
 
 

Memory slipping away

Post by Bill Marcu » Mon, 12 May 2003 02:19:45


On Sat, 10 May 2003 13:08:43 GMT, Tyson Oswald

> I have this issue that I can't quite figure out how to fix. I have noticed
> that after I boot my linux 2.4.20 system, memory slips away at
> about 4-10k per second.  I have shutdown nearly all non essential services
> such as httpd, crond, upsd,xfs,xinetd, sendmail etc. And, nothing seems to
> slow it down.  I did try run level 1 and it did not have any memory
problem so I
> doubt it is with the kernel itself, but I maybe within a module.

> Does anyone know of a way to track down what process is leaking memory, or
> is this just a trait of Linux (which I doubt)?  I do not have anything
> running that I developed.  The only thing I have written would be running
> from cron, and I disabled that job in my crontab.

> If someone soukld help me out with this it would be greatly appreciated.

> thanks,

> Tyson Oswald

> p.s I have included the output from free

>>uptime
>   8:08am  up  7:50,  3 users,  load average: 0.05, 0.05, 0.00

>>free
>              total       used       free     shared    buffers     cached
> Mem:        515468     509584       5884          0      75200     242672
> -/+ buffers/cache:     191712     323756
> Swap:      1044184        508    1043676

If you had showed the output from two or more runs of free, it would be
easier to judge whether there is a problem, but it's normal for Linux to
use any otherwise unused memory as buffers or cache.  The second row
of numbers is more important to indicate if there is a meory leak.

--
It's important that people know what you stand for.
It's more important that they know what you won't stand for.

 
 
 

Memory slipping away

Post by Kevin Buh » Mon, 12 May 2003 05:31:56



> I have this issue that I can't quite figure out how to fix. I have noticed
> that after I boot my linux 2.4.20 system, memory slips away at
> about 4-10k per second.

It's not slipping away.  It's being used (mostly) to cache file data
and metadata.

Quote:> >free
>              total       used       free     shared    buffers     cached
> Mem:        515468     509584       5884          0      75200     242672
> -/+ buffers/cache:     191712     323756
> Swap:      1044184        508    1043676

This is normal behaviour.  You'll note that while the free memory is
"only" 5884, once the 75200 of buffers and 242672 of cached pages are
added back, the actual free memory (that is, memory that can be
immediately or at least fairly quickly freed up) is 323756---that's
what that second number in the second line means.

Free memory is wasted memory.  Linux makes the best use of your free
memory by caching all the potentially useful information it can.

--