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

MaxMetaspaceSize should limit the committed memory used by the metaspaces

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: hs25
    • Fix Version/s: hs25
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
      gc
    • Resolved In Build:
      b54
    • Verification:
      Not verified

      Backports

        Description

        Today the MaxMetaspaceSize flag is neither well-specified nor honored correctly.

        The suggestion is to make MaxMetaspaceSize limit the committed memory used in both the non-class metaspaces and the compressed class space.

        Fixed:
        * Word and Bytes mixing: Remove incorrect usage of Metablock::_overhead (JDK-8024651)
        * Word and Bytes mixing: Fix MetaspaceAux::reserved_in_bytes() (JDK-8023476)
        * Word and Bytes mixing: Fix MaxMetaspaceSize check (JDK-8025059)
        * Keep track of the committed memory in the metaspaces (JDK-8024638)
        * Make MetaspaceSize limited by MaxMetaspaceSize and not the other way around (JDK-8024650)
        * Fix our metaspace tracing code, which crashes, writes incorrect values (JDK-8024751, JDK-8024752)
        * Reflect all this in our metaspace counters and mbean pools. (JDK-8023476, JDK-8023219)
        * Fix bugs in TraceMetadata* (JDK-8024752)
        * Log TraceMetadata* output to gclog_or_tty instead of tty (JDK-8024752)
        * Remove incorrect, unused code (JDK-8024547)
        * Some renaming to make the code more self-explanatory (JDK-8024547)
        * Don't over-commit when using large pages, or turn off large pages for the metaspaces. (JDK-8024547)
        * Don't use min_alignment()/max_alignment() to align MetaspaceSize/MaxMetaspaceSize. (JDK-8024547)
        * Compare MaxMetaspaceSize against committed memory (JDK-8024547)
        * Induce GC when compressed class space allocations pass the MaxMetaspaceSize, not only non-class metaspace allocations. (JDK-8024547)
        * Fix metaspace LowMemory/PeakMemory detector - call MemoryService::track_* when allocating metadata (JDK-8025996)

        Deferred suggestions:
        * Stop leaving unused reserved memory in non-class metaspaces
        * Stop leaving unused committed memory
        * Make capacity_until_GC limited by MaxMetaspaceSize

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  stefank Stefan Karlsson
                  Reporter:
                  stefank Stefan Karlsson
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: