JFS Tuning and Performance

9
Figure 4. Flush behind
As data is written to a VxFS file, VxFS will perform “flush behind” on the file. In other words, it will
issue asynchronous I/O to flush the buffer from the buffer cache to disk. The flush behind amount is
calculated by multiplying the write_pref_io by the write_nstream file system tunables. The default flush
behind amount is 64 KB.
Flush behind on HP-UX 11i v3
By default, flush behind is disabled on HP-UX 11i v3. The advantage of disabling flush behind is
improved performance for applications that perform rewrites to the same data blocks. If flush behind
is enabled, the initial write may be in progress, causing the 2
nd
write to stall as the page being
modified has an I/O already in progress.
However, the disadvantage of disabling flush behind is that more dirty pages in the Unified File
Cache accumulate before getting flushed by vhand, ksyncher, or vxfsd.
Flush behind can be enabled on HP-UX 11i v3 by changing the fcache_fb_policy(5) value using
kctune(1M). The default value of fcache_fb_policy is 0, which disables flush behind. If
fcache_fb_policy is set to 1, a special kernel daemon, fb_daemon, is responsible for flushing the dirty
pages from the file cache. If fcache_fb_policy is set to 2, then the process that is writing the data will
initiate the flush behind. Setting fcache_fb_policy to 2 is similar to the 11i v2 behavior.
Note that write_pref_io and write_nstream tunable have no effect on flush behind if fcache_fb_policy
is set to 0. However, these tunables may still impact read flush behind discussed later in this paper.
Note
Flush behind is disabled by default on HP-UX 11i v3. To enable flush
behind, use kctune(1M) to set the fcache_fb_policy tunable to 1 or 2.
I/O throttling
Often, applications may write to the buffer/file cache faster than VxFS and the I/O subsystem can
flush the buffers. Flushing too many buffers/pages can cause huge disk I/O queues, which could
impact other critical I/O to the devices. To prevent too many buffers/pages from being flushed
simultaneously for a single file, 2 types of I/O throttling are provided - flush throttling and write
throttling.
64K
64K
64K
64K
64K
Sequential write
flush behind