Java 8 uses metaspace that is capable of expanding dynamically. GC will run on metaspace when its getting full. Does that mean GC will never run on metaspace?
My Java 8 application is using a LOT of memory. I would like to know what is the size of my metaspace at the run time. How do I do that?
I am thinking of setting MaxMetaspaceSize
. What should I set it to? Any recommendations?
Yes, it is better to set
MaxMetaspaceSize
if you think it is leaky to monitor and fix it.