Direct I/O considerations

This topic describes things to consider when your applications require direct I/O.

Some applications, such as database management systems, use their own cache management systems. For such applications, SAN File System provides a direct I/O mode, which allows these applications to bypass the data cache. In this mode, SAN File System performs direct writes to disk and does not cache data. This also allows distributed applications on different AIX® or Linux™ client machines to write data to the same file at the same time. Using the direct I/O mode makes files act like raw devices. This gives database systems direct control over their I/O operations, while still providing the advantages of SAN File System, such as the FlashCopy® feature and file-level backup and restore processing. Applications need to be aware of, and configured for, direct I/O.

UNIX-based clients use existing operating-system interfaces to use direct I/O. That is, you must set the O_DIRECT flag to open a file in direct I/O mode.

Windows-based clients enforce full, native direct I/O, or unbuffered I/O, semantics. You must specify the FILE_FLAG_NO_BUFFERING flag to open or create a file in direct I/O mode. When using this flag, your application must meet the following requirements:
  • The I/O buffers, offsets and transfer size must be integer multiples of the volume's sector size.
  • Buffer addresses for read and write operations are not required to be sector aligned; however, the target offsets must be sector aligned.
You receive a return code of 87 (ERROR_INVALID_PARAMETER) if the requirements are not met.
Restrictions:
  • You cannot use direct I/O processing on Linux clients.
  • Applications that use direct I/O are responsible for managing concurrent writes to the same file.
  • A process cannot use direct I/O on a file that is being used in cache mode by another process on the same client machine. Similarly, a process cannot use a file in cached mode that is being used in direct I/O mode by another process on the same client machine. In either case, you will receive an EAGAIN error.

    However, a process can use direct I/O on a file that is being used in cache mode by a process on another client machine. Similarly, a process can use a file in cached mode that is being used in direct I/O mode by a process on another client machine.

Parent topic: Planning the client configuration

Library | Support | Terms of use | Feedback
(C) Copyright IBM Corporation 2003, 2004. All Rights Reserved.
IBM TotalStorage SAN File System v2.2