LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Linux takes RAM and doesn't give it back! (https://www.linuxquestions.org/questions/linux-hardware-18/linux-takes-ram-and-doesnt-give-it-back-189838/)

rootking 06-04-2004 08:39 PM

Linux takes RAM and doesn't give it back!
 
does anyone know why linux will keeping taking physical RAM and never give any of it back until you've rebooted? shouldn't it be giving it back as programs are shutdown? I have an ftp server running on Debian 3.0 w/2.6.5krnl with over 700 MB of RAM and after around a week the ram will be down to around 30 MB. How do you explain this?

thanks
rootking

rshaw 06-04-2004 08:55 PM

it won't 'free' memory until another process need some. it's normal

lighty14 06-05-2004 12:08 AM

Yes, Linux uses up ram that programs aren't using and uses it for disk cache -- Linux stores recently accessed file data in your ram, which allows for programs that access the same files a lot a little faster, as the data is in the ram as opposed to on the harddrive. In reality, Linux uses very little ram, in fact, most Linux desktops would be more than fine with 256mb of ram, as opposed to the now almost standard 512mb.

vectordrake 06-05-2004 09:13 AM

Use the "free" command and you'll see what rshaw and lighty14 mean. Much of your RAM is just sitting as cache and buffers, waiting for real use.

vectordrake 06-19-2004 09:12 PM

I found one of the very best explanations for what you want to know right here. This post seems to be one of the best descriptors of Linux memory management out there. You'll know what's really going on after you read this clear explanation. Cheers.



edited, as usual, because I am too proud to use the spellcheck...


All times are GMT -5. The time now is 06:09 AM.