VERITAS File System 4.1 Administrator's Guide

Application Interface
Cache Advisories
Chapter 478
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 57.
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.