Veritas File System 5.1 SP1 Administrator"s Guide (5900-1499, April 2011)

Direct I/O versus synchronous I/O
Because direct 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 a direct I/O
request does not allocate storage or extend the file, the inode is not immediately
written.
Direct I/O CPU overhead
The CPU cost of direct I/O is about the same as a raw disk transfer. For sequential
I/O to very large files, using direct I/O with large transfer sizes can provide the
same speed as buffered I/O with much less CPU overhead.
If the file is being extended or storage is being allocated, direct I/O must write the
inode change before returning to the application. This eliminates some of the
performance advantages of direct I/O.
Discovered Direct I/O
Discovered Direct I/O is a file system tunable that is 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.
See Tuning I/O on page 52.
Discovered direct I/O requires a full feature license.
Unbuffered I/O
If the VX_UNBUFFERED advisory is set, I/O behavior is the same as direct I/O with
the VX_DIRECT advisory set, so the alignment constraints that apply to direct I/O
also apply to unbuffered I/O. For unbuffered I/O, however, if the file is being
extended, or storage is being allocated to the file, inode changes are not updated
synchronously before the write returns to the user. The VX_UNBUFFERED advisory
is maintained on a per-file-descriptor basis.
See Tuning I/O on page 52.
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
71Veritas File System I/O
Buffered and Direct I/O