안녕하세요 이정운 입니다.
IBM WAS 는 기본적으로 특화된 AIO 를 사용하며 Java 에서 제공하는 NIO 대비 일반적인 성능이 더 좋습니다.
다만, 절대적으로 성능을 일반적인 Throughput 관점이 아니라 Response Time 으로 볼 경우에는 NIO 의 성능이 더 나은 경우가 있습니다.
이런 경우를 위해서 IBM WAS 가 제공하는 AIO 를 disable 하고 NIO 를 사용하는 방안도 같이 제공하오니 참고하시기 바라겠습니다.
그럼 이만..
(하단의 링크가 복잡해 보이지만 맨 하단에 언급한 aio library 파일 이름 변경이 가장 쉽고 보편적으로 사용하는 방안입니다.)
Disabling AIO (Asynchronous Input/Output) native transport in WebSphere Application Server
http://www-01.ibm.com/support/docview.wss?uid=swg21366862
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 |
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 |
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
Note: Whenever a WebSphere Fix Pack is installed, the AIO libraries may get reinstalled. You will then need to rename them again.
댓글