<& xfsTemplate,top=>1,side=>1 &>

Mount Options: kio and kiocluster

In Linux, I/O is internally abstracted as a list of buffers; these buffers are of the size chosen at the time at which the file system was created (mkfs). In this traditional approach, pages of a single I/O operation which are contiguous on disk still need to be specified using multiple buffers. This requirement can be an unnecessary overhead in XFS which normally employs large extents (contiguous disk blocks) to represent files. The kio option internally abstracts contiguous I/O as a single entity using a relatively new feature in Linux, called kiobufs. With this approach the overhead of allocating and maintaining multiple buffers is minimized. The kio option can improve both read and write performance.

As a further optimization, XFS uses delayed allocation, whereby multiple writes are "clustered" before actual space is allocated on disk. With locality of writes (that is, writes to contiguous logical blocks of a file as, for example, in a cp operation), disk blocks can be allocated in fewer and larger-sized extents. This approach not only allows the writes to be performed with fewer seeks to different locations on disk, but also allows a subsequent sequential read (as in the cat operation) to be processed with fewer seeks. The kiocluster option uses kiobufs instead of simple Linux buffers to internally represent the I/O belonging to a cluster. Since clustering only applies to writes, the kiocluster option only affects write performance.

Specifying kio or kiocluster is optional. If neither is specified all I/O is internally performed using buffers. Also, the same file system can be mounted using different options at different times; this can be useful to study the performance of the system using a particular workload under the different options.

Finally, we have observed that kio option can improve performance in general, and the performance of large and sequential I/O (e.g., streaming). Specifying the kiocluster option improves streaming write performance. However, we have observed performance problems with non-sequential localized writes.

To specify that kiobufs be used for I/O instead of buffer_heads, use the kio option of the mount command:

Alternately, you can specify the kio option in the fstab file, as follows:

To specify that kiobufs be used for both I/O and write clustering, use the kiocluster option of the mount command:

Alternately, you can specify the kiocluster option in the fstab file, as follows: