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

MaxMetaspaceSize should limit the committed memory used by the metaspaces

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • hs25
    • hs25
    • hotspot
    • None
    • gc
    • b54
    • Not verified

        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

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

                Created:
                Updated:
                Resolved: