cancel
Showing results for 
Search instead for 
Did you mean: 

OS Buffer Cache

Mohd Azahari
Advisor

OS Buffer Cache

Hi,

How do I find out the OS buffer Cache?
8 REPLIES
Sunny123_1
Esteemed Contributor

Re: OS Buffer Cache

Hi

You can use glance utility.


Regards
Sunny
R.K. #
Honored Contributor

Re: OS Buffer Cache

Hi Azahari,

You can also use:

# sar -b 2 5

Report buffer activity:

bread/s
Number of physical reads per second from the disk (or other block devices) to the buffer cache;

bwrit/s
Number of physical writes per second from the buffer cache to the disk (or other block device);

lread/s
Number of reads per second from buffer cache;

lwrit/s
Number of writes per second to buffer cache;

%rcache
Buffer cache hit ratio for read requests e.g., 1 - bread/lread;

%wcache
Buffer cache hit ratio for write requests e.g., 1 - bwrit/lwrit;

pread/s
Number of reads per second from character device using the physio() (raw I/O) mechanism;

pwrit/s
Number of writes per second to character device using the physio() (that is, raw I/O) mechanism; mechanism.

See man page for more info:
http://docs.hp.com/en/B3921-60631/sar.1M.html


Don't fix that what ain't broke
SoorajCleris
HPE Pro

Re: OS Buffer Cache

Hi Mohd,

After the 11.00 release there the Buffer cache is dynamic. This is defined by the kernal parameters ( example taken from 11.23).

# kctune |grep db
dbc_max_pct 50 Default Immed
dbc_min_pct 5 Default Immed

Minimum is 5% of your total memory and maximum is 50%. If you want to make it static, configure both parameter with same value.

Buffer cache usage can be monitored using the sar command

# sar -b 1 15

HP-UX rx260-17 B.11.23 U ia64 12/30/09

00:24:50 bread/s lread/s %rcache bwrit/s lwrit/s %wcache pread/s pwrit/s
00:24:51 0 49 100 1 1 0 0 0
00:24:52 0 1 100 3 1 0 0 0
00:24:53 0 930 100 1 79 99 0 0
00:24:54 0 1 100 1 1 0 0 0
00:24:55 0 1 100 2 1 0 0 0
00:24:56 0 2 100 5 2 0 0 0
00:24:57 0 5 100 1 5 80 0 0
00:24:58 0 19 100 3 9 67 0 0
00:24:59 0 3 100 3 3 0 0 0
00:25:00 0 13 100 2 3 33 0 0
00:25:01 0 87 100 18 19 5 0 0
00:25:02 0 278 100 2 343 99 0 0
00:25:03 0 16 100 1 32 97 0 0
00:25:04 0 71 100 3 7 57 0 0
00:25:05 0 5 100 0 3 100 0 0

Average 0 99 100 3 34 91 0 0

==============================================

Regards,
Sooraj

"UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity" - Dennis Ritchie
SoorajCleris
HPE Pro

Re: OS Buffer Cache

Hi ,

Remember that Glance will nt give a complete analysis.

It will tell you whats size of the memory which is used for buffer cache

Glance - memory report (m) - bottom side

Total VM : 795mb Sys Mem : 528mb User Mem: 460mb Phys Mem : 2.0gb
Active VM: 333mb Buf Cache: 280mb Free Mem: 768mb FileCache: na

Regards,
Sooraj

"UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity" - Dennis Ritchie
Mohd Azahari
Advisor

Re: OS Buffer Cache

excellent guys. thanx a lot.
Mohd Azahari
Advisor

Re: OS Buffer Cache

Hi,

Now my next question is:

my Sys Mem is very high: from glance


Total VM : 6.9gb Sys Mem : 1.7gb User Mem: 3.4gb Phys Mem : 8.0gb
Active VM: 6.5gb Buf Cache: 2.6gb Free Mem: 227mb FileCache: na
MemFS Blk Cnt: na MemFS Swp Cnt: na

How can I reduce it?

As for the Buf Cache, i can reduced it by changing dbx_min_pct and dbc_max_pct
Sunny123_1
Esteemed Contributor

Re: OS Buffer Cache

Hi


decrease system kernel parameter dbc_max_pct in 10 and it will consize the system memory usage.



Regards
Sunny
SoorajCleris
HPE Pro

Re: OS Buffer Cache

Hi,

If you are thinking you system memory usage is very high, take are of that.

What is your swap usage ?

Depending on environment reducing buffercache may reduce system performace.

Regards,
Sooraj
"UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity" - Dennis Ritchie