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

Add -XX:-ShrinkHeapInSteps option (previously -XX:+UseAggressiveHeapShrink)

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P3
    • 9
    • 9
    • hotspot
    • gc

    Description

      [Note after filing this bug, it was decided to call the option ShrinkHeapInSteps instead of UseAggressiveHeapShrink, and give it the opposite meaning]

      Add -XX:+UseAggressiveHeapShrink option. With this option enabled after the next full GC the Java heap will be resized immediately to target size without requiring multiple GCs.

      This is useful for customers that want to minimize the amount of memory used by the java heap, and are willing to sacrifice some performance (induce more frequent GCs) to save that memory. When heap usage fluctuates greatly, the GC will tend to hold on to the excess heap memory longer than needed due to the the current algorithm which requires 4 full GCs before MaxHeapFreeRatio is fully honored. +UseAggressiveHeapShrink will eliminate the need to wait for 4 full GCs.

      Attachments

        Issue Links

          Activity

            People

              cjplummer Chris Plummer
              cjplummer Chris Plummer
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: