Large increase in startup time from JDK8 to JDK9

Claes Redestad claes.redestad at oracle.com
Mon Jul 25 10:55:57 UTC 2016


Hi,

jigsaw does come with an increase in the number of bytecodes executed during startup, since module descriptors for all system modules are created eagerly. This also means there is a significant difference between a JDK and a JRE image (fewer modules). 

There is also a huge difference between the exploded jdk and images: if you build a JDK yourself make sure you do startup investigation on one of the images under build/.../images/jdk|jre and not the exploded jdk under build/.../jdk - jlink does some magic already to speed up startup!

Last but not least: Does your hello world load code from a jar file? In that case things could be made worse by a recent regression:

http://mail.openjdk.java.net/pipermail/core-libs-dev/2016-July/042538.html 

Thanks!

/Claes

  

Andrew Haley <aph at redhat.com> skrev: (25 juli 2016 12:32:11 CEST)
>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?
>
>Andrew.

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.


More information about the jdk9-dev mailing list