Very slow Java startup in Solaris 10
We've got a problem on our solaris machine, as Java takes very long to start. Even on simple things as java -version
>time java -version
java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
Java HotSpot(TM) Server VM (build 16.3-b01, mixed mode)
real 0m34.084s
user 0m0.088s
sys 0m8.331s
Funny enough, this is limited to Java6:
java version "1.5.0_24"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_24-b02)
Java HotSpot(TM) Server 开发者_开发问答VM (build 1.5.0_24-b02, mixed mode)
real 0m0.320s
user 0m0.123s
sys 0m0.138s
Any ideas?
This is known problem in dtrace initialisation for the jvm. Goes away in java 6u25, I believe, per Sun Alert 1296670.1. We uncovered this problem in an important environment last week, and the pain was excruciating (if you need to run 100 processes a minute, and they abruptly start taking an extra 10s to startup...).
Workaround if you are pinned to your JVM:
export DTRACE_DOF_INIT_DISABLE=true
This has been 100% successful for us, we're not using the JVM specific dtrace probes anyway.
Perhaps Java 6 is installed on a network drive. Can you try
df `which java`
You might try
truss java -version
to see if it waits a long time on a particular system call.
You might try it with the latest java 6 update (6u27).
精彩评论