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

Virtualize G1CardSet containers over heap region

    XMLWordPrintable

    Details

    • Subcomponent:
      gc
    • Compatibility Kind:
      behavioral
    • Compatibility Risk:
      minimal
    • Compatibility Risk Description:
      None. This CSR extends the range of allowed values for the `G1HeapRegionSize` flag on 64 bit platforms. Since the maximum value selected by ergonomics stays the same, there is no reason to believe that there is any backwards compatibility issue.
    • Interface Kind:
      add/remove/modify command line option
    • Scope:
      Implementation

      Description

      Summary

      Extend the range of allowable values for G1HeapRegionSize to improve humongous object fragmentation issues.

      Problem

      G1 is a regional collector: the Java heap is split into evenly sized regions. All allocation and evacuation occurs on a region basis. Humongous objects, i.e. objects larger than half a region, are handled differently: they need to be allocated in a contiguous set of those regions separately, and due to their size do not move ever. This can cause waste within regions (at the end of the last region containing that humongous object) and problems with fragmentation on a region level: G1 might not find an appropriate set of contiguous regions to allocate a new humongous object. Both problems can cause issues ranging from increased GC activity to out-of-memory conditions.

      Solution

      Increase the available range of user-configurable region sizes from 32MB to 512MB on 64 bit platforms made possible by an earlier change (JDK-8017163). By allowing larger heap region sizes, a formerly humongous object may not be considered humongous any more, decreasing the fragmentation issues. Ergonomics will keep selecting only heap region sizes up to 32MB.

      Specification

         product(size_t, G1HeapRegionSize, 0,                                      \
                 "Size of the G1 regions.")                                        \
      -          range(0, 32*M)                                                    \
      +          range(0, NOT_LP64(32*M) LP64_ONLY(512*M))                         \
                 constraint(G1HeapRegionSizeConstraintFunc,AfterMemoryInit)        \
                                                                                   \
         product(uint, G1ConcRefinementThreads, 0,                                 \

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              tschatzl Thomas Schatzl
              Reporter:
              tschatzl Thomas Schatzl
              Reviewed By:
              Albert Yang, Stefan Johansson
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: