Java 8 Metaspace - Avoid Downgrading

I have a short question because of Metaspace in Java 8. I know that I can set the initial size with -XX: MetaspaceSize - Parameter. But I'm wondering if it can be tweaked to keep this value as low as possible.

My goal is to prevent Full GC from being used due to the size of the metaprocess. Usually 512MB should be enough Metaspace for my application, but this value may differ from runtime. If more than 512MB is required (which it shouldn't be), full GC cannot be avoided, which is clear

Regards, Mathias

+3


source to share


1 answer


Setting MaxMetaspaceFreeRatio=100

should prevent compression



+3


source







All Articles