Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
I'm by no means an linux expert, but I'm a good many rungs up the ladder from newbie. I've been using Linux for several years, off and on, and mainly in server applications, but now I am running a linux box as my primary worksation. (see my signature for specs)
I noticed recently that almost 100% of my 512MB of RAM is in use at any given time. I am quite baffled by this, because I really am not running very much.
I usually run KDE, xmms, Firefox, amsn, a few basic applets (clock, kweather, pager), 2 desktops, and a ssh/ftp daemon.
In my opinion that should NOT use up 500 MB of RAM! I am wondering if you all have some tips for reducing the amount of memory being consumed. Here is a snapshot from top:
well, KDE is somewhat of a memory hog..........on my linux from scratch install.......KDE uses 75-80 megs minimum........and If I use the GIMP.....or any Graphics intensive program........memory use goes UP^^^^.............
you spent your own hard earned money on 512mb of RAM. would you rather that only 200mb of this was used, and the rest just sat there gathering cobwebs, or have all the available space used with potentially useful information, that can be dropped instantly if the space becomes required.
linux uses up physical memory deliberately. look into the full memory model for more information.
as to actually using les ram in the first place... don't use kde.
If you don't want to use so much memory, try using a lighter GUI like, Fluxbox, IceWM or XFCE (my current favorite, although this usually changes weekly and sometimes daily). Also only use 1 desktop instead of 2.
However, if your not noticing any slowdown I wouldn't worry about it or look into getting more RAM. How Linux is designed, it makes sure all your physical memory is in use before resorting to SWAP. In contrast (if I remember correctly) Windows tries to keep a certain amount RAM open so programs load faster, but the problem with this model is that they usually run slower. I would rather have a program take longer to load and have actual speed, then have a program open quickly and have the illusion of speed.
I'd like to get away from KDE and all it's terrible problems, but I can't seem to find anything in the middle. All the desktop systems I've seen are either bloated, or too minimal. I don't know what else to try.
It's not that I don;t want to use it. It's that I don't want to be running virtually nothing, filling up almost all of it, and then not be able to play Unreal Tournament or open several large files with Gimp or something you know? I guess it hasn't really been a problem as such. I was just concerned about a memory leak somewhere. Not to mention, I'm trying to squeeze as much preformance out of my system as possible.
I totally agree with Boyer, i need my RAM for games,
image editing et.c. I didn't buy my RAM chip so that some
bloated KDE-crap would fill it up (i still don't understand
how KDE can consume so enourmes amounts of memory).
This is why i use XFCE (fluxbox is to ugly).
And saying that Linux should deliberately fill up memory
to avoid "waste" is like saying that programs should fill up
my 200 GBs HD with meaningless "information" to avoid
"waste".
Originally posted by BBB I totally agree with Boyer, i need my RAM for games,
image editing et.c. I didn't buy my RAM chip so that some
bloated KDE-crap would fill it up (i still don't understand
how KDE can consume so enourmes amounts of memory).
This is why i use XFCE (fluxbox is to ugly).
And saying that Linux should deliberately fill up memory
to avoid "waste" is like saying that programs should fill up
my 200 GBs HD with meaningless "information" to avoid
"waste".
so play your games and linux will free up the memory needed. and using up memory is not the same as having random junk fill up your hard drive. well, if you're a windows user, it is considering windows will swap to hard drive even if you have available memory (XP that is). there's a reason why you want to load things into memory, and it's called speed. memory i/o is always faster than hard drive i/o. not saying you shouldn't have the memory to play your games or do your graphic design, but your analogy is braindead. linux will free up needed memory (if possible).
Will it will free it up, or just dump it on the swap? And how
long does it take to free up the memory? Why does it
use so much memory in the first place? I don't notice *any*
difference between when i have just started my system
and theres only 70 MB in use and when there is 200 MB
in use after 30 minutes of computer use. Also i don't register
this increased memory consumption in gPS (graphical
Top clone), just in the XFCE mem-monitor. This is a bit
funny, where does this unregistered mem go?
Even though i close Opera, Konqueror, restart the X-server
et.c. there is still approx. 100 MB of unregistered mem usage.
Also there seems to be a memory leak in Slackware 10, even though i have just started
the system 95% of the RAM is in use and most of it is unregistered :S .
Originally posted by BBB Will it will free it up, or just dump it on the swap? And how
long does it take to free up the memory? Why does it
use so much memory in the first place? I don't notice *any*
difference between when i have just started my system
and theres only 70 MB in use and when there is 200 MB
in use after 30 minutes of computer use. Also i don't register
this increased memory consumption in gPS (graphical
Top clone), just in the XFCE mem-monitor. This is a bit
funny, where does this unregistered mem go?
Even though i close Opera, Konqueror, restart the X-server
et.c. there is still approx. 100 MB of unregistered mem usage.
Also there seems to be a memory leak in Slackware 10, even though i have just started
the system 95% of the RAM is in use and most of it is unregistered :S .
just because top shows you having only a certain amount of memory free, doesn't mean that's what's really free. linux uses 4 types of memory (your memory is "broken" up into 4 different types) - user, shared, buffers, and cache. if you want to know why there's descrepency between what top (console usage program) is showing as free memory available and your gui app, subtract out the memory "usage" of buffers and cache in top. linux will only use swap if there is absolutely no memory left. buffers and cache are only used when applications need them. that is a good thing since memory i/o is a lot faster than hard drive i/o. linux stores data in buffers and cache for possible later use. having high mem usage in buffers and cache doesn't hurt you at all and is considered free memory (as you saw in your graphical usage app). you need to be aware of high mem usage of user and shared memory types.
this says i only have 32 MB of memory free of 512 MB of total ram. but looking at cache (295 MB) and buffer (14 MB) gives a total of 309 MB of buffer and cache which added to free memory shown by top is 341 MB. That is almost exactly what shows up as free memory when i look at gkrellm (and other system usage programs). just because top ( or some other system console program) shows buffers and cache showing usage, doesn't mean it's actually being used at all. buffer and cache are normally only used when you start up applications and your application needs the memory.
Aha, so thats how it works. So when progams need more
memory the kernel just gives the memory blocks of the
least important buffers? Isnt this a potential security threat?
I mean if there is classified information in the buffers then
non-root programs can accses this info if it isn't cleaned
before given to the programs (which would use valuable
CPU-time).
I really need to study the Linux kernel, any links to tech
papers about the kernel?
In a nut shell memory is delegated by the kernel when a program needs it. This can be in a GUI env or just a console env. It doesn't care. As stated before linux will use all memory before the swap because memory is faster.
What linux does is move memory if its not being used at that moment to swap if a another program needs that memory.
From a recent article, I understand that Gentoo and Slackware
are among the fastest. If you want speed, you might consider
switching. Although Mandrake and Xandros (which I use) are
more user-friendly.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.