Tuning aio0 (AIX)
NOTE: The aio0 device is no longer present under AIX 6.1, and hence (I believe) no longer requires tuning.
The aio0 device on AIX provides "legacy" asynchronous I/O support (ie. not POSIX aio). It is still used by many products, including Oracle and DB2, and to obtain good performance, requires tuning.
Parameters
Current configuration values may be obtained via lsattr:
$ lsattr -El aio0 autoconfig available STATE to be configured at system restart True fastpath enable State of fast path True kprocprio 39 Server PRIORITY True maxreqs 12288 Maximum number of REQUESTS True maxservers 128 MAXIMUM number of servers per cpu True minservers 32 MINIMUM number of servers True
Important parameters:
- autoconfig
- Should be "available" on any system using aio.
- maxreqs
- The maximum total number of aio requests that may be outstanding at any point in time. For large transactional databases, this may need to be greatly increased.
- maxservers
- When multiplied by the number of logical CPUs (ie. with SMT, it is double the number of virtual processors), represents the maximum number of AIX aio server kernel threads (aioserver) that may be running at any time. This also represents the maximum number of aio-generated I/Os that may be outstanding to the disk subsystem at any time. Hence, my rule of thumb is to set maxservers to at least:
(number of LUNs or disks) * (disk queue depth) / (number of logical CPUs)
- Apart from consuming kernel memory and process slots, on large systems, there should be few issues increasing this parameter.
Configuring
To configure aio0 to be available at system startup:
# chdev -Pl aio0 -a autoconfig=available
To configure aio0 to be available for use now:
# mkdev -l aio0
To tune aio0 parameters:
# chdev -Pl aio0 -a maxreqs=16384 -a maxservers=256
Note: If aio0 is available, a reboot will be required to activate the parameter changes.
Monitoring
The number of presently running aioserver threads may be viewed via:
$ pstat -a | grep ' aioserver'
Additional aio statistics are available via iostat -A.