How to determine the ideal size for an Metaspace for java 8

Viewed 18480

We are migrating our web application from Java 7 to Java 8. We had defined the PermSize jvm param arguments.

Since Java 8 will ignore this parameters, this are none of use. Metaspace is introduced in Java 8 and default size of it is unlimited(limited to physical memory) with dynamic growth.

My question is do I need to figure out the best values for my web application for metaspace jvm params or default will be a good idea to use?

Update:

More on my web application: My web application is based on struts and spring frameworks. It usually takes 4k requests/min. This application is deployed on tomcat 8.5 and it does not host any other web application. But, there are multiple tomcat instances running on same virtual machine. The current -Xms and -Xmx values are set to 1g.

3 Answers

Holger is right. It's clearly documented here, I may just quote it here.

-XX:MetaspaceSize=size Sets the size of the allocated class metadata space that will trigger a garbage collection the first time it is exceeded. This threshold for a garbage collection is increased or decreased depending on the amount of metadata used. The default size depends on the platform.

direct quote but the emphasis is mine ;)

Related