Details
-
Sub-task
-
Status: Closed
-
Major
-
Resolution: Done
-
None
-
None
-
None
Description
In a OLAP session cluster, a TM need to frequently create new classloaders and generate new classes. These classes will be accumulated in metaspace. When metaspace data usage reaches a threshold, a FullGC with a long time Stop-the-World will be triggered. Currently, both SerialGC, ParallelGC and G1GC are doing Stop-the-World class unloading. Only ZGC supports concurrent class unload, see more in https://bugs.openjdk.org/browse/JDK-8218905.
In our scenario, a class unloading for a 2GB metaspace with 5million classes will stop the application more than 40 seconds. After switch to ZGC, the maximum STW of the application has been reduced to less than 10ms.