JFS Tuning and Performance

30
VxFS ioctl() options
Cache advisories
While the mount options allow you to change the cache advisories on a per-file system basis, the
VX_SETCACHE ioctl() allows an application to change the cache advisory on a per-file basis. The
following options are available with the VX_SETCACHE ioctl:
VX_RANDOM - Treat read as random I/O and do not perform read ahead
VX_SEQ - Treat read as sequential and perform maximum amount of read ahead
VX_DIRECT - Bypass the buffer cache. All I/O to the file is synchronous. The application buffer must
be aligned on a word (4 byte) address, and the I/O must begin on a block (1024 KB) boundary.
VX_NOREUSE - Invalidate buffer immediately after use. This option is useful for data that is not
likely to be reused.
VX_DSYNC - Data is written synchronously, but the file‟s timestamps in the inode are not flushed to
disk. This option is similar to using the O_DSYNC flag when opening the file.
VX_UNBUFFERED - Same behavior as VX_DIRECT, but updating the file size in the inode is done
asynchronously.
VX_CONCURRENT - Enables concurrent I/O on the specified file.
See the manpage vxfsio(7) for more information. HP OnLineJFS product is required to us the
VX_SETCACHE ioctl().
Allocation policies
The VX_SETEXT ioctl() passes 3 parameters: a fixed extent size to use, the amount of space to reserve
for the file, and an allocation flag defined below.
VX_NOEXTEND - write will fail if an attempt is made to extend the file past the current reservation
VX_TRIM - trim the reservation when the last close of the file is performed
VX_CONTIGUOUS - the reservation must be allocated in a single extent
VX_ALIGN - all extents must be aligned on an extent-sized boundary
VX_NORESERVE - reserve space, but do not record reservation space in the inode. If the file is
closed or the system fails, the reservation is lost.
VX_CHGSIZE - update the file size in the inode to reflect the reservation amount. This allocation
does not initialize the data and reads from the uninitialized portion of the file will return unknown
contents. Root permission is required.
VX_GROWFILE - update the file size in the inode to reflect the reservation amount. Subsequent
reads from the uninitialized portion of the file will return zeros. This option creates Zero Fill On
Demand (ZFOD) extents. Writing to ZFOD extents negates the benefit of concurrent I/O.
Reserving file space insures that you do not run out of space before you are done writing to the file.
The overhead of allocating extents is done up front. Using a fixed extent size can also reduce
fragmentation.
The setext(1M) command can also be used to set the extent allocation and reservation policies for a
file.
See the manpage vxfsio(7) and setext(1M) for more information. HP OnLineJFS product is required to
us the VX_SETEXT ioctl().