19.4 Tune Block Buffer Caches on UNIX

Most of the UNIX operating systems that ClearCase LT supports have a dynamic block buffer cache. As much main memory as possible is used to cache blocks of data files that have been updated by user processes. Periodically, the block buffer cache is flushed to disk.

We recommend that the size of a ClearCase LT server's block buffer cache average roughly 50% of the total size of all VOB database directories (vob-stg-dir/db) on the server. On most UNIX operating systems, the cache size increases when you add more main memory to the host.

If there is a substantial amount of non-ClearCase activity or ClearCase client activity on the ClearCase LT server, it will need even more main memory to assure good VOB database performance.

Block Buffer Cache Statistics

The standard UNIX SystemV sar(1M) utility reports block buffer cache activity. For example, this command reports activity over a 5-minute period, with a cumulative sample taken every 60 seconds:

sar -b 60 5
12:14:22 bread/s lread/s %rcache bwrit/s lwrit/s %wcache pread/s pwrit/s
12:15:22 0 1 100 1 1 0 0 0
12:16:23 1 1 -60 2 2 0 0 0
12:17:24 0 4 100 4 17 77 0 0
12:18:25 0 6 100 3 145 98 0 0
12:19:25 17 91 81 28 335 92 0 0

12:19:25 bread/s lread/s %rcache bwrit/s lwrit/s %wcache pread/s pwrit/s
Average 4 21 83 8 100 92 0 0

If your block buffer caches are sized correctly, cache reads are in the 90% to 95% range and cache writes are 75% or above.

Flushing the Block Buffer Cache

Interactive performance suffers considerably when the block buffer cache is flushed to disk. Most UNIX systems provide no user-level control over the frequency of flushing; HP-UX does, through the syncer(1M) utility. The larger the block buffer cache, the less frequently it should be flushed.