I recently got some questions about IBM AIX and Concurrent IO (CIO).
First of all, there’s Direct IO (DIO) and Concurrent IO (DIO). The advantage of DIO and CIO is the data for both reading and writing is not buffered at the operating system level. This means ‘double buffering’ is omitted, which saves CPU cycles. If the database uses the operating system buffering (for example if there’s plenty of memory on the system), performance can degrade when DIO or CIO is used, because then all IO’s are done physically from the operating system’s perspective (it could be buffered at the lower layer, which could be a SAN or NAS).
The difference between DIO and CIO is the way write concurrency is handled (this is a bit simplified). DIO serialises IO’s to prevent writes from corrupting each other, whilst CIO does not serialise, because it assumes the writer has done proper serialisation. With the Oracle database, this is the case (remember, Oracle can work without a filesystem too).
The IBM JFS filesystem has DIO implemented, the IBM JFS2 filesystem has CIO implemented.
In order to implement CIO, there are two ways:
-Use a database parameter: FILESYSTEMIO_OPTIONS; set it to ‘setall’ (which also implements Asynchronous IO), or ‘directIO’ (which opens files in DIO mode on JFS, and in CIO mode on JFS2)
-Use a mount option (‘cio’) to make all IO’s to the filesystem behave as if CIO was done
A note on Oracle’s metalink (‘Direct I/O or Concurrent I/O on AIX 5L’; ML 272520.1) describes this behavior. This note also states that BOTH should be enabled. I don’t find this the best way to make a database do CIO; merely setting FILESYSTEMIO_OPTIONS properly (‘setall’,’directIO’) will do, mounting the filesystem with the ‘cio’ option will not add anything, it will make regular IO’s do CIO, of which some do not benefit. For example, if the database software and the dump destinations are on this filesystem too.