Operating System - Linux
1748127 Members
3664 Online
108758 Solutions
New Discussion юеВ

Discrepany between on Free Mem beteen HP OV Glance and sar/free/vmstat

 
Alzhy
Honored Contributor

Discrepany between on Free Mem beteen HP OV Glance and sar/free/vmstat

We've just standardized on continuing with HP OVPA/Glance on our Linux ecosystems. We're using Glance 5.0 on our RHEL 5.4/5.5 ecosystems.

Glance reports Memory as:

Phys Mem: 126.0gb Avail Mem: 126.0gb Free Mem: 105.5gb Buf Cache: 567mb
File Cache: 104.8gb

Linux free util (and sar/vmstat too) reports:

# free
total used free shared buffers cached
Mem: 132101536 131329616 771920 0 580552 109868420
-/+ buffers/cache: 20880644 111220892
Swap: 10485752 5974628 4511124

Glance reports 16% memory used but "free" and the otehr Linux natives report close to full memory utilisation.

I am stumped.

Any ideas?

TIA.
Hakuna Matata.
3 REPLIES 3
Steven E. Protter
Exalted Contributor

Re: Discrepany between on Free Mem beteen HP OV Glance and sar/free/vmstat

Shalom,

The discrepancy appears to be related to the buffer cache.

Possible causes:

1) Different report times. Unlike early HP-UX the Linux kernel can move memory in and out of cache very quickly.
2) Different reporting calculation.

Linux pretty much dumps all memory not in use into buffer cache. It gets pulled out of buffer cache when a process needs/requests it. I am not aware of any dual classification of buffer cache, far as I know there is one big pool.

Key phrase: "used but free"? Used as buffer cache but free? That terminology kind of baffles me.

I suspect glance is misreporting the situation.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Steven E. Protter
Exalted Contributor

Re: Discrepany between on Free Mem beteen HP OV Glance and sar/free/vmstat

Shalom again,

I wrote a script that tried to show true utilization.

#!/bin/bash

memuse=$(ps -e -o pid,rss,vsz,args --sort -rss | awk '{total=total+$2};END { pr
intf "%6.3f\n",total/1024/1024 }')
shareuse=$(ipcs | awk '{total=total+$5};END {printf "%6.3f\n",total/1024/1024/10
24 }')

pmem=$(free | grep Mem | awk '{ printf "%6.3f\n",$2/1024/1024 }')

pused=$(echo $memuse $pmem | awk ' { printf "%2.0f\n",$1/$2*100 }')
echo "Memory Physical GB: ${pmem}"
echo "Memory in use GB: ${memuse}"
echo "Shared in use GB: ${shareuse}"
echo "Memory cap used %%: ${pused}%"


SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Alzhy
Honored Contributor

Re: Discrepany between on Free Mem beteen HP OV Glance and sar/free/vmstat

I've used all those summation tricks and they jive.

Notice how "free" reports Physmem though --- it says free is 7.7gb but cached is 109gb.

GLance reports free however as 126GB but reports FileCache as 104.8GB.

So if most other 3rd party tools rely on free/sar/vmstat - wouldnt that skew alerts? Glance does seem to ignire File Cache in its report.

Hakuna Matata.