Java 8 Metaspace - Avoid decrease

591 views Asked by At

I've got a short question due to Metaspace in Java 8. I know that I can set an initial size with the -XX:MetaspaceSize - Parameter. But I wonder if it's possible to configure that this value will be the minimum size.

My target is to prevent Full GCs due to Metaspace sizing. Usually 512 MB should be enough Metaspace for my application, but this value can differ over runtime. If more than 512 MB are needed (which should not happen) a Full GC can't be avoided, that's clear.

Regards, Mathias

1

There are 1 answers

0
the8472 On BEST ANSWER

Setting MaxMetaspaceFreeRatio=100 should prevent it from shrinking