LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-13-2009, 07:44 PM   #1
Drycola
LQ Newbie
 
Registered: Aug 2009
Location: IRAQ
Distribution: Ubuntu
Posts: 20

Rep: Reputation: 0
Exclamation Where is my RAM consumed??!


Hello Everyone

Please guide me to a solution since I'm having slow permormance which 'as I think' is caused of low memory.

I'm running Ubuntu 7.10 on DELL Inspiron 1100 Laptop with 512MB RAM (8M are used exclusively for video card).
I use Gnome, Compiz-Fusion, Emerald, 2 Panels, & 11 Desktops.
I've added the System Monitor applet to trace my hardware performance, the Memory appears almost used up! The indicator tells that:
54% in use by programs
38% in use as cache

When I opened the System Monitor & summed up the processes memory it appeared exactly 76.172MB.
If this memory is the 54% used this will mean that my memory is no more than 141MB instead of 512MB !!!!!

Where IS my memory going?? and what is that cache taking 38% of my 'supposed' memory??? Is it possible to clear that 'cache'??

And how can I reduce my RAM consumption?
Thanks in advance...
 
Old 09-13-2009, 09:04 PM   #2
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
Quote:
Originally Posted by Drycola View Post
Please guide me to a solution since I'm having slow permormance which 'as I think' is caused of low memory.
512MB isn't a lot of memory, so that might be why it's slow. But from what you have said, I suspect memory is not the main problem.

Quote:
The indicator tells that:
54% in use by programs
38% in use as cache
Which indicator is that? All the ones I can find tell you 54% of what total, rather than just 54%.

It is more important to look at how much swap space is in use and even that isn't a clear picture of memory pressure.

Quote:
When I opened the System Monitor & summed up the processes memory it appeared exactly 76.172MB.
Did you change the View setting from the default "My processes" to "All processes"?

Quote:
If this memory is the 54% used this will mean that my memory is no more than 141MB instead of 512MB !!!!!
Free or top or System Monitor or many other programs will tell you the correct memory total. There is no reason to try to compute it working backwards from a percentage reported somewhere combined with a list from somewhere else and probably representing something else.

Quote:
Where IS my memory going?? and what is that cache taking 38% of my 'supposed' memory??? Is it possible to clear that 'cache'??
The simple answer is that cache is a good thing and the fact that it is using 38% of ram does not mean the ram isn't available for other uses. You could clear the cache, but you shouldn't. Clearing cache would not help performance.
 
Old 09-13-2009, 09:05 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
I would doubt memory usage is your problem. Cache is allocated from "unused" memory - and is (generally) released when an application requires memory.

The way video is implemented on the 1100 is stupid - I am very surprised you even managed to get compiz to work at all. I never even attempted to install the effects software - I'd suggest you try running with that turned off and see how the machine performs.
 
Old 09-13-2009, 09:11 PM   #4
lutusp
Member
 
Registered: Sep 2009
Distribution: Fedora
Posts: 835

Rep: Reputation: 102Reputation: 102
Quote:
Originally Posted by Drycola View Post
Hello Everyone

Please guide me to a solution since I'm having slow permormance which 'as I think' is caused of low memory.

I'm running Ubuntu 7.10 on DELL Inspiron 1100 Laptop with 512MB RAM (8M are used exclusively for video card).
I use Gnome, Compiz-Fusion, Emerald, 2 Panels, & 11 Desktops.
I've added the System Monitor applet to trace my hardware performance, the Memory appears almost used up! The indicator tells that:
54% in use by programs
38% in use as cache

When I opened the System Monitor & summed up the processes memory it appeared exactly 76.172MB.
If this memory is the 54% used this will mean that my memory is no more than 141MB instead of 512MB !!!!!

Where IS my memory going?? and what is that cache taking 38% of my 'supposed' memory??? Is it possible to clear that 'cache'??

And how can I reduce my RAM consumption?
Thanks in advance...
Have you heard the saying "premature optimization is the root of all evil"? (Donald Knuth) The memory statistics don't mean what you think they do -- the system caches a lot of things in free memory just because it is available, like disk reads as just one example. Because prior disk and directory reads are in cache, they are available very quickly the next time a directory listing is needed. This is why systems with adequate RAM seem much faster than they should after they've been running for a few minutes.

Here's a typical result from running "free":

Code:
$ free -m
             total       used       free     shared    buffers     cached
Mem:          2011       1896        114          0        248       1061
-/+ buffers/cache:        586       1425
Swap:         2000         16       1983
I asked "free" to provide its results in megabytes. The result shows that I have 2 GB of memory, and at the moment, about half of it is assigned to cache. But the remaining memory amount of 114 megabytes really doesn't mean my system is about to expire in flames if I run a few more applications. What actually happens is the system intelligently shifts RAM away from cache to normal program and data storage as required.

Quote:
And how can I reduce my RAM consumption?
Run fewer applications, disable unused services, buy more RAM. But don't assume that the output of "free" necessarily means that your system isn't running as it should, or that applying remedies would necessarily speed up your system.
 
Old 09-13-2009, 09:52 PM   #5
Drycola
LQ Newbie
 
Registered: Aug 2009
Location: IRAQ
Distribution: Ubuntu
Posts: 20

Original Poster
Rep: Reputation: 0
Thank you ALL for your detailed & useful replies.
I've used 'free' and got:
Code:
$ free -m
             total       used       free     shared    buffers     cached
Mem:           495        440         55          0          6        167
-/+ buffers/cache:        265        229
Swap:          400         33        366
At this time I'm running Firefox (with 5 open tabs) and Console (in addition to the Gnome & Compiz). Does the RAM consumption seems acceptable here?? Does adding more RAM increase performance in my situation?? or it will be just a loss of time & $'s ???

I've thought of another possible cause for the 'slow' performance, I don't know if it is really possible or not, but I think it might be the Processor heat???
I hear the fan running fast with high noise, You know it is HOT here in IRAQ, but I'm wondering if this can cause the slow performance??

I really appreciate your answers. Thanks
 
Old 09-13-2009, 09:59 PM   #6
lutusp
Member
 
Registered: Sep 2009
Distribution: Fedora
Posts: 835

Rep: Reputation: 102Reputation: 102
Quote:
Originally Posted by Drycola View Post
Thank you ALL for your detailed & useful replies.
I've used 'free' and got:
Code:
$ free -m
             total       used       free     shared    buffers     cached
Mem:           495        440         55          0          6        167
-/+ buffers/cache:        265        229
Swap:          400         33        366
At this time I'm running Firefox (with 5 open tabs) and Console (in addition to the Gnome & Compiz). Does the RAM consumption seems acceptable here?? Does adding more RAM increase performance in my situation?? or it will be just a loss of time & $'s ???

I've thought of another possible cause for the 'slow' performance, I don't know if it is really possible or not, but I think it might be the Processor heat???
I hear the fan running fast with high noise, You know it is HOT here in IRAQ, but I'm wondering if this can cause the slow performance??

I really appreciate your answers. Thanks
The RAM consumption seems normal -- you will notice the percentages are roughly the same as on my system with 4x the amount of RAM.

But adding RAM will probably speed things up, and RAM isn't very expensive these days. On the other side, the system will run slightly hotter with more RAM.

Quote:
... it is HOT here in IRAQ, but I'm wondering if this can cause the slow performance??
The heat cannot by itself cause the system to slow down, unless the hard drive is on the verge of expiring in the heat (sometimes happens).

I want to say that I honor your service to your country. Thank you.
 
Old 09-13-2009, 10:25 PM   #7
Drycola
LQ Newbie
 
Registered: Aug 2009
Location: IRAQ
Distribution: Ubuntu
Posts: 20

Original Poster
Rep: Reputation: 0
Thanks a lot dear Lutusp for your reply.
Now you have assured me that my RAM is just OK, It seems that I'm demanding too much from this Old Heavy Laptop, farther that its ability...

Quote:
Originally Posted by lutusp View Post
I want to say that I honor your service to your country. Thank you.
I appreciate your encouragement for me, In fact, I have a whole issue about Linux & IRAQ, and need a lot of advice about it. I don't know if I should post it here as a reply or as an entirely new article?? If so, in which forum? the General Forum???
 
Old 09-14-2009, 08:47 AM   #8
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
Quote:
Originally Posted by Drycola View Post
Does adding more RAM increase performance in my situation?
In borderline cases like this, that is a hard question to answer. If no swap were being used and a significant fraction of ram were cache, we could say with moderate confidence that the performance increase from more ram would be tiny. If lots of swap were being used and the amount of cache were smaller, we could be pretty sure increasing ram would significantly improve performance. With your 33MB of swap use and a typical level of cache, we would need far more details to make any estimate of how much addition ram would help.

With just the available info, most experts would lean toward the guess that adding ram would not significantly improve performance.

? or it will be just a loss of time & $'s ???

Quote:
I think it might be the Processor heat???
I hear the fan running fast with high noise, You know it is HOT here in IRAQ, but I'm wondering if this can cause the slow performance??
I don't know. Many systems regulate the fan speed based on processor temperature. Most systems can regulate the processor speed and do regulate it based on system load. The software could regulate the processor speed even under high load based on processor temperature. I don't know if it does.

I believe the cpu MHz reported inside cat /proc/cpuinfo is usually the actual current (regulated) speed. On my Mepis system that goes down when the system is idle and up to the spec'ed max when the system is busy. What about your system? Does it vary at all? Does it go up to the spec'ed max when the system is loaded?
 
Old 09-14-2009, 09:55 AM   #9
Drycola
LQ Newbie
 
Registered: Aug 2009
Location: IRAQ
Distribution: Ubuntu
Posts: 20

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by johnsfine View Post
I believe the cpu MHz reported inside cat /proc/cpuinfo is usually the actual current (regulated) speed. On my Mepis system that goes down when the system is idle and up to the spec'ed max when the system is busy. What about your system? Does it vary at all? Does it go up to the spec'ed max when the system is loaded?
I took the CPU info during normal activity, no real programs running, only Firefox on Gnome with Compiz. Here are the results:
Code:
$ cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 15
model           : 2
model name      : Intel(R) Celeron(R) CPU 2.80GHz
stepping        : 9
cpu MHz         : 2790.998
cache size      : 128 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 2
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe up cid xtpr
bogomips        : 5587.12
clflush size    : 64
My processor is 2.8GHz, and CPU MHz appears as 2790MHz, does this mean that the processor is getting totally busy? or it means that it can function with maximum speed???
 
Old 09-14-2009, 10:15 AM   #10
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
Quote:
Originally Posted by Drycola View Post
8M are used exclusively for video card
Others have already told you that the ram is not your problem so I won't repeat the details here, there's "a lot" of free ram (compared with the total amount that your laptop has), and you are not using any significant amount of swap. So, as long as your applications don't start requiring more ram you are ok with your setup.

However, I am more concerned about your graphics chip. If you are only using 8mb or ram for your graphics memory I guess that your graphics chip is not in par with what you are asking from it. You should really ditch out compiz and desktop effects, and work with gnome/metacity without effects at all. You should see that everything works better.

Buying more ram will not help in any significant way unless you have moments in which your applications require more ram. Stay vigilant, but I wouldn't worry too much about the ram. Just try to be more conservative about the kind of eye-candy that you use, remember that candy is on the opposite side of performance. Simple as that.

Last edited by i92guboj; 09-14-2009 at 10:16 AM.
 
Old 09-14-2009, 10:24 AM   #11
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
Quote:
Originally Posted by Drycola View Post
My processor is 2.8GHz, and CPU MHz appears as 2790MHz, does this mean that the processor is getting totally busy? or it means that it can function with maximum speed???
I think it means you don't have the right software installed to cut CPU speed when the system is idle, which would improve battery life and probably have other benefits in CPU temperature and probably reduce fan noise.

Maybe it means your motherboard doesn't support software regulating the CPU speed.

