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

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • P4
    • Resolution: Fixed
    • None
    • hs25
    • hotspot
    • gc
    • 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

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

                Dates

                  Created:
                  Updated:
                  Resolved: