Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
04-02-2009, 04:19 PM
|
#1
|
LQ Newbie
Registered: Feb 2009
Posts: 7
Rep:
|
Memory utilization - Centos 5.0
Hi all,
I have problem with memory utilization, is much to high. Server has 2GB RAM but the usage is around above 90% all the time.
According to command:
[root@server /]# free
total used free shared buffers cached
Mem: 2056232 1986764 69468 0 26768 1541936
-/+ buffers/cache: 418060 1638172
Swap: 4192956 136 4192820
[root@server /]#
More clear:
Total: 2,056,232 -> 2GB
Used: 1,986,764 -> 1.9GB
Free: 69,468 -> 69MB
But using tool System->Administration->"System Monitor"->Resources
User memory is only 408MB of 2GB which is 20.3%
So I don't know why I do have such a different between command "free" and monitoring tool?
And then how can I display which process which use the most memory?
Thanks for your time.
|
|
|
04-02-2009, 04:54 PM
|
#2
|
Senior Member
Registered: Jan 2006
Posts: 4,363
Rep: 
|
Ok, Linux handles memory differently than windows. Linux does its best to use all the resources it can all the time. So, when a program is not using ram, the system automatically reallocates that ram, usually to cache and buffers. Now when there is a program that needs more memory, linux again reallocates the ram to the program, usually from cach and buffers.
|
|
|
04-02-2009, 05:31 PM
|
#3
|
LQ Guru
Registered: Dec 2007
Distribution: Centos
Posts: 5,286
|
Quote:
Originally Posted by lazlow
Linux handles memory differently than windows.
|
Not a lot differently and not in any way that is relevant to this question so far.
If you want the relevant Windows/Linux difference here, it is in the tool for reporting memory usage rather than in the actual memory usage.
In Linux, free is giving useful information in a way that usually confuses beginners. Similar tools in Windows give less information and less useful information that is intended more to make the user comfortable than to inform.
Quote:
when a program is not using ram, the system automatically reallocates that ram, usually to cache and buffers. Now when there is a program that needs more memory, linux again reallocates the ram to the program, usually from cach and buffers.
|
Correct, so the idea that too much ram is being used, in this case, is just a misunderstanding of the information shown by free
Quote:
Originally Posted by Matosh
-/+ buffers/cache: 418060 1638172
|
If you want the beginner view of used/free memory, look at this line rather than the line above it. The first number is used memory and the second number is free memory.
Last edited by johnsfine; 04-02-2009 at 05:37 PM.
|
|
|
04-02-2009, 07:33 PM
|
#4
|
LQ Newbie
Registered: Feb 2009
Posts: 7
Original Poster
Rep:
|
Quote:
Originally Posted by johnsfine
If you want the beginner view of used/free memory, look at this line rather than the line above it. The first number is used memory and the second number is free memory.
|
So, if my server has 2GB RAM and Used is 418MB and Free is 1.6GB, right?
is that a real and reliable data?
|
|
|
04-02-2009, 09:31 PM
|
#5
|
LQ Guru
Registered: Dec 2007
Distribution: Centos
Posts: 5,286
|
Quote:
Originally Posted by Matosh
So, if my server has 2GB RAM and Used is 418MB and Free is 1.6GB, right?
is that a real and reliable data?
|
Yes, that free output does show about 0.4GB "used" and about 1.6GB "free.
The beginner view of anything is subject to qualifications and assumptions that you can't reasonably explain to a beginner.
If you need a simple measure of used vs. free physical ram, that line of the output from free is the best simple measure. It is real and reliable data for what it measures.
In fact it measures the amount of "used" memory excluding buffers/caching and the amount of "free" memory including buffers/caching.
|
|
|
All times are GMT -5. The time now is 01:52 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|