Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 09-23-2004, 05:51 AM   #1
LQ Newbie
Registered: Apr 2004
Location: London
Posts: 13

Rep: Reputation: 0
Possible Memory Leak

Hi All,

I have a little bit of a problem with my linux box. It seems to start running out of memory very quickly.

I have opened top to have a look and it is showing nothing is taking up a large chunk. if I keep top open I notice that the buffers mem allocation is going up gradually. At the same time the memory usage is going up (slower than the buffer memory - but still going up). I can't seem to find out what is causing this. Is it a kernel module that is buggy ?

I am running Redhat 9 with kernel

The server is pretty much a bare system. does not have anything really installed on it as yet.

Has anyone had problems like these? Is there something that can check and find the leak ?

Thanks in advance

Old 09-23-2004, 06:44 AM   #2
Registered: Nov 2003
Location: Ronneby, Sweden
Posts: 555

Rep: Reputation: 30
I don't think that you can judge memory usage that way. Linux tries to use as much memory as possible to cache disk access and stuff like that. This memory is automatically freed if some process needs it.

Is there a real "problem" associated with this? Does your system seem to slow down in a lot of swapping? Otherwise, there's no need to worry.

Old 09-23-2004, 06:46 AM   #3
Senior Member
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,991

Rep: Reputation: 76
This isn't necessarily a leak. Linux 2.6 caches access to non-volatile block devices (like hard disks) in unused memory where possible, which is why your buffer memory is going up. In effect, it uses free RAM as an additional hardware cache to speed up the hard disks.

If you are running the vanilla Red Hat 9 kernel, then it's very unlikely that a kernel bug like that would go unfixed for long; try installing any available kernel updates.

Note also that once memory has been moved from the free store to a process's heap, it can't be moved back unless the process re-execs itself (most daemons do this every few hours for that reason). So it's also not uncommon for memory to go up slightly as daemons are running; it should go down slightly again if you leave it for long enough.

You say it runs out of memory very quickly; could you please be more specific? What daemons (services) are you running, how much memory and swap space do you have, and how long is it taking for the memory to run out? Is it just RAM that is running out, or swap space as well?
Old 10-07-2004, 09:38 AM   #4
LQ Newbie
Registered: Oct 2004
Location: Montreal, Canada
Posts: 1

Rep: Reputation: 0
I'm having the same problem

Hi all,

I do have the same problem. I understand that the kernel allocate all free memory first and then starts to re-allocate pages but my system comes to a halt every 3 to 4 days. The message displayed on the console is "Not enough memory, killing process xxxx".
I read that the xinetd had a memory leak when a network connection is refused. So I installed the latest one and it corrected slightly the problem. My system seems to leak "less" (if you excuse my english).
I'm still trying to find out what is going on.

If you have any sugestions....

Thanks in advance.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
memory leak ? os2 Programming 1 05-19-2005 02:45 PM
Memory Leak?! RoaCh Of DisCor Linux - General 9 05-07-2005 01:26 AM
memory leak mfitzpat Linux - Newbie 1 09-24-2004 03:58 PM
memory leak mdk Mandriva 1 09-17-2004 11:54 AM
Memory Leak when using memory debugging C program on SuSE SLES8 babalina Linux - Distributions 0 10-06-2003 10:39 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:34 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration