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

G1: Use the average heap size rather than the minimum heap size to calculate the region size

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: hs25
    • Component/s: hotspot
    • Subcomponent:
      gc
    • Resolved In Build:
      b49

      Backports

        Description

        When G1 decides on the heap region size it aims for 2048 regions for the heap size. But the heap size it is using is the minimum heap size that Arguments::min_heap_size() picks.

        This size is normally very small. If you set -Xms on the command line this value will be used, but otherwise the value is OldSize + NewSize, which defaults to about 6MB.

        This means that HeapRegion::setup_heap_region_size() will almost always come up with a G1 region size of 1MB since this is the minimum region size.

        In performance testing we have seen improvements with larger heap regions. Larger heap regions also lead to fewer regions which lead to less memory footprint overhead as we have fixed memory costs for each region.

        A more reasonable calculation would be to use the average heap size to determine the region size.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  brutisso Bengt Rutisson (Inactive)
                  Reporter:
                  brutisso Bengt Rutisson (Inactive)
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: