Details

    • Type: Bug
    • Status: Open
    • Priority: P3
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 10
    • Component/s: tools
    • Labels:
      None

      Description

      $ bin/jlink -J-Xlog:gc --module-path=jmods --add-modules java.se --output 9link1
      [0.027s][info][gc] Using G1
      [0,276s][info][gc] GC(0) Pause Young (G1 Evacuation Pause) 3M->1M(8M) (0,270s, 0,276s) 6,028ms
      [0,335s][info][gc] GC(1) Pause Young (G1 Evacuation Pause) 2M->1M(8M) (0,331s, 0,335s) 4,236ms
      [0,356s][info][gc] GC(2) Pause Young (G1 Evacuation Pause) 2M->1M(8M) (0,351s, 0,356s) 5,276ms
      [0,383s][info][gc] GC(3) Pause Young (G1 Evacuation Pause) 3M->1M(8M) (0,372s, 0,383s) 11,232ms
      [0,405s][info][gc] GC(4) Pause Young (G1 Evacuation Pause) 2M->1M(15M) (0,397s, 0,405s) 8,052ms
      [0,693s][info][gc] GC(5) Pause Young (G1 Evacuation Pause) 8M->4M(15M) (0,657s, 0,693s) 36,024ms
      [0,713s][info][gc] GC(6) Pause Young (G1 Evacuation Pause) 8M->7M(15M) (0,708s, 0,713s) 4,620ms
      [0,725s][info][gc] GC(7) Pause Initial Mark (G1 Humongous Allocation) 7M->7M(15M) (0,714s, 0,725s) 11,437ms
      [0,725s][info][gc] GC(8) Concurrent Cycle (0,725s)
      [0,747s][info][gc] GC(8) Pause Remark 8M->8M(15M) (0,730s, 0,747s) 16,817ms
      [0,753s][info][gc] GC(9) Pause Young (G1 Evacuation Pause) 9M->8M(35M) (0,748s, 0,753s) 5,507ms
      [0,754s][info][gc] GC(8) Pause Cleanup 8M->8M(35M) (0,753s, 0,754s) 0,377ms
      [0,755s][info][gc] GC(8) Concurrent Cycle (0,725s, 0,755s) 29,509ms
      [0,822s][info][gc] GC(10) Pause Young (G1 Evacuation Pause) 15M->14M(35M) (0,816s, 0,822s) 5,679ms
      [0,877s][info][gc] GC(11) Pause Young (G1 Evacuation Pause) 19M->14M(35M) (0,872s, 0,877s) 4,574ms
      [0,906s][info][gc] GC(12) Pause Young (G1 Evacuation Pause) 19M->14M(35M) (0,901s, 0,906s) 5,043ms
      [0,973s][info][gc] GC(13) Pause Young (G1 Evacuation Pause) 20M->17M(66M) (0,967s, 0,973s) 6,549ms
      [1,127s][info][gc] GC(14) Pause Young (G1 Evacuation Pause) 35M->23M(66M) (1,119s, 1,127s) 8,456ms
      [1,241s][info][gc] GC(15) Pause Young (G1 Evacuation Pause) 39M->26M(66M) (1,230s, 1,241s) 10,859ms
      [1,284s][info][gc] GC(16) Pause Young (G1 Evacuation Pause) 42M->26M(66M) (1,281s, 1,284s) 3,638ms
      [1,311s][info][gc] GC(17) Pause Young (G1 Evacuation Pause) 43M->28M(132M) (1,306s, 1,310s) 4,893ms
      [1,505s][info][gc] GC(18) Pause Young (G1 Evacuation Pause) 68M->30M(132M) (1,495s, 1,505s) 10,129ms
      [1,675s][info][gc] GC(19) Pause Young (G1 Evacuation Pause) 89M->44M(132M) (1,654s, 1,675s) 21,432ms
      [1,805s][info][gc] GC(20) Pause Young (G1 Evacuation Pause) 93M->50M(132M) (1,793s, 1,805s) 11,630ms
      [1,911s][info][gc] GC(21) Pause Young (G1 Evacuation Pause) 94M->53M(277M) (1,894s, 1,911s) 16,778ms
      [2,205s][info][gc] GC(22) Pause Young (G1 Evacuation Pause) 168M->70M(277M) (2,178s, 2,205s) 26,220ms

      real 0m2.756s
      user 0m18.540s
      sys 0m1.216s

      Some non-excessive GC tuning to allow for the size needed to operate on a full image improves total runtime substantially:

      time bin/jlink -J-Xlog:gc -J-Xms400m -J-Xmn300m --module-path=jmods --add-modules java.se --output 9link2
      [0.026s][info][gc] Using G1
      [1,566s][info][gc] GC(0) Pause Young (G1 Evacuation Pause) 300M->58M(400M) (1,508s, 1,566s) 57,175ms

      real 0m2.291s
      user 0m14.856s
      sys 0m0.836s

      Additionally, since jlink is typically a short-running program, limiting the number of compiler threads can have a positive effect on total runtime and reducing CPU saturation:

      $ time bin/jlink -J-Xlog:gc -J-Xms400m -J-Xmn300m -J-XX:CICompilerCount=2 --module-path=jmods --add-modules java.se --output ~/jdks/9link13
      [0.026s][info][gc] Using G1
      [1,565s][info][gc] GC(0) Pause Young (G1 Evacuation Pause) 300M->59M(400M) (1,488s, 1,565s) 77,174ms

      real 0m2.178s
      user 0m4.572s
      sys 0m0.640s

        Issue Links

          Activity

          Hide
          jlaskey Jim Laskey added a comment -
          Should this be assigned to build team (setting launcher configs)?
          Show
          jlaskey Jim Laskey added a comment - Should this be assigned to build team (setting launcher configs)?
          Hide
          redestad Claes Redestad added a comment -
          It appears some modest tuning could also help increase stability on 32-bit systems.
          Show
          redestad Claes Redestad added a comment - It appears some modest tuning could also help increase stability on 32-bit systems.
          Hide
          jlaskey Jim Laskey added a comment -
          Please add J-Xms400m -J-Xmn300m -J-XX:CICompilerCount=2 to jdk/make/launcher/Launcher-jdk.jlink.gmk
          Show
          jlaskey Jim Laskey added a comment - Please add J-Xms400m -J-Xmn300m -J-XX:CICompilerCount=2 to jdk/make/launcher/Launcher-jdk.jlink.gmk
          Hide
          alanb Alan Bateman added a comment -
          Moving this to tools/jlink as this relates to the building of jlink and is not a general build issue.
          Show
          alanb Alan Bateman added a comment - Moving this to tools/jlink as this relates to the building of jlink and is not a general build issue.
          Hide
          jlaskey Jim Laskey added a comment -
          Not seeing an improvement. Deferring for further analysis.
          Show
          jlaskey Jim Laskey added a comment - Not seeing an improvement. Deferring for further analysis.
          Hide
          redestad Claes Redestad added a comment -
          Locally testing running 2 and 3 parallel jlink processes linking the JDK (which emulates what we do in the build), this conservative tune-up strikes a good balance between improving real time over the current build settings (-J-XX:+UseSerialGC -J-Xmx512m ... -J-XX:TieredStopAtLevel=1) from 16-17s to 11-12s while increasing user time by <20%. On any machine with more than 4 cores it should pay off similarly:

          -J-XX:+UseParallelGC -J-XX:ParallelGCThreads=2 -J-Xmx512m -J-Xms64m -J-XX:CICompilerCount=2

          Adding more GC and compiler threads can improve real time further when only running one jlink in isolation, but will interfere more with
          Show
          redestad Claes Redestad added a comment - Locally testing running 2 and 3 parallel jlink processes linking the JDK (which emulates what we do in the build), this conservative tune-up strikes a good balance between improving real time over the current build settings (-J-XX:+UseSerialGC -J-Xmx512m ... -J-XX:TieredStopAtLevel=1) from 16-17s to 11-12s while increasing user time by <20%. On any machine with more than 4 cores it should pay off similarly: -J-XX:+UseParallelGC -J-XX:ParallelGCThreads=2 -J-Xmx512m -J-Xms64m -J-XX:CICompilerCount=2 Adding more GC and compiler threads can improve real time further when only running one jlink in isolation, but will interfere more with

            People

            • Assignee:
              jlaskey Jim Laskey
              Reporter:
              redestad Claes Redestad
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: