4.1 Asynchronous I/O capabilities for sockets and files



Using AIX Asynchronous I/O capabilities is recommended. In AIX 6.1, Asynchronous I/O is installed by default.

The device support is contained in the AIX base operating system fileset...

bos.iocp.rte

To verify whether the device support is installed...

lslpp -l bos.iocp.rte

If this fileset is installed, you receive output similar to...

#lslpp -l bos.iocp.rte
Fileset                      Level  State      Description
  -----------------------------------------------------------------------
Path: /usr/lib/objrepos
  bos.iocp.rte              5.3.0.50  COMMITTED  I/O Completion Ports API

Path: /etc/objrepos
  bos.iocp.rte              5.3.0.50  COMMITTED  I/O Completion Ports API

If this fileset is not installed, you will receive notification that is similar to the following message:

 lslpp: Fileset bos.iocp.rte not installed.

The bos.iocp.rte fileset is provided on the AIX installation media. Install this fileset as shown in Example 4-2 and reboot the system before proceeding. The reboot is needed to create the iocp device within the operating system kernel.

In the example, we installed the fileset using the AIX generic installer command geninstall using the NIM lpp_source directory which we directly mounted.

Example 4-2 Installing the iocp fileset

#geninstall -d /export/lpp_source/lpp_source53ML05/installp/ppc/ -I acqX bos.iocp.rte
+--------------------------------------------------------------------+
                    Pre-installation Verification...
+--------------------------------------------------------------------+
Verifying selections...done
Verifying requisites...done
Results...

SUCCESSES
---------
  Filesets listed in this section passed pre-installation verification
  and will be installed.

  Selected Filesets
  -----------------
  bos.iocp.rte 5.3.0.50 I/O Completion Ports API

  << End of Success Section >>

FILESET STATISTICS
------------------
    1  Selected to be installed, of which:
        1  Passed pre-installation verification ----
    1  Total to be installed

+---------------------------------------------------------------------+
                         Installing Software...
+--------------------------------------------------------------------+

installp: APPLYING software for:
        bos.iocp.rte 5.3.0.50


. . . . . << Copyright notice for bos.iocp >> . . . . . . .

Licensed Materials - Property of IBM 5765G0300 (C) Copyright International Business Machines Corp. 1999, 2006.

All rights reserved.

US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. . . . . . << End of copyright notice for bos.iocp >>. . . . Finished processing all filesets. (Total time: 11 secs). +---------------------------------------------------------------------+ Summaries: +---------------------------------------------------------------------+ Installation Summary -------------------- Name Level Part Event Result ----------------------------------------------------------------------- bos.iocp.rte 5.3.0.50 USR APPLY SUCCESS bos.iocp.rte 5.3.0.50 ROOT APPLY SUCCESS #

After the system is running again, make sure that the iocp device has already been created before enabling the device. Example 4-3 illustrates checking the device status using the command lsdev.

Example 4-3 Checking the iocp device

#lsdev |grep iocp
iocp0      Defined            I/O Completion Ports
#

As shown in Example 4-3, the iocp0 device is in the Defined state. The state can be changed using the smit fastpath...

iocp -> Change/Show Characteristics of I/O Completion Ports

...or by using the command chdev as shown in Example 4-4.

Example 4-4 Change state settings for iocp subsystem

#chdev -l iocp0 -P -a autoconfig='available'
iocp0 changed

The changed status will become active after a reboot. But the status in the running system can be changed by using the smit fastpath...

iocp -> Configure Defined I/O Completion Ports

...or by using the command mkdev -l iocp0.

Example 4-5 illustrates changing the status of the iocp device, checking that the status is now Available, and checking that the device is in the same status after a reboot using command lsattr -El iocp0.

Example 4-5 Change state for iocp subsystem in the running system

#mkdev -l iocp0
iocp0 Available
#lsdev |grep iocp
iocp0      Available          I/O Completion Ports
#lsattr -El iocp0
autoconfig available STATE to be configured at system restart True

To complete the setup of Asynchronous I/O capabilities, you also need to have the AIO device enabled. The device support is contained in the bos.rte.aio fileset, which is automatically installed with the operating system installation. Make sure that the aio device is in the Available state by running the lsdev command as shown in Example 4-6.

Example 4-6 Checking the aio device

aio0       Defined            Asynchronous I/O (Legacy)
posix_aio0 Defined            Posix Asynchronous I/O
#

If the device is in the Defined state, change the state for the next reboot of the server by using the smit fastpath...

aio -> Change / Show Characteristics of Asynchronous I/O

...or by using the chdev command; see Example 4-7.

Example 4-7 Change state of aio subsystem

#chdev -l aio0 -P -a minservers="10" -a maxservers="100" -a maxreqs="100000" -a autoconfig="available" -a fastpath="enable"
aio0 changed
#

Subsequent to changing the state of the running system, we used the command mkdev -l aio0 to change the current state of the device from Defined to Available.

At this point, we had competed the setup of the Asynchronous I/O capabilities in the running system as well for any subsequent reboot of the system.

Next