简体   繁体   中英

Metaspace and Garbage Collections

I'm having a few issues with the Metaspace filling up and I'm trying to figure out how GCs work over it. I have read here that minor GCs increment the usage of the Metaspace. I have been reading the literature around it as well and I haven't been able to reach a proper conclusion.

Does anyone have a good explanation of how the GCs (both minor and major) affect the Metaspace?

@Tavo Metaspace has replaced permgen in JDK1.8 The idea here was to get rid of OutOfMemoryError situations by letting the metaspace increase to the max available physical memory on the machine. But if your application has leaks its now your responsibility to debug this issue.

Fortunately, the jdk comes with a tool Mission Control (jmc.exe) that lets you record the events on JVM. You can they analyze which classloaders are not unloaded. Please explore JMC. You can find more information here: https://docs.oracle.com/javase/8/docs/technotes/guides/troubleshoot/tooldescr002.html#BABIBBDE

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM