[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: newbie questions re: memory usage, leaks and troubleshooting



On Sun, Jul 15, 2001 at 08:53:32PM -0700, Kurt Lieber wrote:
> I'm running potato with Apache and MySQL and have noticed some memory
> problems that I'm not sure how to troubleshoot.  Basically, available memory
> keeps getting used up and not reclaimed.  Swap space doesn't seem to get
> used much, if at all.  Currently, free says:
> 
>                 total           used         free             shared
> buffers     cached
> Mem:       257952     103052     154900      32696      58040      25440
> -/+ buffers/cache:      19572        238380
> Swap:       658624         0           658624

You have lots of free memory.  It isn't even used for caching yet.

PS: next time, format these tables a bit nicer when you post them, or
use a mail client that displays non-proportional fonts.  It is a sort 
of standard on internet mailing lists and newsgroups to assume fixed 
fonts.

> But if I use top and manually add up all the values of the RSS field, I get
> something around 50MB.  (BTW, does anyone know a better way to do this?)  In
> fact, the values of the RSS field don't seem to match with top's summary
> information at the top.  There's no single process that seems to be using a
> large amount of memory, either.  ps -A v shows no single process eating over
> 1% of memory.
> 
> If I leave the box running for a couple days, memory usage keeps increasing
> until it gets near the ceiling of total RAM.  things like Samba and apache
> start to get sluggish and I end up rebooting.

Are you sure it isn't being used as buffer or cache?  The kernel will shrink
buffers and cache automatically when it needs the memory for processes.

You can use vmstat to see more closely what is going on when the system
feel sluggish.

> I'm not sure how to start troubleshooting this, so I'm looking for some
> recommendations.  I'm running a vanilla version of Potato with the only
> non-stable or non-debian packages being mod_mp3 for Apache and ssh2 from
> testing.  This is not a heavily-used box by any means -- it's on my home
> LAN.

You are not making very clear where there is a problem in the first place.

Cheers,


Joost



Reply to: