Veritas File System 4.1 Administrator's Guide (HP-UX 11i v3, February 2007)
Application Interface
Cache Advisories
Chapter 462
Discovered Direct I/O
Discovered Direct I/O is a file system tunable you can set using the vxtunefs command. When the file
system gets an I/O request larger than the discovered_direct_iosz, it tries to use direct I/O on the
request. For large I/O sizes, Discovered Direct I/O can perform much better than buffered I/O.
Discovered Direct I/O behavior is similar to direct I/O and has the same alignment constraints, except writes
that allocate storage or extend the file size do not require writing the inode changes before returning to the
application.
For information on how to set the discovered_direct_iosz, see “I/O Tuning” on page 43.
Data Synchronous I/O
If the VX_DSYNC advisory is set, the user is requesting data synchronous I/O. In synchronous I/O, the data is
written, and the inode is written with updated times and (if necessary) an increased file size. In data
synchronous I/O, the data is transferred to disk synchronously before the write returns to the user. If the file
is not extended by the write, the times are updated in memory, and the call returns to the user. If the file is
extended by the operation, the inode is written before the write returns.
Like direct I/O, the data synchronous I/O feature can provide significant application performance gains.
Because data synchronous I/O maintains the same data integrity as synchronous I/O, it can be used in many
applications that currently use synchronous I/O. If the data synchronous I/O does not allocate storage or
extend the file, the inode is not immediately written. The data synchronous I/O does not have any alignment
constraints, so applications that find it difficult to meet the alignment constraints of direct I/O should use
data synchronous I/O.
If the file is being extended or storage is allocated, data synchronous I/O must write the inode change before
returning to the application. This case eliminates the performance advantage of data synchronous I/O.
The direct I/O and VX_DSYNC advisories are maintained on a per-file-descriptor basis.
Other Advisories
The VX_SEQ advisory indicates that the file is being accessed sequentially. When the file is being read, the
maximum read-ahead is always performed. When the file is written, instead of trying to determine whether
the I/O is sequential or random by examining the write offset, sequential I/O is assumed. The buffers for the
write are not immediately flushed. Instead, buffers are flushed some distance behind the current write point.
The VX_RANDOM advisory indicates that the file is being accessed randomly. For reads, this disables
read-ahead. For writes, this disables the flush-behind. The data is flushed at a rate based on memory
contention.
If VX_NOREUSE is set when doing sequential I/O, buffers are also freed when they are flushed to disk.The
VX_NOREUSE advisory is used as a modifier. If both VX_RANDOM and VX_NOREUSE are set, VxFS notifies
the operating system that the buffers are free and may be reclaimed. If VX_NOREUSE is set when doing