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

Improve G1 PLAB allocator pathological case where it keeps doing direct allocations

XMLWordPrintable

    • gc

      In the slow path for PLAB allocation G1 needs to determine whether it should discard the current PLAB buffer to allocate an object or do direct allocation.

      To keep the waste percentage goal of 10% (i.e. ParallelGCBufferWastePct) it always directly allocates objects that are larger than ParallelGCBufferWastePct percent of the current PLAB size.

      This works to keep this goal, but raises one question and one issue:
      - wouldn't it be more direct to check for whether the remaining PLAB space is < 10% of PLAB size? (I think the checks are equivalent in this case; document this!)
      - there can be a pathological case (which the test/hotspot/jtreg/gc/g1/plab/TestPLABPromotion.java test exercises) where if the application only has allocations larger than that threshold, no PLAB allocation will be done after some point - which is slow.

      There should be some dynamic change (increase) of that threshold based on failures.

      This heuristic has been in G1 since initial import.

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

              Created:
              Updated: