简体   繁体   中英

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.

您可以尝试使用最新的java 6更新(6u27)。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM