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

Re: Memory leak - somewhere :)



"Jeetu Golani" <j_golani@softhome.net> writes:
> I have a Debian 3.0 installation on my P4 2.2 512MB with 256MB Swap
> system. I use KDE 3.1.
> 
> For sometime, I've been feeling that there's a memory leak in one of
> the apps because after quite a few days of use KDE becomes
> slow. Apps I typically use are KMail,Konqueror,KMerlin,Konsole,K3B.
> 
> I've noticed that memory seems to be consumed at an alarmingly huge
> rate.  Sometimes about 300MB+ gets used up overnight inspite of no
> additional programs being run. For e.g. if with a clean boot into
> KDE I have 300MB of free Physical memory left (as displayed by free)
> and the whole swap free then the next morning I may see just 5MB of
> Physical memory free and the Swap used to a degree.
> 
> I thought it could be KDE or artsd or some such component/app and I
> kept rebooting my system with one less program running each time
> i.e. i'd turn on KDE and not switch on KMail and see how it performs
> and next time wouldn't switch on KMail and K3b,etc.....did this till
> i basically had a bare KDE session running but the memory usage
> issue continued.
> 
> I therefore thought it may be X and I just put a # in the
> default-display-manager file in /etc/X11, therefore since there's no
> default manager I just get a message stating that at bootup and X
> doesn't come up.
> 
> If I do a free in succession with just this much I notice that my
> memory is going down at a rate of 8KB each successive
> reduction.....this is most of the time...although sometimes
> reductions can be of different sizes.
> 
> I can't make much of it.....is this normal?? doesn't look like it
> should.....since I'm basically not turning on any
> programs...therefore something seems to be up.......any help on
> either clarifying my understanding on the above or tracing the rogue
> program would be appreciated....has neone else noticed something
> similar.

This has got to be in a FAQ somewhere. In all my years of using Linux
and reading mailing lists and Usenet I've seen this question more than
any other. Anyway...

Linux allocates all free memory for disk cache. If an application
requests memory and all of it is being used by the disk cache then
Linux frees up some of the memory being used by the disk cache for the
application. On a healthy system, that you've been using for a while,
you should have very little "free" memory.

That doesn't mean you don't have something that's leaking memory, it
just means you'll have to look harder to find out if there is indeed
something sucking up memory.

Gary



Reply to: