What is the default value of MetaspaceSize for 64-bit servers? I couldn't find it in the official documentation.
I'm observing that in a server JVM process, at times, the GC frequency becomes high and keeps growing. If I restart the service a few times, it returns to stable. I think its due to the JRE upgrade.
JVM Heap max size is set to be 6GB but when this problem occurs, we see only 3GB heap being used. Metaspace grows by very little and is almost always full. I tried increasing the metaspace to 1GB and it improves the throughput.
I think what is happening is Metaspace by default is set to a very low value and thus GC kicks in. High water mark is continuously increased(again by a very low amount) every time a GC occurs.
I want to set the MetaspaceSize (not sure what is the current value).
Oracle docs say there are no guidelines to know what to set MetaspaceSize to. But is there a way to find out what would be the correct value to set it to?
One hint I got from Oracle docs is this:
If the committed space available for class metadata as a percentage of the total committed space for class metadata is greater than MaxMetaspaceFreeRatio, then the high-water mark will be lowered. If it is less than MinMetaspaceFreeRatio, then the high-water mark will be raised.
But still not able to figure out how to stabilize the GCs..I have three questions:
- What is the default MetaspaceSize on 64 bit servers?
- What are the default ratios: MaxMetaspaceFreeRatio, MinMetaspaceFreeRatio set to? Answer: It shows Min is 40, Max is 70
- How to go about deciding oon a Metaspacesize value?