UNBUFFERED_IO <filename>
FairCom Server supports the use of unbuffered disk I/O operations on a per-file basis. Unbuffered I/O bypasses the file system cache and avoids double caching of data in the FairCom Server and the file system cache. The file name may include wildcard characters (see FairCom DB Standard Wildcards)
The UNBUFFERED_IO configuration option enables unbuffered I/O for the specified file. When the file is opened, the sector size of the disk on which the file resides is determined and it stores that sector size in the new file control block member.
Windows enforces the following restrictions for I/O when using unbuffered I/O:
For files that use unbuffered I/O, c-tree's file I/O function checks that these requirements are met. If not, logic is in place that makes the necessary adjustment by allocating a temporary buffer that is used in the I/O operation.
When a file is configured to use unbuffered I/O, the sector size of the disk on which the file is stored is checked and if it exceeds the server's page size. If so, the following message is logged to CTSTATUS.FCS and unbuffered I/O is not used on that file:
If an existing file is being opened:
mbopen: File <filename> disk sector size (<disk_sector_size>) exceeds page size (<page_size>)
If a new file is being created:
mbcratx: File <filename> disk sector size (<disk_sector_size>) exceeds page size (<page_size>)
Note: Unbuffered I/O is not available for encrypted or segmented files and is ignored for those file types.
UNBUFFERED_IO completely avoids the file system cache. Compare to COMPATIBILITY TDATA_WRITETHRU, which uses the file system cache and then to disk before returning.
OS Support
This option is supported on the Windows operating system.
In V11 and later, support for direct I/O has been enabled on Linux systems. A value of 512-bytes is used for size and alignment for direct I/O.
This feature supports both c-tree data and index files, as well as transaction logs. Configuration options are provided for both.
Note: This feature requires Linux kernel version 2.6 or later, FairCom Server logs an error message to CTSTATUS.FCS if these options are used on pre-2.6 Linux kernel systems. The error messages are:
The UNBUFFERED_IO option requires Linux kernel version 2.6 or later
The UNBUFFERED_LOG_IO option requires Linux kernel version 2.6 or later
See Also