System Administration Guide

How to Check Buffer Activity (sar)

Display buffer activity statistics with the sar -b command.

The buffer is used to cache metadata, which includes inodes, cylinder group blocks, and indirect blocks.


$ sar -b
SunOS venus 5.6 Generic sun4m    08/20/96
0:0:03 bread/s lread/s %rcache bwrit/s lwrit/s %wcache pread/s pwrit/s
1:0:02     0       0     100       0       0      57       0   0

The buffer activities displayed by the -b option are described in Table 64-8. The most important entries are the cache hit ratios %rcache and %wcache, which measure the effectiveness of system buffering. If %rcache falls below 90, or if %wcache falls below 65, it may be possible to improve performance by increasing the buffer space.

Table 64-8 Output from the sar -b Command

Field Name 

Description 

bread/s

Average number of reads per second submitted to the buffer cache from the disk 

lread/s

Average number of logical reads per second from the buffer cache 

%rcache

Fraction of logical reads found in the buffer cache (100% minus the ratio of bread/s to lread/s)

bwrit/s

Average number of physical blocks (512 blocks) written from the buffer cache to disk, per second 

lwrite/s

Average number of logical writes to the buffer cache, per second 

%wcache

Fraction of logical writes found in the buffer cache(100% minus the ratio of bwrit/s to lwrit/s)

pread/s

Average number of physical reads, per second, using character device interfaces 

pwrit/s

Average number of physical write requests, per second, using character device interfaces 

Example--Checking Buffer Activity

The following example of sar -b output shows that the %rcache and %wcache buffers are not causing any slowdowns, because all the data is within acceptable limits.


$ sar -b
SunOS venus 5.6 Generic sun4m    08/20/96
14:28:12 bread/s lread/s %rcache bwrit/s lwrit/s %wcache pread/s pwrit/s
14:29:12       0      14     100       6      17      67       0       0
14:30:12       0      12      99       6      16      65       0       0
14:31:12       0      12     100       6      16      65       0       0
 
Average        0      12     100       6      16      66       0       0