<< 使用nginx sticky模块实现基于cookie的负载均衡 | 首页 | 安装配置keepalived 使nginx高可用 >>

IBM IPV6 Can Cause Poor Java Performance - United States

Problem(Abstract)

If the entire network is not IPv6-enabled or capable, users may find that Java programs perform poorly.

Resolving the problem

This document explains that if the entire network is not IPv6-enabled or capable, users may find that Java programs perform poorly.

On IBM i 6.1 and 7.1, the default JVM is the IBM Technology for Java (J9). This JVM runs in the PASE environment. When IPv6 is enabled (which is the default), each DNS entry is checked to see if it is IPv6-capable. When PASE hits a slow or unresponsive DNS entry, it will wait for a reply or timeout. A java thread dump (javacore) will confirm that IPv6 is the source of the poor performance. The stack will show "Inet6AddressImpl" as shown below:

...
at java/net/Inet6AddressImpl.lookupAllHostAddr(Native Method) 
at java/net/InetAddress$2.lookupAllHostAddr(InetAddress.java:949) 
at java/net/InetAddress.getAddressFromNameService(InetAddress.java:1318) 
at java/net/InetAddress.getLocalHost(InetAddress.java:1505) 
...

Resolution: 

Disable IPv6 at JVM invocation by using the following java properties: 

o -Dcom.ibm.cacheLocalHost=true 
o -Djava.net.preferIPv4Stack=true 
o -Djava.net.preferIPv6Addresses=false

Note: These properties can be passed as command-line arguments or added to a SystemDefault.properties file.

阅读全文……

标签 : ,



发表评论 发送引用通报