LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Possible Memory Leak (https://www.linuxquestions.org/questions/linux-general-1/possible-memory-leak-234199/)

liquidcool 09-23-2004 04:51 AM

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 2.6.8.1.

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

Cheers
J

MartinN 09-23-2004 05:44 AM

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.

Martin

rjlee 09-23-2004 05:46 AM

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?

boismarj 10-07-2004 08:38 AM

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.


All times are GMT -5. The time now is 04:40 PM.