79772183

Date: 2025-09-23 03:24:15
Score: 2
Natty:
Report link

Right after this documentation section:

-XX:MaxMetaspaceSize=size option

Advanced Garbage Collection Options for Java

-XX:MaxMetaspaceSize=size

Sets the maximum amount of native memory that can be allocated for class metadata. By default, the size isn't limited. The amount of metadata for an application depends on the application itself, other running applications, and the amount of memory available on the system.

The following example shows how to set the maximum class metadata size to 256 MB:

-XX:MaxMetaspaceSize=256m


In contrast, according to this documentation:

-XX:MaxMetaspaceSize=size setting

Setting Description
-XX:MaxPermSize Maximum size of the permanent generation.

The maximum perm size should be set to 1024 Megabytes.

In addition, according to this documentation: Java SE 6 HotSpot[tm] Virtual Machine Garbage Collection Tuning

Permanent Generation Size

The permanent generation does not have a noticeable impact on garbage collector performance for most applications. However, some applications dynamically generate and load many classes; for example, some implementations of JavaServer Pages (JSP) pages. These applications may need a larger permanent generation to hold the additional classes. If so, the maximum permanent generation size can be increased with the command-line option -XX:MaxPermSize=<N>.

For a relevant read, see: What does -XX:MaxPermSize do?

Reasons:
  • Blacklisted phrase (1): this document
  • Long answer (-1):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Self-answer (0.5):
Posted by: DevQt