Question

How would I check the settings to see how much memory java is allowed to consume?

how would I check the settings to see how much memory it is allowed to consume?

Subscribe
Share

I used

free -m


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

You can configure the maximum size of Java’s memory allocation pool by passing the -Xmx flag to the Java process, e.g. -Xmx2048m. If you are running a Java-based service like Tomcat, this is often configured in the init script as part of the JAVA_OPTS environmental variable. Though different services will do this in different ways. Without knowing more about what you are running, it’s hard to give a more specific answer.