If the file system is being used with VxVM, it is advisable to let the VxFS I/O parameters be set to default values based on the volume geometry.
If the file system is being used with a hardware disk array or volume manager other than VxVM, try to align the parameters to match the geometry of the logical disk. With striping or RAID-5, it is common to set read_pref_io
to the stripe unit size and read_nstream
to the number of columns in the stripe. For striped arrays, use the same values for write_pref_io
and write_nstream
, but for RAID-5 arrays, set write_pref_io
to the full stripe size and write_nstream
to 1.
For an application to do efficient disk I/O, it should use the following formula to issue read requests:
Generally, any multiple or factor of read_nstream
multiplied by read_pref_io
should be a good size for performance. For writing, the same rule of thumb applies to the write_pref_io
and write_nstream
parameters. When tuning a file system, the best thing to do is try out the tuning parameters under a real life workload.
If an application is doing sequential I/O to large files, it should try to issue requests larger than the discovered_direct_iosz
. This causes the I/O requests to be performed as discovered direct I/O requests, which are unbuffered like direct I/O but do not require synchronous inode updates when extending the file. If the file is larger than can fit in the cache, using unbuffered I/O avoids removing useful data out of the cache and lessens CPU overhead.