一次上线因为使用protostuff的序列化与反序列化导致Metaspace区域的class一直增长,从而导致metaspace区域full gc,以致服务很卡顿。
提供以下方法查看metaspace相关情况
jstat -gcmetacapacity 9536
MCMN MCMX MC CCSMN CCSMX CCSC YGC FGC FGCT GCT
0.0 1060864.0 12800.0 0.0 1048576.0 1536.0 21 0 0.000 1.589
Metaspace size statistics.
MCMN: Minimum metaspace capacity (kB).
MCMX: Maximum metaspace capacity (kB).
MC: Metaspace capacity (kB).
CCSMN: Compressed class space minimum capacity (kB).
CCSMX: Compressed class space maximum capacity (kB).
YGC: Number of young generation GC events.
FGC: Number of full GC events.
FGCT: Full garbage collection time.
GCT: Total garbage collection time.
jstat -gc 9536
提供以下方法查看metaspace相关情况
jstat -gcmetacapacity 9536
MCMN MCMX MC CCSMN CCSMX CCSC YGC FGC FGCT GCT
0.0 1060864.0 12800.0 0.0 1048576.0 1536.0 21 0 0.000 1.589
Metaspace size statistics.
MCMN: Minimum metaspace capacity (kB).
MCMX: Maximum metaspace capacity (kB).
MC: Metaspace capacity (kB).
CCSMN: Compressed class space minimum capacity (kB).
CCSMX: Compressed class space maximum capacity (kB).
YGC: Number of young generation GC events.
FGC: Number of full GC events.
FGCT: Full garbage collection time.
GCT: Total garbage collection time.
jstat -gc 9536