Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jstat -gcmetatcapacity output MCMX values seems to be irrelevant

Tags:

java

java-8

jstat

I am running a jvm (java 8) with parameters "-XX:MetaspaceSize=256M and -XX:MaxMetaspaceSize=256M". When I execute "jstat -gcmetacapacity <PID>", it outputs,

  MCMN       MCMX        MC       CCSMN      CCSMX       CCSC     YGC   FGC    FGCT     GCT   
       0.0  1157120.0   122880.0        0.0  1048576.0    14336.0   499     5    1.131   12.653

I would expect both MCMN and MCMX to be 256M.

This looks similar to bug http://bugs.java.com/bugdatabase/view_bug.do?bug_id=8077987. But it has been closed with documentation fix for MC. I am hoping it is jstat bug and java configuration is correct. Is there another way to confirm this?

Java version

java version "1.8.0_92"
Java(TM) SE Runtime Environment (build 1.8.0_92-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.92-b14, mixed mode)
like image 594
nitzien Avatar asked Nov 08 '22 13:11

nitzien


1 Answers

Yes, that bug was simply closed in error, since the -gcmetacapacity jstat command doesn't report anything useful at all if it doesn't respect/report the limits imposed upon the JVM via the -XX:MetaspaceSize and -XX:MaxMetaspaceSize parameters. The entire jstat command exists to report on the effective behavior of the specific JVM instance, not on some theoretic limits that might exist in your environment. The theoretic maximum capacity for the metaspace is completely irrelevant to everybody, as is the theoretic minimum capacity of 0.

like image 88
volkerk Avatar answered Nov 15 '22 07:11

volkerk