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.
The following 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 touchstone 5.9 Generic sun4u 03/04/2003 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 50 0 0 02:00:00 0 0 100 0 0 45 0 0 03:00:00 0 0 100 0 0 72 0 0 04:00:00 0 0 100 0 0 43 0 0 05:00:00 0 0 100 0 0 42 0 0 06:00:00 0 0 100 0 0 48 0 0 07:00:00 0 0 100 0 0 42 0 0 08:00:00 0 0 100 0 0 48 0 0 08:20:01 0 0 100 0 0 42 0 0 08:40:00 0 0 100 0 0 48 0 0 09:00:00 0 0 100 0 0 43 0 0 09:20:01 0 2 99 0 2 83 0 0 09:40:01 0 0 98 0 0 61 0 0 10:00:02 0 1 99 0 0 62 0 0 Average 0 0 99 0 0 74 0 0 |