Mombu the GNU Linux Forum sponsored links

Go Back   Mombu the GNU Linux Forum > GNU_Linux > Is this a memory leak?
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 25th January 17:59
deshmua
External User
 
Posts: 1
Default Is this a memory leak?



Hi,

I'm running Fedora (kernel 2.4.22-1.2115.nptl) on a PIII 660.
When I log in and run top from a terminal, I see that the memory
used keeps increasing by 8K or 16K each time top refreshes (which
is about once a second). Is this normal behaviour?
I have another machine running kernel 2.4.20-13.8 which does not
show this 'strange' behaviour.

Incidentally, top shows 61 processes, 59 sleeping, 2 running.
The top two processes are X and top, so i guess it should be one
of these that is causing the continuous "memory leak"? Also if
I shut down top for sometime and restart it, I can see that the
memory used has gone up (at almost the same rate). So could it
be that X is causing the strange behaviour? (assuming that the
behaviour is strange in the first place)

Can anyone else confirm whether this happens in your installation
of fedora too? Are there any reasons why the system should be
behaving this way?

Thanks in advance,
~ amol
  Reply With Quote


  sponsored links


2 25th January 18:00
cameron simpson
External User
 
Posts: 1
Default Is this a memory leak?



| When I log in and run top from a terminal, I see that the memory
| used keeps increasing by 8K or 16K each time top refreshes (which
| is about once a second). Is this normal behaviour?
| I have another machine running kernel 2.4.20-13.8 which does not
| show this 'strange' behaviour.
|
| Incidentally, top shows 61 processes, 59 sleeping, 2 running.
| The top two processes are X and top, so i guess it should be one
| of these that is causing the continuous "memory leak"? Also if
| I shut down top for sometime and restart it, I can see that the
| memory used has gone up (at almost the same rate). So could it
| be that X is causing the strange behaviour? (assuming that the
| behaviour is strange in the first place)
|
| Can anyone else confirm whether this happens in your installation
| of fedora too? Are there any reasons why the system should be
| behaving this way?

It's possible that this is simply the caching as background stuff ticks
over. Pages loaded into memory (eg reading files, loading executables)
stay there in case they're wanted again. In the absense of any other
need for that memory (i.e. you still have spare memory) unloading them
would be a bad idea because fetching them again from disc takes so long.

So on most Linux (and UNIX) systems you'll see your memory use slowly
creep up until it's mostly full, to maximise the chance that some wanted
data is already in memory when it's asked for. It is normal and desirable.

Because (on an idle system) most of that memory will be "clean" (versus
"dirty" which is "written" data sitting in memory waiting to be saved
to disc), it can be instantly discarded if the memory is needed for
something else, so there's almost no performance penalty to having the
memory mostly used. Cheers, --
Cameron Simpson <cs@zip.com.au> DoD#743
http://www.cskk.ezoshosting.com/cs/

It is better to go into a corner slow and come out fast,
than to go in fast and come out dead. - Stirling Moss
  Reply With Quote
3 26th January 03:29
public_viewer
External User
 
Posts: 1
Default Is this a memory leak?


That seems to be the right explanation, since I saw that after leaving
the system idle for a long time, the memory usage indicated by top
had stabilised and didnt change appreciably even when I started some applications.

Ah! Now that is nice to know

~ amol
  Reply With Quote
Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666