pushy
pushy

Reputation: 9645

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?

Upvotes: 2

Views: 2943

Answers (4)

pete23
pete23

Reputation: 2280

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.

Upvotes: 5

user939058
user939058

Reputation: 11

You might try it with the latest java 6 update (6u27).

Upvotes: 1

Dave Costa
Dave Costa

Reputation: 48151

You might try

truss java -version

to see if it waits a long time on a particular system call.

Upvotes: 1

Peter Lawrey
Peter Lawrey

Reputation: 533930

Perhaps Java 6 is installed on a network drive. Can you try

df `which java`

Upvotes: 1

Related Questions