JFS Tuning and Performance

26
cache grows quickly as new buffers are needed. The buffer cache is slow to shrink, as memory
pressure must be present in order to shrink buffer cache.
Figure 13. HP-UX 11iv2 buffer cache tunables
The buffer cache should be configured large enough to contain the most frequently accessed data.
However, processes often read large files once (for example, during a file copy) causing more
frequently accessed pages to be flushed or invalidated from the buffer cache.
The advantage of buffer cache is that frequently referenced data can be accessed through memory
without requiring disk I/O. Also, data being read from disk or written to disk can be done
asynchronously.
The disadvantage of buffer cache is that data in the buffer cache may be lost during a system failure.
Also, all the buffers associated with the file system must be flushed to disk or invalidated when the file
system is synchronized or unmounted. A large buffer cache can cause delays during these operations.
If data needs to be accessed once without keeping the data in the cache, various options such as
using direct I/O, discovered direct I/O, or the VX_SETCACHE ioctl with the VX_NOREUSE option
may be used. For example, rather than using cp(1) to copy a large file, try using dd(1) instead using
a large block size as follows:
# dd if=srcfile of=destfile bs=1024k
On HP-UX 11i v2 and earlier, cp(1) reads and writes data using 64 KB logical I/O. Using dd, data
can be read and written using 256 KB I/Os or larger. The large I/O size will cause dd to engage the
Discovered Direct I/O feature of HP OnlineJFS and the data will be transferred using large direct I/O.
There are several advantages of using dd(1) over cp(1):
Transfer can be done using a larger I/O transfer size
Buffer cache is bypassed, thus leaving other more important data in the cache.
Data is written synchronously, instead of asynchronously, avoiding large buildup of dirty buffers
which can potentially cause large I/O queues or process that call sync()/fsync() to temporarily
hang.
Note
On HP-UX 11i v3, the cp(1) command was changed to perform 1024 KB
logical reads instead of 64 KB, which triggers discovered direct I/O similar
to the dd(1) command mentioned above.
dbc_min_pct
dbc_max_pct
Memory