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

High system time for PLAB allocations in highly threaded applications

    XMLWordPrintable

Details

    • gc

    Description

      In some applications with a lot of threads we sometimes notice high system time during GC; investigation showed that at least one cause for this can be PLAB allocation.

      If many threads try to refill their PLAB at approximately the same time, the heap lock will be taken, causing lots of contention.

      The attached file shows high pause time spikes caused by that on a micro benchmark.

      Find ways to fix this.

      Following are the test cases for the given figure:

      [0] -XX:-ResizePLAB
      [1] -XX:+ResizePLAB
      [2] -XX:-ResizePLAB -XX:OldPLABSize=2097152 -XX:YoungPLABSize=2097152
      [3] -XX:-ResizePLAB -XX:OldPLABSize=0 -XX:YoungPLABSize=0

      For this test, [2] has the best results. However, we can not give too big PLAB size, due to too much wasted space.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated: