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

Suboptimal PreTouchParallelChunkSize defaults and limits

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P4
    • 16
    • 16
    • hotspot
    • gc
    • b28

    Description

      During the review of 8252221 the following suggestion came up:

      I have another suggestion regarding "PreTouchParallelChunkSize" flag.
      The default value looks huge and reducing this value to 128MB improved startup time for both G1GC and ParallelGC.
      The following test are done with 1TB memory. Please see below.

      time
      ./jdk/bin/java -XX:+AlwaysPreTouch -XX:-UseParallelGC -Xmx900g -Xms900g -Xmn800g -XX:SurvivorRatio=400 -Xlog:gc*=debug:file=gc.log -XX:ParallelGCThreads=128 -XX:PreTouchParallelChunkSize=1g -version

      G1GC Test
      ChunkSize= 1GB : Real time taken = 17.68s
      ChunkSize= 128MB : Real time ttaken = 14.8s

      ParallelGC Test
      ChunkSize= 1GB : Real time taken = 13.54s
      ChunkSize= 128MB : Real time taken = 12.8s

      I.e.: improvements are in the range of

      ParallelGC = 0.5-1 sec.
      G1GC = 2-3 sec

      Also, the minimum value allowed is '1' and it should be similar to page size right ?

      See also https://mail.openjdk.java.net/pipermail/hotspot-gc-dev/2020-October/031711.html

      Attachments

        Issue Links

          Activity

            People

              tschatzl Thomas Schatzl
              tschatzl Thomas Schatzl
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: