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

Parallel: Improve heap resizing heuristics

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • hotspot
    • gc
    • behavioral
    • minimal
    • add/remove/modify command line option
    • JDK

      Summary

      Obsolete the following product flags that have been rendered outdated by the new Parallel Adaptive Sizing implementation:

      • AdaptiveSizeMajorGCDecayTimeScale
      • AdaptiveSizePolicyInitializingSteps
      • AdaptiveSizePolicyOutputInterval
      • AdaptiveSizeThroughPutPolicy
      • AdaptiveTimeWeight
      • PausePadding
      • SurvivorPadding
      • TenuredGenerationSizeIncrement
      • TenuredGenerationSizeSupplement
      • TenuredGenerationSizeSupplementDecay
      • UseAdaptiveGenerationSizePolicyAtMajorCollection
      • UseAdaptiveGenerationSizePolicyAtMinorCollection
      • UseAdaptiveSizeDecayMajorGCCost
      • UseAdaptiveSizePolicyFootprintGoal
      • UseAdaptiveSizePolicyWithSystemGC
      • UsePSAdaptiveSurvivorSizePolicy

      Problem

      Parallel Adaptive Sizing aims to improve throughput, latency, and memory footprint by dynamically resizing various internal regions of the young and old generations. The previous implementation relied on numerous tuning flags, introducing significant complexity and sometimes resulting in unexpected behavior. For example, when users attempt to reduce memory footprint by lowering the GCTimeRatio (which controls the ratio between mutator and GC time), the previous implementation would shrink the young generation to a point that increases promotion to the old generation. As a result, the old generation grows, ultimately leading to a net increase in total memory footprint --- contrary to the user’s intent.

      Solution

      Introduce a new implementation that delivers improved out-of-the-box behavior and significantly reduces the need for manual tuning. As a result, the above flags are no longer necessary and are being removed.

      Specification

      -  product(bool, UsePSAdaptiveSurvivorSizePolicy, true,                      \
      -          "Use adaptive survivor sizing policies")                          \
      -                                                                            \
      -  product(bool, UseAdaptiveGenerationSizePolicyAtMinorCollection, true,     \
      -          "Use adaptive young-old sizing policies at minor collections")    \
      -                                                                            \
      -  product(bool, UseAdaptiveGenerationSizePolicyAtMajorCollection, true,     \
      -          "Use adaptive young-old sizing policies at major collections")    \
      -                                                                            \
      -  product(bool, UseAdaptiveSizePolicyWithSystemGC, false,                   \
      -          "Include statistics from System.gc() for adaptive size policy")   \
      -                                                                            \
      -  product(uint, AdaptiveSizeThroughPutPolicy, 0,                            \
      -          "Policy for changing generation size for throughput goals")       \
      -          range(0, 1)                                                       \
      -                                                                            \
      -  product(uintx, AdaptiveSizePolicyInitializingSteps, 20,                   \
      -          "Number of steps where heuristics is used before data is used")   \
      -          range(0, max_uintx)                                               \
      -                                                                            \
      -  product(uintx, AdaptiveSizePolicyOutputInterval, 0,                       \
      -          "Collection interval for printing information; zero means never") \
      -          range(0, max_uintx)                                               \
      -                                                                            \
      -  product(bool, UseAdaptiveSizePolicyFootprintGoal, true,                   \
      -          "Use adaptive minimum footprint as a goal")                       \
      -                                                                            \
      -  product(uint, AdaptiveTimeWeight,       25,                               \
      -          "Weight given to time in adaptive policy, between 0 and 100")     \
      -          range(0, 100)                                                     \
      -                                                                            \
      -  product(uint, PausePadding, 1,                                            \
      -          "How much buffer to keep for pause time")                         \
      -          range(0, UINT_MAX)                                                \
      -                                                                            \
      -  product(uint, SurvivorPadding, 3,                                         \
      -          "How much buffer to keep for survivor overflow")                  \
      -          range(0, UINT_MAX)                                                \
      -                                                                            \
      -  product(uint, TenuredGenerationSizeIncrement, 20,                         \
      -          "Adaptive size percentage change in tenured generation")          \
      -          range(0, 100)                                                     \
      -                                                                            \
      -  product(uint, TenuredGenerationSizeSupplement, 80,                        \
      -          "Supplement to TenuredGenerationSizeIncrement used at startup")   \
      -          range(0, 100)                                                     \
      -                                                                            \
      -  product(uintx, TenuredGenerationSizeSupplementDecay, 2,                   \
      -          "Decay factor to TenuredGenerationSizeIncrement")                 \
      -          range(1, max_uintx)                                               \
      -                                                                            \
      -  product(bool, UseAdaptiveSizeDecayMajorGCCost, true,                      \
      -          "Adaptive size decays the major cost for long major intervals")   \
      -                                                                            \
      -  product(uintx, AdaptiveSizeMajorGCDecayTimeScale, 10,                     \
      -          "Time scale over which major costs decay")                        \
      -          range(0, max_uintx)                                               \
      -                                                                            \

            ayang Albert Yang
            ayang Albert Yang
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated: