What is the Metadata GC Threshold and how do I tune it?

前端 未结 2 1936
后悔当初
后悔当初 2020-12-01 00:36

In an application I have the following -verbose:gc

[GC (Metadata GC Threshold)  8530310K->2065630K(31574016K), 0.3831399 secs]
[Full GC (Meta         


        
2条回答
  •  情书的邮戳
    2020-12-01 01:22

    While there is already an accepted answer, wanted to mention that there is also :

    -XX:MaxMetaspaceSize= where is the maximum amount of space to be allocated for class metadata (in bytes).

    Also from here,

    Garbage collection of the dead classes and classloaders is triggered once the class metadata usage reaches the “MaxMetaspaceSize”.

    There is a list of available options in this post.

提交回复
热议问题