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

Clarify and simplify gc metaspace threshold handling

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: 16
    • Fix Version/s: 18
    • Component/s: hotspot
    • Labels:

      Description

      While reviewing JDK-8226236 I found gc threshold handling needlessly complicated.

      The error in that issue was caused because in a situation where semantically MaxMetaspaceSize was unlimited (unspecified) technically it still was.

      MaxMetaspaceSize="infinite" is implemented as MaxMetaspaceSize="very large value but a bit smaller than SIZE_MAX because of alignment". Which gives a small window for gc threshold values to be larger than MaxMetaspaceSize. Avoiding that window is needlessly complicated, see:

      https://mail.openjdk.java.net/pipermail/hotspot-gc-dev/2020-October/031738.html

      I think there is no reason for MaxMetaspaceSize or the gc metaspace threshold to be aligned to anything. They are just high water marks we compare against. Removing the alignment restriction would make gc threshold handling and ergo parameter setting simpler.

      Probably we could even completely remove the exported Metaspace::commit_alignment() value since this is internal information which should not be accessible from outside.

      This makes only sense to do post JEP387.


        Attachments

          Issue Links

            Activity

              People

              Assignee:
              stuefe Thomas Stuefe
              Reporter:
              stuefe Thomas Stuefe
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: