Click to See Complete Forum and Search --> : Linux memory question


bkurt
12-14-2000, 08:22 PM
I have a question about memory usage in Linux. I'm running slack 7.1, xfree 4.0.1 and kde 2.0 and it seems like it just keeps sucking down the memory and doesn't reclaim it. When I first boot up and then issue the free command it says i'm using about 70MB of memory. I have 256 by the way and 128 swap. So then I open up a bunch of programs and hog up just about all the memory and then close them all back up. Now I would think that the memory would fall back about to where I booted up but with everything close except kde terminal it says i'm still using around 160 megs. Is this normal?? What could be going on. I just installed the extra 128MB of memory so that's why I noticed. Thanks for any help.

Derango
12-14-2000, 08:47 PM
When you open a file in linux, linux moves the file from the hard drive to the system memory. When you close the file, linux does not remove it from the RAM just in case you might need to use it in the future. That way the next time you need it, it will load faster.

If a program needs that memory, the cached file will be moved from the memory to the disk and the memory will be freed.

So, in short, this is normal, and good. It dosent effect anything performance wise.

bkurt
12-14-2000, 08:53 PM
Thanks for the info Derango. Do you know of anywhere you find answers to questions like that besides on a bbs. Is there a good sys admin book or something to that effect or have you worked with Unix and Linux for sometime? Thanks again!!!

A_Lawn_GNOME
12-14-2000, 09:51 PM
Don't have it yet but you could always try Running Linux 3rd ed from O'Reilly. I gotta get it soon but if it's as good as ppl say it is, it should have it.

Derango
12-14-2000, 10:34 PM
Running Linux 3rd ed from O'Reilly is a great book for somone looking for an overview of the Linux OS. I would reccomend it to anyone.

------------------
This space For Rent

bkurt
12-15-2000, 09:55 AM
Derango, one more quick memory question. One issuing the free command it gives you several headings and one is cached. This is what I assume you were talking about when you said linux caches that in memory for possible later use but if needed will reclaim it?? Thanks again.

Derango
12-15-2000, 10:00 AM
yes, the cached memory is what I was talking about. The files stored in the cache will be moved back to the hard drive if the memory is needed by another program.

------------------
This space For Rent