Issue Description
With the introduction of Java 8, permgen space is no longer used. Instead, Metaspace is introduced. Although Metaspace is expanded automatically, there might be a scenario when you do want to set a cap. Question is, if you do want to set them, what values should you try initially?
-XX:MetaspaceSize=
-XX:MaxMetaspaceSize=
Resolution
Much has been documented by Oracle and also on internet blogs on what this feature is and how you want to set these properties.
Here are just some examples of helpful links to understand how it works.
Linux options including all the Metaspace specific ones: https://docs.oracle.com/javase/8/docs/technotes/tools/unix/java.html#BABHDABI
Garbage collection tuning: https://docs.oracle.com/javase/8/docs/technotes/guides/vm/gctuning/considerations.html
Memory leaks. https://docs.oracle.com/javase/8/docs/technotes/guides/troubleshoot/memleaks002.html
Update: 2023/10/16 As per new installation guide:
Remove the default memory settings, and add a new line with the recommended JAVA_OPTS.
For example, you might remove the following default settings, then add the recommended settings on a new line.
-Xms64m -Xmx512m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m
We recommend that you do not set MaxMetaspaceSize.
Ref. Case 00068527
Recommended Comments
There are no comments to display.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now