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 buffer activities displayed by the -b option are described in the table below. 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 36-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 |
The following abbreviated 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.8 Generic sun4u 09/07/99 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 |