Linux - GeneralThis 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.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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 ?
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.
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?
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.