We have DELL R900 server with 128GB RAM (CENTOS 5.5)in it. This server only have one application running and few people use it. Every week I ata least get one or two messages from monitor tool mail to me say: Message=Memory Utilization is 92.02%, crossed warning (80) or critical (90) threshold. Since server have 128 GB RAM and only 1 application. I really don't belive that. Does there has some way can check memory utilitation ? Thanks.
On 2/2/11 1:58 PM, mcclnx mcc wrote:> We have DELL R900 server with 128GB RAM (CENTOS 5.5)in it. This server only have one application running and few people use it. > > Every week I ata least get one or two messages from monitor tool mail to me say: > > Message=Memory Utilization is 92.02%, crossed warning (80) or critical (90) threshold. > > Since server have 128 GB RAM and only 1 application. I really don't belive that. Does there has some way can check memory utilitation ? >What is the output of the command "free"? ~Sean
on 2/2/2011 1:58 PM mcclnx mcc spake the following:> We have DELL R900 server with 128GB RAM (CENTOS 5.5)in it. This server only have one application running and few people use it. > > Every week I ata least get one or two messages from monitor tool mail to me say: > > Message=Memory Utilization is 92.02%, crossed warning (80) or critical (90) threshold. > > Since server have 128 GB RAM and only 1 application. I really don't belive that. Does there has some way can check memory utilitation ? > > Thanks.Linux has a habit of using memory to store buffers and speed disk re-accesses. As soon as an application needs that memory, it will be flushed if dirty and released. Memory unused is memory not needed.
On Thu, Feb 03, 2011 at 05:58:19AM +0800, mcclnx mcc wrote:> We have DELL R900 server with 128GB RAM (CENTOS 5.5)in it. This server only have one application running and few people use it. > > Every week I ata least get one or two messages from monitor tool mail to me say: > > Message=Memory Utilization is 92.02%, crossed warning (80) or critical (90) threshold.It sounds like your monitor tool is probably misconfigured and is looking at "free memory", which is a very low value 'cos unused memory is used as disk cache. eg % free -m total used free shared buffers cached Mem: 3987 3551 435 0 330 2987 -/+ buffers/cache: 233 3753 Swap: 2047 0 2047 This machine has 435M free, out of almost 4G. Except not really; it's got 3753M available for programs to use and is only using 233M of memory for "real" stuff! -- rgds Stephen
on 05:58 Thu 03 Feb, mcclnx mcc (mcclnx at yahoo.com.tw) wrote:> We have DELL R900 server with 128GB RAM (CENTOS 5.5)in it. This > server only have one application running and few people use it. > > Every week I ata least get one or two messages from monitor tool mail > to me say: > > Message=Memory Utilization is 92.02%, crossed warning (80) or critical > (90) threshold. > > Since server have 128 GB RAM and only 1 application. I really don't > belive that. Does there has some way can check memory utilitation ?Make sure your tool is reporting utilization less cache. As others have noted, the "-/+ buffers/cache" line in "free" output is what you're looking for. http://www.linuxatemyram.com/ If you've got sar (sysstat) installed and activated (read the manpage and /usr/share/doc/sysstat* materials if not), numerous system resource usages are logged every ten minutes. For memory usage: 'sar -r': 12:00:01 AM kbmemfree kbmemused %memused kbbuffers kbcached kbswpfree kbswpused %swpused kbswpcad 12:10:01 AM 45877732 3573788 7.23 208792 1948316 2097144 0 0.00 0 12:20:01 AM 45875572 3575948 7.23 208792 1948336 2097144 0 0.00 0 12:30:01 AM 45877120 3574400 7.23 208796 1948352 2097144 0 0.00 0 12:40:01 AM 45878352 3573168 7.23 208796 1948368 2097144 0 0.00 0 12:50:01 AM 45876080 3575440 7.23 208800 1948384 2097144 0 0.00 0 01:00:01 AM 45877244 3574276 7.23 208800 1948408 2097144 0 0.00 0 There are tools (NOT currently in CentOS) to graph/visualize these outputs as well. If you want per-process accounting, you can get that as well, but it'll cost you some performance overhead and a lot of set-up. -- Dr. Ed Morbius Chief Scientist Krell Power Systems Unlimited
On 03/02/11 10:58, mcclnx mcc wrote:> We have DELL R900 server with 128GB RAM (CENTOS 5.5)in it. This server only have one application running and few people use it. > > Every week I ata least get one or two messages from monitor tool mail to me say: > > Message=Memory Utilization is 92.02%, crossed warning (80) or critical (90) threshold.As previously mentioned, Linux operates on a "memory full" model, so caches and buffers need to accounted for. Is this monitor tool getting its data via SNMP? If so, you should be able to get the real amount of memory available using the formula memAvailReal + memBuffer + memCache (all of these can be found under UCD-SNMP-MIB::memory if you are using the NetSNMP agent.) $ snmpget -c public localhost UCD-SNMP-MIB::memCached.0 UCD-SNMP-MIB::memCached.0 = INTEGER: 169280 kB $ snmpget -c public localhost UCD-SNMP-MIB::memBuffer.0 UCD-SNMP-MIB::memBuffer.0 = INTEGER: 123400 kB $ snmpget -c public localhost UCD-SNMP-MIB::memAvailReal.0 UCD-SNMP-MIB::memAvailReal.0 = INTEGER: 26904 kB $ free -tk total used free shared buffers cached Mem: 514512 487244 27268 0 123444 169344 -/+ buffers/cache: 194456 320056 Swap: 979956 676 979280 Total: 1494468 487920 1006548 Brief check: 26904 + 123400 + 169280 == 319584, which is near enough to 320056 (given that I ran the commands above with a bit of a pause in between) However, as a practical aside, looking at the "amount of memory used" is not particularly useful for determining if a host has too little. If that is what is wanted, it would be better to monitor the number of pages swapped in/out. (ie. what the 'vmstat' tool reports). If monitoring using SNMP, and the NetSNMP agent is being used, you can get this in the UCD-SNMP-MIB::ssSwapIn and ssSwapOut variables, which report amount of memory swapped in/out in the last minute (in SNMP terms, this is a gauge), or ssRawSwapIn and ssRawSwapOut if you want pages instead (which is a counter, and thus more useful). Hope it helps, Cameron
On Wed, Feb 2, 2011 at 4:58 PM, mcclnx mcc <mcclnx at yahoo.com.tw> wrote:> We have DELL R900 server with 128GB RAM (CENTOS 5.5)in it. ?This server only have one application running and few people use it. > > Every week I ata least get one or two messages from monitor tool mail to me say: > > Message=Memory Utilization is 92.02%, crossed warning (80) or critical (90) threshold. > > Since server have 128 GB RAM and only 1 application. ?I really don't belive that. ?Does there has some way can check memory utilitation ? >What kernel are you using? Is your app 64-bit?
On 02/02/11 1:58 PM, mcclnx mcc wrote:> Since server have 128 GB RAM and only 1 application. I really don't belive that. Does there has some way can check memory utilitation ?while your app is running, $ top as everyone has said, remember to add the 'cached' and 'buffered' to the 'free' to find out whats actually potentially available.