Click to See Complete Forum and Search --> : Why is my used memory is getting used a litle more each day ?


Donovan
12-08-2000, 09:49 PM
Hi, every day, my 1 gig ram get used a little bit more.

It seems each time I view a log it eats memory that is not restored after I exit.

1) Why is my memory used a little bit more everyday ?

2) How can I list what's in my server memory ?

3) How can I clean my server memory

(i'm running on a debian linux).

Thanks,
Donov

Strike
12-08-2000, 10:22 PM
Do this and see how much memory you have left

free -m | grep buffers/cache | awk '{print $3}'

Just because more memory is used doesn't mean that it isn't being used for buffering or cache. This will tell you how much memory is truly being used (non-expendable memory).

[This message has been edited by Strike (edited 08 December 2000).]

posterboy
12-09-2000, 07:04 AM
Yup, and it's important to understand this, too. Linux tries really hard to eat up all the available ram, but it's all being put to a good use. As you access the disk, more and more of it is kept in cache ram. This is done for speed and efficiency. It will first look for the needed disk sectors in ram, and load them from there if found. However, when you start an app, and YOU need that ram, the cache is reduced accordingly, and you are given back the ram you need. The goal is that no ram is just lying around in the machine idle, and unused. Wanna watch it work? Load a biggie, say Netscape. Now, kill it and do nothing else. Load it the second time, and watch the dramatic difference in the disk drive light, and the time it takes to get it going. The second time, Netscape comes out of cache. Just what we wanted. Ray


------------------
ray@raymondjones.net
HTTP://www.raymondjones.net

Donovan
12-09-2000, 07:31 AM
Wow I didn't knew this, its a great thing to learn, and YES, the memory used goes into buffering and cache http://www.linuxnewbie.org/ubb/smile.gif

when you start an app, and YOU need that ram, the cache is reduced accordingly, and you are given back the ram you need

Great !! Now I won't worry about it for my web server http://www.linuxnewbie.org/ubb/smile.gif)

Donov