JFS Tuning and Performance

11
The read flush behind feature has the advantage of preventing a read of a large file (such as a
backup, file copy, gzip, etc) from consuming large amounts of file cache. However, the disadvantage
of read flush behind is that a file may not be able to reside entirely in cache. For example, if the file
cache is 6 GB in size and a 100 MB file is read sequentially, the file will likely not reside entirely in
cache. If the file is re-read multiple times, the data would need to be read from disk instead of the
reads being satisfied from the file cache.
The read flush behind feature cannot be disabled directly. However, it can be tuned indirectly by
setting the VxFS flush behind size using write_pref_io and write_nstream. For example, increasing
write_pref_io to 200 MB would allow the 100 MB file to be read into cache in its entirety. Flush
behind would not be impacted if fcache_fb_policy is set to 0 (default), however, flush behind can be
impacted if fcache_fb_policy is set to 1 or 2.
The read flush behind can also impact VxFS read ahead if the VxFS read ahead size is greater than
the write flush behind size. For best read ahead performance, the write_pref_io and write_nstream
values should be greater than or equal to read_pref_io and read_nstream values.
Note
For best read ahead performance, the write_pref_io and write_nstream
values should be greater than or equal to read_pref_io and read_nstream
values.
Buffer sizes on HP-UX 11i v2 and earlier
On HP-UX 11i v2 and earlier, cached I/O is performed through the HP-UX buffer cache. The
maximum size of each buffer in the cache is determined by the file system tunable max_buf_data_size
(default 8k). The only other value possible is 64k. For reads and writes larger than
max_buf_data_size and when performing read ahead, VxFS will chain the buffers together when
sending them to the Volume Management subsystem. The Volume Management subsystem holds the
buffers until VxFS sends the last buffer in the chain, then it attempts to merge the buffers together in
order to perform larger and fewer physical I/Os.
Figure 7. Buffer merging
The maximum chain size that the operating system can use is 64 KB. Merged buffers cannot cross a
“chain boundary”, which is 64 KB. This means that if the series of buffers to be merged crosses a 64
KB boundary, then the merging will be split into a maximum of 2 buffers, each less than 64 KB in
size.
If your application performs writes to a file or performs random reads, do not increase
max_buf_data_size to 64k unless the size of the read or write is 64k or greater. Smaller writes cause
the data to be read into the buffer synchronously first, then the modified portion of the data will be
updated in the buffer cache, then the buffer will be flushed asynchronously. The synchronous read of
the data will drastically reduce performance if the buffer is not already in the cache. For random
reads, VxFS will attempt to read an entire buffer, causing more data to be read than necessary.
64K
8K
more
8K
more
8K
more
8K
more
8K
8K
more
8K
more
8K
more