System Administration Guide: Advanced Administration

How to Check Buffer Activity (sar -b)

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
00:00:00 bread/s lread/s %rcache bwrit/s lwrit/s %wcache pread/s pwrit/s
01:00:00       0       0     100       0       0      55       0       0

The following table describes the buffer activities that are displayed by the -b option.

Table 24–8 Output From the sar -b Command

Field Name 

Description 

bread/s

Average number of reads per second that are 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 that are found in the buffer cache (100% minus the ratio of bread/s to lread/s)

bwrit/s

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

lwrit/s

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

%wcache

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

pread/s

Average number of physical reads, per second that use character device interfaces 

pwrit/s

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

The most important entries are the cache hit ratios %rcache and %wcache, which measure the effectiveness of system buffering. If %rcache falls below 90 percent, or if %wcache falls below 65 percent, it might be possible to improve performance by increasing the buffer space.

Example—Checking Buffer Activity

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


$ sar -b
SunOS venus 5.9 Generic sun4u    06/24/2001

00:00:00 bread/s lread/s %rcache bwrit/s lwrit/s %wcache pread/s pwrit/s
01:00:00       0       0     100       0       0      55       0       0
02:00:02       0       0     100       0       0      55       0       0
03:00:00       0       0     100       0       0      72       0       0
04:00:00       0       0     100       0       0      56       0       0
05:00:01       0       0     100       0       0      55       0       0
06:00:00       0       0     100       0       0      55       0       0

Average        0       0      94       0       0      64       0       0