LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 04-02-2009, 05:19 PM   #1
Matosh
LQ Newbie
 
Registered: Feb 2009
Posts: 7

Rep: Reputation: 0
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.
 
Old 04-02-2009, 05:54 PM   #2
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,362

Rep: Reputation: 172Reputation: 172
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.
 
Old 04-02-2009, 06:31 PM   #3
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181
Quote:
Originally Posted by lazlow View Post
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 View Post
-/+ 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 06:37 PM.
 
Old 04-02-2009, 08:33 PM   #4
Matosh
LQ Newbie
 
Registered: Feb 2009
Posts: 7

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by johnsfine View Post
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?
 
Old 04-02-2009, 10:31 PM   #5
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181
Quote:
Originally Posted by Matosh View Post
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Detailed Memory Utilization manoj.linux Linux - Enterprise 1 05-06-2008 04:45 PM
Utilization of all IP's on my dedicated Server (CentOS 4) bilalinamdar Linux - Newbie 9 02-15-2007 12:05 PM
general memory utilization Tylerious Linux - General 5 09-01-2005 02:25 PM
High memory utilization dav7500 Linux - General 7 03-05-2004 06:07 PM
Memory Utilization Question toddclark Linux - General 1 11-04-2000 07:05 PM


All times are GMT -5. The time now is 07:04 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration