direct I/O

From Wikistix
(Redirected from dio)

AIX direct I/O allows I/O to bypass the VMM, hence taking a shorter path through the kernel, and preventing the lrud kernel thread from having any work to do. It was introduced in AIX 4.3.

Direct I/O may be enabled via two methods:

  • Use of the O_DIRECT flag to the open(2) system call.
  • Use of the dio mount option.

Direct I/O should be used where either the application does its own caching (like many databases, eg. Oracle, DB2, Sybase, PostgreSQL, TSM, MySQL using InnoDB) or where the same data will not be read/written again for some time (eg. TSM disk storage pools).

Bear in mind, that direct I/O performance still falls slightly short of the performance achieved by using raw logical volumes. With many applications, using raw logical volumes can be just as easy to manage.

Restrictions

  • When using direct I/O, all reads and writes must be aligned to, and a multiple of, the filesystem block size, often being between 512 bytes and 4 kibibytes. Any read/write request which does not meet this criteria will be forced to go through the file cache and VMM.
  • Any file mapped using mmap(2), shm_open(2), etc will default to using the file cache and VMM for all I/O from all processes. Once unmapped, I/O will return to using direct I/O.

See Also

Internal

External

This article is a stub. Please expand it if you have more information.