JFS Tuning and Performance

8
example, two threads can be reading from the same file sequentially and both threads can benefit
from the configured read ahead size.
Figure 3. Enhanced read ahead
Enhanced read ahead can be set on a per file system basis by setting the read_ahead tunable to 2
with vxtunefs(1M).
Read ahead on 11i v3
With the introduction of the Unified File Cache (UFC) on HP-UX 11i v3, significant changes were
needed for VxFS. As a result, a defect was introduced which caused poor VxFS read ahead
performance. The problems are fixed in the following patches according to the VxFS version:
PHKL_40018 - 11.31 vxfs4.1 cumulative patch
PHKL_41071 - 11.31 VRTS 5.0 MP1 VRTSvxfs Kernel Patch
PHKL_41074 - 11.31 VRTS 5.0.1 GARP1 VRTSvxfs Kernel Patch
These patches are critical to VxFS read ahead performance on 11i v3.
Another caveat with VxFS 4.1 and later occurs when the size of the read() is larger than the
read_pref_io value. A large cached read can result in a read ahead size that is insufficient for the
read. To avoid this situation, the read_pref_io value should be configured to be greater than or equal
to the application read size.
For example, if the application is doing 128 KB read() system calls, then the application can
experience performance issues with the default read_pref_io value of 64 KB, as the VxFS would only
read ahead 64 KB, leaving the remaining 64 KB that would have to be read in synchronously.
Note
On HP-UX 11i v3, the read_pref_io value should be set to the size of the
largest logical read size for a process doing sequential I/O through cache.
The write_pref_io value should be configured to be greater than or equal to the read_pref_io value
due to a new feature on 11i v3 called
read flush behind
, which will be discussed later.
Flush behind
During normal asynchronous write operations, the data is written to buffers in the buffer cache, or
memory pages in the file cache. The buffers/pages are marked “dirty” and control returns to the
application. Later, the dirty buffers/pages must be flushed from the cache to disk.
There are 2 ways for dirty buffers/pages to be flushed to disk. One way is through a “sync”, either
by a sync() or fsync() system call, or by the syncer daemon, or by one of the vxfsd daemon threads.
The second method is known as “flush behind” and is initiated by the application performing the
writes.
64K
64K
64K
128K
128K
Patterned Read