Memory Usage(Physical) in one Word? Suse Linux.

Experts,

I have been trying to figure out what is the total physical memory used from this output:
And what is the free memory available for the application or any programs.

The answer has to be in this format:

  1. Physical Memory Used= xx.xx%
  2. Physical Memry available= yy.yy%

Can any one answer this question please.,

DATA: (output of free command ) :
######
OS=Suse Linux 11.

             total       used       free     shared    buffers     cached
Mem:      12200000   12003044     196956          0         52     524220
-/+ buffers/cache:   11478772     721228
Swap:     20955132     802368   20152764

I figured this means the Memory Usage= used/total * 100 = 98.3%

  • Since The Usage (in sar) showing 98.45% it is high time to wake up and to be alert.
    Since this is closed to full capacity, and things can start breaking if not paid enough attention to the usage.

# from sar -r : What I am seeing is below:

           kbmemfree kbmemused  %memused kbbuffers  kbcached  kbcommit   %commit
05:24:01 PM    188908  12011092     98.45        52    494044  15664476     47.25
05:25:02 PM    186124  12013876     98.47        52    494524  15669836     47.26
05:26:01 PM    187284  12012716     98.46        52    496068  15664196     47.25
05:27:01 PM    180372  12019628     98.52        52    496712  15664384     47.25
Average:       186109  12013891     98.47       500   2123739  15654751     47.22

-So I am trying to ask the experts what is the opinion about it , and if one can answer in a simple answer to this question: (Descriptive answer is welcome but I also want answer to 1. & 2.
I have a feeling like this is not real usage, so checking with linux experts.,

  1. Physical Memory Used= xx.xx%
  2. Physical Memry available= yy.yy%

Thank you for your time...

Short answer is, "cached" counts as some more "free". unused = free + cache.

So don't panic when you see "0% free"! There have been Linux admins who have rebooted their servers daily to 'clean the cache' until they realized that cache counts as free.

The reason cache is counted separately is because cache is important. You want there to be plenty of cache. If you have so many things running that you have no room for cache, that's bad.

IMHO the Linux memory strategy is overdone.
A Linux box that does continuous I/O will fill all memory with cache data, and indeed becomes unresponsive (i.e. starting a new process is slow).
Other OS like HP-UX have a tunable percentage of memory that is used for caching.

Really? I think you need to back that up with something we can all look at.

I'm not saying there isn't a problem. But since you are putting up HP-UX as (implied) a system done "right"... I think you should help supply something that illustrates the problem you are seeing.

I agree with MIG that it'd be a useful feature. I have seen situations in Linux where a short-running program which does a lot of I/O turfs out all the 'good' cache with data that's not going to be needed again; the system takes a little bit to recover and get frequently-used things back in memory. This isn't a Linux problem, it's a problem with the LRU algorithm in general, 'recently used' is not always a good benchmark for which things to keep.

kctune | awk 'NR==1 || /^dbc/'

Tunable                       Value  Expression          Changes
dbc_max_pct                       5  5                   Immed
dbc_min_pct                       2  2                   Immed

The values are tuned down on this DB server.
AFAIR the defaults are dbc_min_pct=10 and dbc_max_pct=50
On an NFS server, you would increase the dbc_max_pct (to 90), in order to get near the Linux behavior that is ideal for NFS servers.