JVM series---【How to determine the frequency of FullGC?】

How to determine the frequency of FullGC?

1. Check how many times FullGC has occurred since the program was running

#查看进程号pid,还能查看jvm启动参数
jps -v
#查看fullgc,5000代表每隔5s打印一次
jstat -gc pid 5000 

S0C:第一个幸存区的大小
S1C:第二个幸存区的大小
S0U:第一个幸存区的使用大小
S1U:第二个幸存区的使用大小
EC:伊甸园区的大小
EU:伊甸园区的使用大小
OC:老年代大小
OU:老年代使用大小
MC:方法区大小
MU:方法区使用大小
CCSC:压缩类空间大小
CCSU:压缩类空间使用大小
YGC:年轻代垃圾回收次数
YGCT:年轻代垃圾回收消耗时间
FGC:老年代垃圾回收次数
FGCT:老年代垃圾回收消耗时间
GCT:垃圾回收消耗总时间,单位s

2. Check how long the program has been running

ps -eo pid,tty,user,comm,lstart,etime | grep pid

3. Calculate the frequency of FullGC

Continuous running time/FullGC times=30.5/5=6.1
Calculated from this, FullGC occurs about 6.1 days.

Guess you like

Origin blog.csdn.net/weixin_44988127/article/details/131630590