Or maybe I misunderstood you and the CPU was busy when you did that. To be really sure, you would need to check with something like top to see that the CPU is mostly idle before checking /proc/cpuinfo.

I did a trivial google search and found this Ubuntu thread which discusses powernowd (one of several programs that can be used to reduce CPU speed when the system is idle). It also mentions at least one of the alternative programs
http://ubuntuforums.org/showthread.php?t=21370

It is a good idea to have one of those programs running if your hardware supports it. But check whether any such program is installed before installing any other. They (powernowd, cpufreqd, etc.) generally malfunction if more than one of them is installed and the automated installer has only partial understanding of the conflicts (so it might or might not correctly remove one when installing another).

But it looks like your CPU is running at full speed, so heat is not likely a reason for the performance problem.
 
Old 09-14-2009, 10:25 AM   #12
Drycola
LQ Newbie
 
Registered: Aug 2009
Location: IRAQ
Distribution: Ubuntu
Posts: 20

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by i92guboj View Post
If you are only using 8mb or ram for your graphics memory I guess that your graphics chip is not in par with what you are asking from it.
I've chose this 8MB from BIOS, where I had to choose between 1MB or 8MB for GPU memory (or something like that)
BUT, on WIN-doze, the Graphics memory appears as 64MB. I do not really understand what is this 64M and that 8M ! I don't know much about how video cards work, but I think that my card is capable of 3D graphics (it used to be on WIN-doze..
 
Old 09-14-2009, 10:31 AM   #13
Drycola
LQ Newbie
 
Registered: Aug 2009
Location: IRAQ
Distribution: Ubuntu
Posts: 20

Original Poster
Rep: Reputation: 0
Thanks for your answer JohnsFine...

Quote:
Originally Posted by johnsfine View Post
Maybe it means your motherboard doesn't support software regulating the CPU speed.
I think this is true, since I had no load when I took the cpuinfo, and it still appear as full frequency.
My laptop is an old one, and that might describe why the motherboard doesn't support CPU regulation.

Does CPU regulating software works on motherboards that doesn't support hardware CPU regulation?????
 
Old 09-14-2009, 10:48 AM   #14
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
Cpu throttling requires support on the side of the hardware, if your cpu doesn't support it then you won't be able to do anything from linux or any other OS to enable that. You can try to install cpufreq (or whatever it's called in ubuntu) if it's not already installed. Then this command might tell you something:

Code:
cpufreq-info
I don't know much about celerons so I am not sure, but your model seems modern enough to have some energy saving feature.
 
Old 09-14-2009, 10:52 AM   #15
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
Quote:
Originally Posted by Drycola View Post
I've chose this 8MB from BIOS, where I had to choose between 1MB or 8MB for GPU memory (or something like that)
BUT, on WIN-doze, the Graphics memory appears as 64MB. I do not really understand what is this 64M and that 8M ! I don't know much about how video cards work, but I think that my card is capable of 3D graphics (it used to be on WIN-doze..
I have no idea what that setting might be about, this command might tell you info about your graphics card, including the amount of ram it has.

Code:
lspci -v | grep -A20 -i vga
Dependign on how ubuntu is configured you might need to run this instead:

Code:
sudo lspci -v | grep -A20 -i vga
Still, some effects might not run too smooth on your card, even with 64 mb. It all depends on what effects do you enable and how do you configure them (and how intensively you use them). Just to be sure you can try disabling them and living for a day without effects, and preferably using another wm, like metacity which is the stock gnome wm (also without effects).
 
  


Reply

Tags
inspiron, memory, ram



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
All my 8 GB of RAM Consumed smuro Linux - Newbie 13 07-19-2009 06:13 AM
Are Quota Limit and Disk Size consumed different? Nakano Linux - Newbie 1 07-19-2009 03:08 AM
memory consumed by a process ZAMO Linux - General 1 02-19-2009 09:22 AM
how can i find space consumed by this user izrafel Linux - General 3 06-15-2007 04:21 AM
CPU consumed time with millisecond resolution. lofrbo Linux - General 4 12-20-2005 12:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:23 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