IBM Support

Disabling AIO (Asynchronous Input/Output) native transport in WebSphere Application Server

Technote (troubleshooting)


Problem(Abstract)

IBM Support might request you to disable the AIO native transport code.
In certain cases, this code can have a fairly large native memory footprint, and if the application server is short on native memory, disabling the AIO native transport can increase the available address space for native memory.

Environment

IBM WebSphere Application Server on Windows, AIX, Linux and HP-UX.
On Solaris, only for versions 7.0.0.5 and earlier, and 6.1.0.17 and earlier. Later WebSphere versions on Solaris no longer have this library.


Diagnosing the problem

IBM Support will be able to tell you if you are seeing an issue with the AIO native code and may recommend disabling it.

Resolving the problem

To disable the AIO native transport code you can set a WebContainer property or you can remove the AIO native library files. If you set the commClass WebContainer property then WebSphere Application Server will use the New I/O code (part of the JVM) to return response data to users instead of the AIO library. WebSphere checks for the existence of the AIO native libraries, and if they do not exist, defaults to use the JVM's New I/O code.

Setting the WebContainer property is the easiest (Method 1) and also the safest, as if you remove or rename the AIO native libraries, then they may be re-enabled the next time you apply a WebSphere Fix Pack.

NOTE: WebSphere's AIO is independent from the AIO feature in AIX (aio_active).



Method 1: To disable the AIO library with the WebContainer property:

To set the commClass property, you will need to use a wsadmin script.

To change a group of servers (server1 and server2) run the following jacl script:

global AdminConfig
set srvlist [$AdminConfig list Server]
foreach srv $srvlist {
    set name [$AdminConfig showAttribute $srv name]
    if {$name == "server1" ||
        $name == "server2"} {
        set svc [$AdminConfig list TransportChannelService $srv]
        set fact [$AdminConfig create TCPFactory $svc {}]
        $AdminConfig create Property $fact {{name commClass} {value com.ibm.ws.tcp.channel.impl.NioTCPChannel}}
        puts [$AdminConfig showAttribute $svc factories]
    }
}
$AdminConfig save

To change a stand-alone server you would run the following jacl script:

global AdminConfig
set svc [$AdminConfig list TransportChannelService]
set fact [$AdminConfig create TCPFactory $svc {}]
$AdminConfig create Property $fact {{name commClass} {value com.ibm.ws.tcp.channel.impl.NioTCPChannel}}
$AdminConfig save

You will need to edit the script for the application servers you wish to disable AIO for.


To re-enable the AIO native library after using this method, set the value of the commClass property to “com.ibm.ws.tcp.channel.impl.AioTCPChannel”.

Instead of:
{{name commClass} {value com.ibm.ws.tcp.channel.impl.NioTCPChannel}}
use:
{{name commClass} {value com.ibm.ws.tcp.channel.impl.AioTCPChannel}}



Method 2: To disable the AIO library by renaming the native libraries:

You can remove the libraries, but it is better to just rename the libraries in the same directory so you will know where they are in case you need to re-enable them. Since they are native libraries and not Java .jar files, the name is critical for them to be loaded, so you can just change the extension of the libraries to something else.

For WebSphere 8 and higher, the libraries are located in the install_root/bin/ and
install_root/lib/native/ Operating System/ Architecture/ directories.
ex.
AppServer/bin/
AppServer/lib/native/linux/x86_64/
AppServer/lib/native/linux/x86_32/

AppServer/bin/
AppServer/lib/native/aix/ppc_32/
AppServer/lib/native/aix/ppc_64/

For WebSphere 7 and 6.1, the libraries are located only in the install_root /bin directory

  • UNIX:

    mv libibmaio.so libibmaio.disabled
    mv libibmaiodbg.so libibmaiodbg.disabled

  • Windows:

    move ibmaio.dll ibmaio.dis
    move ibmaiodbg.dll ibmaiodbg.dis

The application server must be recycled after the libraries have been removed or renamed.


Note: Whenever a WebSphere Fix Pack is installed, the AIO libraries may get reinstalled. You will then need to rename them again.

Document information

More support for: WebSphere Application Server
Out of Memory

Software version: 6.1, 7.0, 8.0, 8.5, 9.0

Operating system(s): AIX, HP-UX, Linux, Windows

Reference #: 1366862

Modified date: 07 October 2010


Translate this page: