LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-06-2007, 12:12 PM   #1
hyphae
Member
 
Registered: Jan 2007
Location: Atlanta
Distribution: Slack 11
Posts: 46

Rep: Reputation: 15
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.
 
Old 03-06-2007, 12:17 PM   #2
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
It doesn't need to be cleaned up. Or do you have some specific symptoms that you can describe? High memory usage reported by a tool is not a symptom.
 
Old 03-06-2007, 12:56 PM   #3
hyphae
Member
 
Registered: Jan 2007
Location: Atlanta
Distribution: Slack 11
Posts: 46

Original Poster
Rep: Reputation: 15
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.
 
Old 03-06-2007, 01:17 PM   #4
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
Lemme guess you're running KDE

It leaks like ... a leaky dam ...

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.
 
Old 03-06-2007, 01:27 PM   #5
hyphae
Member
 
Registered: Jan 2007
Location: Atlanta
Distribution: Slack 11
Posts: 46

Original Poster
Rep: Reputation: 15
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

:edit: -- nvm went to fluxbox.org

Last edited by hyphae; 03-06-2007 at 01:43 PM.
 
Old 03-06-2007, 01:34 PM   #6
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
Hi,

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.
 
Old 03-06-2007, 01:44 PM   #7
hyphae
Member
 
Registered: Jan 2007
Location: Atlanta
Distribution: Slack 11
Posts: 46

Original Poster
Rep: Reputation: 15
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.
 
Old 03-06-2007, 02:06 PM   #8
erklaerbaer
Member
 
Registered: Mar 2006
Posts: 381

Rep: Reputation: 30
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.
 
Old 03-06-2007, 02:16 PM   #9
General Failure
Member
 
Registered: Jan 2007
Location: Germany
Distribution: Slackware 13.37
Posts: 387

Rep: Reputation: 37
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.

Could you do some measuring and post the results?

Edit: I use KDE btw
 
Old 03-06-2007, 02:27 PM   #10
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
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.
 
Old 03-06-2007, 03:07 PM   #11
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
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.
 
Old 03-06-2007, 03:25 PM   #12
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
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
 
Old 03-06-2007, 03:29 PM   #13
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
Yes, that's why I raised the flag about -Xudma6
 
Old 03-06-2007, 03:39 PM   #14
erklaerbaer
Member
 
Registered: Mar 2006
Posts: 381

Rep: Reputation: 30
Quote:
Originally Posted by erklaerbaer
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.
 
Old 03-06-2007, 04:14 PM   #15
hyphae
Member
 
Registered: Jan 2007
Location: Atlanta
Distribution: Slack 11
Posts: 46

Original Poster
Rep: Reputation: 15
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. :/
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Does free( ) immediatly free the memory? Rayven Programming 24 11-06-2006 02:24 AM
LXer: Becoming a free software developer, part II: Free software ... LXer Syndicated Linux News 0 08-19-2006 07:33 PM
LXer: Free and Open Source Software Development Education Materials (for Free!) LXer Syndicated Linux News 0 08-10-2006 02:21 AM
howto free ram memory pingvina Linux - General 3 08-07-2006 01:52 PM
refreshing memory. dr_zayus69 Linux - Hardware 1 01-12-2005 01:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration