Mailinglist Archive: opensuse (3459 mails)

< Previous Next >
Re: [opensuse] Memory leakage, or normal? Was: Huge amount usage of ram memory ( i have 2Gb and free 121 Mb )
  • From: Aaron Kulkis <akulkis00@xxxxxxxxxx>
  • Date: Fri, 08 Feb 2008 08:02:56 -0500
  • Message-id: <47AC5300.6030900@xxxxxxxxxx>
Tero Pesonen wrote:
On Wednesday 06 February 2008, Sloan wrote:
Yes, Linux uses RAM as buffers but If a program needs RAM the kernel
will give it what it needs.

Unused RAM is a waste. Linux puts lazy RAM to work, it doesn't let it
lay around unused.

This may be a stupid question... but yesterday I noticed that free -m showed +/- buffers/cache free to be about 400 on my 1GB desktop. Typically I run close to 700 free even with Firefox running. So I checked if something was grabbing a lot of memory, and indeed ksysguard showed for kmail VmRss to be > 380 000. Typically kmail runs at VmRss 30 000 - 40 000.

This happened after I had copied messages from a folder on one server to a folder on another. Both IMAP servers. I copied more messages, and it seemed kmail's VmRss kept on growing. It even passed 400 000. However, once I settled for "normal" use, i.e. was done with the copying, the memory use for kmail remained the same, although I would have expected the opposite, i.e. it to free this memory it needed for copying. Even 6 hours later it was still using exactly the same amount of memory.

I was wondering if this is normal, and kmail would have freed some of this memory if other processes would have needed it (it no longer needed for copying -- copying was finished long ago), or whether it actually leaked this memory and failed to free it. I mean, does this VmRss correspond to actual reserved memory (like, well, malloced in C), or does it mean something else?

If I am able to reproduce this, is it a bug, or am I seeing normal memory use for a process on Linux?

Yes, it is normal for Linux.

You still haven't started swapping, so there's no reason for
the memory manager section of the kernel to free up buffers
used by kmail reads (or even writes).

Now, whether this is desirable behavior by kmail is a different
question entirely. Some would say yes, some would say no.
Personally, I like program which allow me to force the clearing
of memory and disk caches without shutting down the app (for
example, sea-monkey).

Tero Pesonen

To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >