Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8247980

Exclusive execution of java/util/stream tests slows down tier1



    • Type: Enhancement
    • Status: New
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 11, 15, 16
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:


      Following up on why tier1 exhibits low paralellism when run on modern heavy-threaded desktop. On my TR 3970X, jdk:tier1 takes about 400 seconds, and there is a significantly large phase during which CPU load drops significantly.

      One of the reasons is JDK-8058204 that put java/util/stream tests to run in exclusive mode. Dropping java/util/stream from there improves the test times significantly (and CPU loads now make sense too):

      diff -r 216c6baa0564 test/jdk/TEST.ROOT
      --- a/test/jdk/TEST.ROOT Sat Jun 20 15:11:19 2020 +0800
      +++ b/test/jdk/TEST.ROOT Mon Jun 22 11:24:26 2020 +0200
      @@ -27,5 +27,5 @@
       sun/tools/jstatd sun/tools/jcmd sun/tools/jhsdb sun/tools/jhsdb/heapconfig \
       sun/tools/jinfo sun/tools/jmap sun/tools/jps sun/tools/jstack sun/tools/jstat \
      -com/sun/tools/attach sun/security/mscapi java/util/stream java/util/Arrays/largeMemory \
      +com/sun/tools/attach sun/security/mscapi java/util/Arrays/largeMemory \
       java/util/BitSet/stream javax/rmi
      $ time CONF=linux-x86_64-server-release make images run-test TEST=java/util/stream/

      # before: ~17x parallelism; mostly due to parallel javac compiles
      real 4m23.668s
      user 75m47.699s
      sys 2m50.316s

      # after: ~43x parallelism, limited by test tails
      real 1m32.027s
      user 61m59.474s
      sys 3m20.213s

      In other words, we are losing roughly 180s out of 400s jdk:tier1 for this, about 45% of the test time. This is way beyond the overhead JDK-8058204 envisioned originally ("I doubt it would increase the overall test run time, perhaps by 1% to 3%."). Observe:

      $ time CONF=linux-x86_64-server-release make images run-test TEST=jdk:tier1

      # before: ~25x parallelism
      real 6m37.627s
      user 158m32.437s
      sys 8m12.700s

      # after: ~44x parallelism
      real 3m43.018s
      user 159m47.390s
      sys 8m56.156s

      This makes tier1 almost 1.8x faster!


          Issue Links



              Unassigned Unassigned
              shade Aleksey Shipilev
              0 Vote for this issue
              2 Start watching this issue