PDA

View Full Version : the RAM cache... sofware to clear that? seems bloated



jsabarese
3rd June 2006, 04:29 AM
playing w/ these toolbar / sys monitor things -- i noticed that my memory usage is really up there relatively speaking-- i'm barely running anythiing (firefox, terminal, text editor), and i've got 36% in use by progs and 55% as cache. does that seem bloated to you? mem leaks or something? w/ all the changes i've been making, it wouldn't surprise me (i've seen it happen in Win at least)

is there any software that you recommend to keep that sort of thing nice and clean? (if you know FreeRAM xppro, then you know what i'm looking for here)

thanks!

William Haller
3rd June 2006, 04:50 AM
I don't know the details of the algorithm, but Linux keeps a great lot of disk cached in RAM so it doesn't have to go to disk if you want something you just used. Don't worry about it at all. That's the way it's supposed to work. Cache is your friend - if your program needs the space, it will give it to your program. If your program gets large, programs will swap to disk (that's the swap space you see listed). Frequently, in most modern systems with a lot of RAM, you may not use any swap space at all (or use it for infrequently used running daemon processes).

jsabarese
3rd June 2006, 06:16 AM
Thanks, William. that's good to hear! it makes sense considering that i didn't really notice any performance degradation... just paranoia!

psyklops
3rd June 2006, 07:43 AM
In actual fact, the way Linux does it and most Unixes is very good. I'm running 2GB of RAM and my system performs perfectly. There's very little swapping and I can load the system up with vritual machines, surfing, playing music watching dvd's etc.etc without it skipping a beat. You can probably tweak the way the kernel manipulates the memory using settings in /proc.

My system is dual booting Windows XP and there is no way WinXP could run all of the above like FC5 does and perform the same...

robghealey
3rd June 2006, 08:11 AM
I am running a dual boot with winXP and FC5 as well. I have a dual proc Pii 400 with 512 RAM. I know that I can load up FC5 with much more programs running than I can do with my WinXP side of the computer. If I could get Fc5 to work with my printer (which is Linux friendly so says linuxprinting.com), I would blow up my windowsXP all together......

phearthepenguin
14th August 2006, 08:31 PM
What would be a good way to decrease the amount of memory your system uses when it boots? I guess I could use webmin right? Basically when I boot my FC5 machine and after all is said and done on a fresh boot I am using 385 to 425 Megs of RAM. I would like to decrease this number significantly. Also, I understand that Linux caches your apps in memory BUT it does not seem to release all the memory it allocated from the beginning and I would like to recoupe that memory. I would like to not ever see my system reach the swap file...leaves me with an uneasy feeling.

So, to anyone/everyone...any suggestions as to where I should start...I am open to any and all recommendations.

JordanN
15th August 2006, 03:47 AM
Linux, from what I'm told, is designed to take advantage of any RAM available. This way, you don't throw 2 GB of RAM into a server and have it sit unused.

Mariano Suárez-
15th August 2006, 04:15 AM
What would be a good way to decrease the amount of memory your system uses when it boots? I guess I could use webmin right? Basically when I boot my FC5 machine and after all is said and done on a fresh boot I am using 385 to 425 Megs of RAM. I would like to decrease this number significantly. Also, I understand that Linux caches your apps in memory BUT it does not seem to release all the memory it allocated from the beginning and I would like to recoupe that memory. I would like to not ever see my system reach the swap file...leaves me with an uneasy feeling.

So, to anyone/everyone...any suggestions as to where I should start...I am open to any and all recommendations.

Your uneasy fealing is completely unjustified. Just let the kernel and friends manage memory.

phearthepenguin
15th August 2006, 01:39 PM
Linux, from what I'm told, is designed to take advantage of any RAM available. This way, you don't throw 2 GB of RAM into a server and have it sit unused.
I can completely understand that aspect of it but when I quit programs I would like the OS to release the memory it had allocated completely instead of leaving it cached. Also, if my FC5 machine is sitting idol I can see it slowly gobble up memory...i'm not even opening any programs or there are no programs running and it is just eating up a meg or two at a time...I find this behavior very odd as it seems like it should be, at the very least, remaining stable and not eating up free memory for no apparent reason.


Your uneasy fealing is completely unjustified. Just let the kernel and friends manage memory.
Unjustified? I am still relatively new to the linux universe so I don't think that I am unjustified...I am just looking for answers other than, "just let the kernel and friends manage memory"...that does not tell me anything. I come to this forum looking for logical solutions and that's not one by any stretch of the imagination.

markkuk
15th August 2006, 02:37 PM
Also, if my FC5 machine is sitting idol I can see it slowly gobble up memory...i'm not even opening any programs or there are no programs running
There are always programs running in a Linux system, even if you haven't started any user level software from the GUI. Just look at the output of "ps ax" on a machine you think is idle.


Unjustified? I am still relatively new to the linux universe so I don't think that I am unjustified...I am just looking for answers other than, "just let the kernel and friends manage memory"...that does not tell me anything.
OK, go to http://www.phptr.com/promotions/promotion.asp?promo=1484&redir=1&rl=1 and download the PDF of Understanding the Linux Virtual Memory Manager (http://www.phptr.com/bookstore/product.asp?isbn=0131453483&rl=1). That should tell you everything there is to know about memory management.


I come to this forum looking for logical solutions and that's not one by any stretch of the imagination.
There's no problem, therefore there can't be any solution.

Mariano Suárez-
15th August 2006, 11:46 PM
I can completely understand that aspect of it but when I quit programs I would like the OS to release the memory it had allocated completely instead of leaving it cached. Also, if my FC5 machine is sitting idol I can see it slowly gobble up memory...i'm not even opening any programs or there are no programs running and it is just eating up a meg or two at a time...I find this behavior very odd as it seems like it should be, at the very least, remaining stable and not eating up free memory for no apparent reason.

Having unused memory is useless. If no programs are running, there is no need for memory to be free, so it would be a waste of effort to free it.

A problem would certainly exist if, when the time comes that memory is needed, the kernel and friends did not release caches &c to satisfy the need. This does not happen.


Unjustified? I am still relatively new to the linux universe so I don't think that I am unjustified...I am just looking for answers other than, "just let the kernel and friends manage memory"...that does not tell me anything. I come to this forum looking for logical solutions and that's not one by any stretch of the imagination.

You are unjustified in assuming there is a problem.

Letting the kernel and friends manage memory is a rather logical solution, as the kernel and friends are designed, written and maintained by people who do know what they are doing. Certainly things could be better, of course, but if you are, as you say, new to the linux universe, I am quite confident you are also new to the universe of memory management &c: in that case, I would say that the most logical thing to do is to occupy your energy on other areas of this unexplored linux universe which will, undoubtedly, be of greater utility for you.

YMMV, of course.