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
|