System Administration Guide: Advanced Administration

ProcedureHow to Check Buffer Activity (sar -b)

  1. Display buffer activity statistics with the sar -b command.

    The buffer is used to cache metadata. Metadata 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

Example 13–5 Checking Buffer Activity (sar -b)

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


$ sar -b

SunOS balmyday 5.10 s10_51 sun4u    03/18/2004

00:00:04 bread/s lread/s %rcache bwrit/s lwrit/s %wcache pread/s pwrit/s
01:00:00       0       0     100       0       0      94       0       0
02:00:01       0       0     100       0       0      94       0       0
03:00:00       0       0     100       0       0      92       0       0
04:00:00       0       1     100       0       1      94       0       0
05:00:00       0       0     100       0       0      93       0       0
06:00:00       0       0     100       0       0      93       0       0
07:00:00       0       0     100       0       0      93       0       0
08:00:00       0       0     100       0       0      93       0       0
08:20:00       0       1     100       0       1      94       0       0
08:40:01       0       1     100       0       1      93       0       0
09:00:00       0       1     100       0       1      93       0       0
09:20:00       0       1     100       0       1      93       0       0
09:40:00       0       2     100       0       1      89       0       0
10:00:00       0       9     100       0       5      92       0       0
10:20:00       0       0     100       0       0      68       0       0
10:40:00       0       1      98       0       1      70       0       0
11:00:00       0       1     100       0       1      75       0       0

Average        0       1     100       0       1      91       0       0

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

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. These entries 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.