Large increase in startup time from JDK8 to JDK9

Alan Bateman Alan.Bateman at oracle.com
Mon Jul 25 11:24:50 UTC 2016


On 25/07/2016 11:32, Andrew Haley wrote:

> I've been noticing a significant increase in startup time, and decided
> to investigate.
>
> With JDK8 -XX:+TraceBytecodes on HelloWorld I see:
>
> 760620 bytecodes executed in 13.5s (0.056MHz)
> [BytecodeCounter::counter_value = 760620]
>
> And with JDK9 I see:
>
> 4916036 bytecodes executed in 120.0s (0.041MHz)
> [BytecodeCounter::counter_value = 4916036]
>
> I'm guessing this is because of Jigsaw processing, but I haven't
> investigated any further.  I would have thought that such a severe
> degradation was a release blocker.
>
> Does anyone here know about this?  Has anyone investigated?
>
There is additional code executed during startup but the overhead is 
more like 40-45ms with a product + images builds. It various by 
processor of course. Should be a bit less when using CDS enabled. As 
TraceBytecodes is not a product option then I assume your runs must be 
with a debug or fastdebug builds so it's always going to look bad.

The other thing to say is that we do have periodic startup regressions. 
The MR JAR changes have tickled regressions a few times for example. One 
that is currently being sorted out is a change that triggers all the 
regex support to be loaded at startup. I can't tell if this is part of 
what you are seeing.

-Alan


More information about the jdk9-dev mailing list