3

Can I understand when UseCompressedClassPointers is enabled, MaxMetaspace is not relevance and CompressedClassSpaceSize determines the size of the metaspace?.

Because from Oracle doc https://docs.oracle.com/javase/8/docs/technotes/guides/troubleshoot/memleaks002.html (section Exception in thread thread_name: java.lang.OutOfMemoryError: Compressed class space)

  • If the UseCompressedClassPointers is used, the amount of space
    available for class metadata is fixed at the amount
    CompressedClassSpaceSize. If the space needed for
    UseCompressedClassPointers exceeds CompressedClassSpaceSize, a
    java.lang.OutOfMemoryError with detail Compressed class space is
    thrown.

kindly point me to some link that explains what is stored in CompressedClassSpaceSize & Metaspace

null
  • 548
  • 3
  • 14

1 Answers1

3

CompressedClassSpaceSize determines the size of the metaspace

No, it's incorrect. Compressed class space is an memory region inside Metaspace. So MaxMetaspaceSize option always works and limits both Metaspace and inner Compressed class space.
If you try to set CompressedClassSpaceSize greater than MaxMetaspaceSize it will not make an effect.
See Is CompressedClassSpaceSize area contains MaxMetaspaceSize area?
See also https://stuefe.de/posts/metaspace/what-is-metaspace/

Ivan Vakhrushev
  • 340
  • 2
  • 9