Product Documentation

c-treeACE V10.0 Update Guide

Previous Topic

Next Topic

Improved Performance Using Unbuffered I/O on Windows Systems

When working with very large cache sizes, it was found that the Windows file system cache could grow to a level that impacted the cache memory usage of the c-treeACE process. On Windows systems, c-treeACE now 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 within the server process and the file system cache.

The c-treeACE configuration option UNBUFFERED_IO enables unbuffered I/O for the specified file. When the file is opened, additional logic determines the sector size of the disk on which the file resides and stores that information in the new file control block member dscsiz.

Windows enforces the following restrictions for I/O when using unbuffered I/O:

  1. The file offset for the I/O operation must be a multiple of the disk sector size.
  2. The amount of data to be read or written must be a multiple of the disk sector size.
  3. The address of the buffer used in the I/O operation must be aligned on a disk sector size boundary.

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.

Example:

UNBUFFERED_IO <filename>

Use multiple entries to enable unbuffered I/O on multiple files. Wildcard characters are supported.

UNBUFFERED_IO custmast.dat

UNBUFFERED_IO *.dat

UNBUFFERED_IO data*

Restrictions:

  • The use of unbuffered I/O is not supported for encrypted and/or segmented files. If the UNBUFFERED_IO configuration option matches the name of a file that uses one of these features, the option is currently ignored.
  • Unbuffered I/O is not used during automatic recovery and requests to enable unbuffered I/O on files during automatic recovery are ignored.
  • If the sector size of the disk on which the file is stored exceeds the c-treeACE Server page size when unbuffered I/O is requested, the following messages are logged to CTSTATUS.FCS and unbuffered I/O is not used on that file:

    An existing file:

mbopen: File <filename> disk sector size (<disk_sector_size>) exceeds page size (<page_size>)

A new file:

mbcratx: File <filename> disk sector size (<disk_sector_size>) exceeds page size (<page_size>)

TOCIndex