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

NPG: Metaspace fragmentation when retiring a Metachunk

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: hs25
    • Fix Version/s: hs25
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
      gc
    • Resolved In Build:
      b51

      Backports

        Description

        When a Metaspace allocation request cannot be satisfied by the current chunk the chunk is retired and a new chunk is requested. This causes whatever is left in the chunk to be effectively leaked.
        It might be a good idea to add the last piece of each chunk to the SpaceManager's block dictionary.
        The reason I'm seeing this is that when running the test attached to JDK-8004241 the waste in the class space is 20% when running with MaxMetaspaceSize=256m. We end up with something like:

         Metaspace total 171164K, used 146740K, reserved 178176K
          data space 68764K, used 66765K, reserved 75776K
          class space 102400K, used 79975K, reserved 102400K

        while trying to allocate ~40 words in the class space.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  mgerdin Mikael Gerdin (Inactive)
                  Reporter:
                  mgerdin Mikael Gerdin (Inactive)
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: