Operating System - Linux
1828402 Members
4180 Online
109977 Solutions
New Discussion

Re: Memory usage on RH Advance Server 2.1/3.0

 
Samuel Eno
New Member

Memory usage on RH Advance Server 2.1/3.0

I need help understanding the memory usage information that I'm getting from programs like sar, glance and top on Linux.

I'm running the AS 2.1 e.30+ and AS 3.

On some of the systems sar consistently shows average memory usage of 99%. Is there a tool that will display the right value? A while back I read that this was "a feature and not a bug" and there was a way to derive the value from something like 'free'. Does anyone have the formula for that?

thanks,
Sam.
8 REPLIES 8
Martin P.J. Zinser
Honored Contributor

Re: Memory usage on RH Advance Server 2.1/3.0

Hello Sam,

what is different between "some" of the systems. Are you maybe running a database that is using the "free" memory for caches?

Greetings, Martin
Stuart Browne
Honored Contributor

Re: Memory usage on RH Advance Server 2.1/3.0

To get a more accurate figure on how much memory is in use by applications, look at the values in "/proc/meminfo".

This will show how much is assigned, unassigned, how much is used as caches and buffers.

Reading the details in tye kernel-documentation in 'proc.txt' (/usr/share/doc/kernel-doc-*/filesystems/proc.txt) will give details as to what the different values mean.
One long-haired git at your service...
Stuart Browne
Honored Contributor

Re: Memory usage on RH Advance Server 2.1/3.0

Oops, my apologies, proc.txt doesn't detail what the values mean. I know I've read it somewhere, I just can't remember off the top of my head.
One long-haired git at your service...
Vitaly Karasik_1
Honored Contributor

Re: Memory usage on RH Advance Server 2.1/3.0

what about swap usage?

if you just see "no fee memory" in your linux - it's OK because kernel takes all available RAM for buffers/cache; see

http://home.earthlink.net/~jknapka/linux-mm/vmoutline.html
http://www.skynet.ie/~mel/projects/vm/

for details
Stuart Browne
Honored Contributor

Re: Memory usage on RH Advance Server 2.1/3.0

vm! That's it!

/usr/share/doc/kernel-doc-*/sysctl/vm.txt

Ha! Thanks for the mind-kick Vitaly!
One long-haired git at your service...
Samuel Eno
New Member

Re: Memory usage on RH Advance Server 2.1/3.0

Guys, I appreciate the responses but I'm still not sure how to find out how much memory is really in use.

Martin: All of the systems (running RH AS) behaves this way.

Here are the values I get from /proc/meminfo, 'free', 'top', 'vmstat':

Used: 6G
free: 25M
Shared: 0
Buffer: 255M
Cached: 5G

And the dual CPU system is completely idle.

Vitaly/Stuart: The VM docs are fine but none of them give me a way to extrapolate how much mem is actually in use from the numbers.
Stuart Browne
Honored Contributor

Re: Memory usage on RH Advance Server 2.1/3.0

The vm.txt does that.

It says take the used values, subtract the cache and buffers, and you're getting close to the amount actually used by the applications.
One long-haired git at your service...
Andy Beal
Frequent Advisor

Re: Memory usage on RH Advance Server 2.1/3.0

The answers are correct, it will consume all the memory. One potential problem I've seen with this is an over-active kswapd kernel process, as it keeps trying to manage memory right on the verge of running out. I learned through a very painful few months going back and forth with RedHat and Oracle that in large shared memory environments this isn't a good thing, there's too much memory pressure on the system. you can play with /proc/sys/vm/pagecache and /proc/sys/vm/buffercache to leave a bit more free memory and avoid this phenomenon.

Andy