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)
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With