CDS should split Klass- from non-Klass metadata

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Unresolved
    • Priority: P4
    • None
    • Affects Version/s: 27
    • Component/s: hotspot

      CDS-archived metadata are loaded into the narrow Klass encoding range at startup. However, these metadata contain both Klass structures and non-Klass data.

      Storing all of this data within the nKlass encoding range becomes problematic for huge archives, since the encoding space is limited by design to 4GB.

      The typical ratio in size between non-Klass data and Klass data is huge - 5:1 .. 7:1. For spring petclinic, for example, it's 7:1.

      So, we waste an estimated 70..>80% of encoding space on stuff that does not need encoding.

      The conventional metaspace (that also uses the encoding space) for this very reason splits Klass from non-Klass data, and it only stores Klass data in the encoding space.

      We should do the same for CDS and AOT. That would drastically increase the number of classes that can be stored in CDS and AOT.

      See also discussion here: https://github.com/openjdk/jdk/pull/29494

            Assignee:
            Unassigned
            Reporter:
            Thomas Stuefe
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: