LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 08-06-2010, 03:46 AM   #1
kenneho
Member
 
Registered: May 2003
Location: Oslo, Norway
Distribution: Ubuntu, Red Hat Enterprise Linux
Posts: 655

Rep: Reputation: 40
"free" shows far more memory usage than summing up application usage


Hi all.

I've come across a really strange issue with one of my RHEL servers. The "free" command shows that 7019 MB of memory are actually in use by my system, but when summing up the actual usage (or even virtual usage like the example below) it doesn't add up - the sum is far less than what is reported by "free":

Code:
[root@server1 ~]# free -m 
             total       used       free     shared    buffers     cached 
Mem:         12011       7946       4065          0          4         23 
-/+ buffers/cache:       7919       4092 
Swap:         2015          0       2015 
[root@server1 ~]# ps -eo vsz|awk '{sum+=$1}END{print sum}'|xargs -I{} expr "{}" / 1024 
2611
Does anyone know what may be causing this? I'm really puzzled by this.


- kenneho
 
Old 08-06-2010, 07:32 AM   #2
johnsfine
Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,051

Rep: Reputation: 1100Reputation: 1100Reputation: 1100Reputation: 1100Reputation: 1100Reputation: 1100Reputation: 1100Reputation: 1100Reputation: 1100
Is that a virtual machine or slice hosted by some service (as opposed to Linux running directly on the hardware)?

There are lots of reasons why used memory might be dominated by things other than ordinary process, but in a physical system it is very unlikely that cache and buffers would be so low while free is reasonable.

If this is some kind of slice or incompletely virtual system, then this kind of analysis of memory use is not the same as it would be for a whole system.
 
Old 08-06-2010, 07:56 AM   #3
kenneho
Member
 
Registered: May 2003
Location: Oslo, Norway
Distribution: Ubuntu, Red Hat Enterprise Linux
Posts: 655

Original Poster
Rep: Reputation: 40
Quote:
Originally Posted by johnsfine View Post
Is that a virtual machine or slice hosted by some service (as opposed to Linux running directly on the hardware)?

There are lots of reasons why used memory might be dominated by things other than ordinary process, but in a physical system it is very unlikely that cache and buffers would be so low while free is reasonable.

If this is some kind of slice or incompletely virtual system, then this kind of analysis of memory use is not the same as it would be for a whole system.
Thanks for your reply.

It is in fact a virtual server running on Vmware ESX. I did some digging, and found that the VM was set up with 12 GB of RAM, but had some memory resource limit set to half a GB or something. When checking "unlimited" on the memory resource, and then rebooting, everything was back to normal.

But I still don't understand why the linux box would say that it had used 8 GB of memory. When rebooting it (before the fix) it consumed the 8 GB in a matter of minutes just like a serious memory leak. I mean; if the linux box shares the same iron as other linux'es, I don't see why the linux itself would see an increase in used memory. Any thought on this?


- kenneho
 
  


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
Busybox "top" shows more than 100% mem usage for first 2-3 processes added together uast23 Linux - General 2 12-28-2011 08:33 AM
Where to find a "nice" Howto" for modem setup and use for IPS usage xerxesii Linux - Hardware 2 03-27-2007 12:21 AM
System "Freezing" - Memory usage BarryT Linux - Software 10 04-22-2006 11:59 AM
Firefox gets stuck... top shows 98-99% memory usage amitsharma_26 Linux - General 26 12-28-2005 03:01 PM
how to determine cpu usage, memory usage, I/O usage by a particular user logged on li rags2k Programming 4 08-21-2004 04:45 AM


All times are GMT -5. The time now is 02:25 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration