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

Deprecate UseLargePagesInMetaspace

    XMLWordPrintable

    Details

    • Subcomponent:
    • Compatibility Kind:
      behavioral
    • Compatibility Risk:
      low
    • Compatibility Risk Description:
      This switch appears to have been given in one customer situation in JDK 8 but the customer could reconfigure their large pages before upgrading to JDK 15.
    • Interface Kind:
      add/remove/modify command line option
    • Scope:
      JDK

      Description

      Summary

      Deprecate the VM product option UseLargePagesInMetaspace.

      Problem

      In the context of the upcoming Elastic Metaspace [1] it has been decided to scrap the large page support for Metaspace in its current form.

      UseLargePagesInMetaspace switches on usage of large pages for a part of Metaspace. The current implementation has some drawbacks:

      • It only works for the non-class-space part of Metaspace. The reason for that is that support for dynamically committing and uncommitting large pages is missing; large pages are always allocated when reserved, which would be incredibly wasteful for the Compressed Class Space, where the reserved-to-committed-ratio is usually very large.

      • Its runtime benefits are small, barely raising above noise level.

      • It increases complexity and the test coverage for this switch is low.

      Since the benefits of that feature in its current form are too low to justify the added complexity and testing (which is not done but should be done), it has been decided to leave large page support out of the upcoming Metaspace rewrite.

      Note that in the future we may re-evaluate this decision: if a new implementation were to provide dynamic committing and uncommitting of large pages it would be more useful than the current implementation and worth the added complexity.

      However, such a new implementation should be switched off under the control of the general "UseLargePages" switch - it should not require an individual switch. This is how large pages are controlled in other parts of the VM, e.g. in the Code Heap. That would also cut down on the number of configurations we need to test.

      So even if large page support for Metaspace is reintroduced later, the switch UseLargePagesInMetaspace would not be needed.

      Solution

      Declare the UseLargePagesInMetaspace option deprecated according to the process of removing Hotspot product options.

      Specification

      Use of -XX:UseLargePagesInMetaspace will print a deprecation warning in JDK 15, and in later releases, will print an obsolete warning and no longer have any effect on Metaspace allocation.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              stuefe Thomas Stuefe
              Reporter:
              stuefe Thomas Stuefe
              Reviewed By:
              Coleen Phillimore
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: