Refreshing RAM -- software or command? Trying to free up memory
SlackwareThis Forum is for the discussion of Slackware Linux.
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.
Refreshing RAM -- software or command? Trying to free up memory
It seems as I leave my computer on longer and longer more and more things are store in my RAM, of course. But the thing is, I'll close out everything open and check the useage and it doesnt drop down to a low consumed amount as when i first boot up or not really even close to it. Yeah, I'm sure things are running or stored based upon some of the applications I used, but I can ope things up again and it just adds even more to it. As a result, the only option I can do to get my system "fresh" again is to simply reboot. Is there a piece of software or a command I could use to free up some of the non-needed memory? I still have yet to see my swap be used for anything.
Well it's just that, once i just tried this, opened several programs and my RAM got used up -- only like 17 mbs left -- and my system start to lag or skip. Then as I would close out the programs, I'm still left with this surplus of memory used with even less amount of ram to use for whatever. My swap never got used during this. I thought it was suppose to be used when the RAM maxed out or something. I've never seen it used. So I have to reboot my machine to free up precious memory and run smoothly.
I'm sure someone has said this before, but KDE reminds me so much of Window$ ... also the reason why I never use it. I used GNOME for a while, and while it's less leaky, it is not less buggy. (I recommend fluxbox or blackbox and using programs not associated with KDE whenever possible ... cuz they also leak. I still use k3b, of course, because I don't want badly burned CDs/DVDs. I'll try to switch to bashburn when I can tho.)
Last edited by H_TeXMeX_H; 03-06-2007 at 01:21 PM.
fluxbox blackbox... hm.. sounds cool. I have never seen them. are the superkaramba widgets available for them as well? I assume no, because i got it at kde-look.org. what about xfce? i saw my friend use that on zenwalk once. I thought it was cool, but I couldn't find all the widgets that i so love. And also because the icons i downloaded like teh crystal clear and others werent available. i'll take a look into those other GUIs
You could turn off any services that you don't use. This would free some memory up. If you are using KDE, as mentioned before KDE is leaky and a hog. I like xfce4. XFCE4 works great for me.
BTW, the swap will page out when the RAM is not sufficient for an application. You could increase your RAM.
thanks for the suggestion, but i have turned off a few services, yet however most of them were already disabled. I have also gone into my rc.d folder and made a few non-executable.
your ram is used as disk cache. that's why subsequent calls of an program are loaded faster than the first call.
kinfocenter has a nice diagram view of memory.
Leaky and a hog? Look at the OPs specs -- he can definitely run KDE. Don't believe the Gnomes (and GTKists)
Seriously, can you measure that your machine is getting slower or is it rather a feeling? Does it swap?
Linux buffers a lot in memory, but frees buffers when needed. My box has 512 MB and hardly ever swaps, also not if running for long time. And I would not say that anything gets slower then.
I think it's clear that it is a memory leak ... more testing won't hurt tho ...
Maybe it's just one app that's leaking. Use 'top' and sort by memory usage ... check was uses up the most memory.
(KDE is a leaky hog, but if your computer can handle it, then go for it. My computer can handle it, but I have better things to do with my system resources)
Last edited by H_TeXMeX_H; 03-06-2007 at 02:29 PM.
The memory management changed somewhere around 2.6.8. I say somewhere, because I just happened to notice it, but I'm not sure if the change didn't happen when I switched from 2.4 to 2.6. In any case, before the change, I would also notice that memory usage would grow and grow until it was almost all used up; but I never saw any swapping. That's why I wanted to point out that numbers on a tool are not a symptom. If it's not swapping, and if it's not actually slowing down, then there's no problem. In later kernels, they've changed something called "swappiness" so that you no longer see the memory in-use going up.
There's another issue that you might think about, as well. Have you done anything about hard disk access? There is a program called hdparm that you can set a few parameters that do make a difference. For example, here is my hdparm string:
Code:
hdparm -m16 -d1 -c1 -u1 -Xudma6 -k1 /dev/hda
These should all be safe for you to run, as none of them are out there on the "edge". If you were to have a problem, it would be with "-Xudma6". There is also a very slight potential for "-c1" to be a problem, but it shouldn't be. If this improves lagginess, you'll probably need to run it after every boot, to get the benefits of everything other than -d1, which I believe is "sticky", and gives you the biggest bang for the buck.
And, remember to read 'man hdparm', a number of options have the words "Dangerous", or "massive filesystem corruption", or "extreme caution" in bold ... so, remember, be careful
your ram is used as disk cache. that's why subsequent calls of an program are loaded faster than the first call.
kinfocenter has a nice diagram view of memory.
EDIT:
ok, let me explain a bit. disk cache means that the kernel keeps data in ram, that was recently accessed to save you some time, if you need it again. all modern operating systems do that
(and i think windows vista even remembers, what programs you used between boots and caches these when the computer is idle, cool! )
so there is nothing to worry about.
your swap will be used, when it's needed. cat /proc/swaps if you want to test, if it's activated.
Last edited by erklaerbaer; 03-06-2007 at 04:35 PM.
Six months ago, I was a windows user, and now I see my ram being used up when i open programs of course, but then when i close them it doesnt free up the same amount of ram they took up. What kind of tests should I run? I've done top and free before. Yall want the results? :\ >.!! I'm still a lil wary or concerned about my swap. I've never seen it in use. :/
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.