Difference between revisions of "Java in a Container"

From NovaOrdis Knowledge Base
Jump to: navigation, search
(Internal)
(Overview)
(One intermediate revision by the same user not shown)
Line 14: Line 14:
 
=Overview=
 
=Overview=
  
When running java in a container, the max heap should always be set with -Xmx, based on the application needs and the container limits.  
+
When running java in a container, the max heap should always be explicitly set with -Xmx, based on the application needs and the container limits.  
  
 
Java max heap limit can also be calculated based on the container limits.  
 
Java max heap limit can also be calculated based on the container limits.  
  
Generic script that correlates JVM memory settings to the container limits:
+
Generic script that correlates JVM memory settings to the container limits: https://github.com/fabric8io-images/run-java-sh, https://github.com/fabric8io-images/run-java-sh/blob/master/fish-pepper/run-java-sh/fp-files/run-java.sh.
* https://github.com/fabric8io-images/run-java-sh
+
* https://github.com/fabric8io-images/run-java-sh/blob/master/fish-pepper/run-java-sh/fp-files/run-java.sh
+

Revision as of 23:53, 5 November 2019

External

Internal

Overview

When running java in a container, the max heap should always be explicitly set with -Xmx, based on the application needs and the container limits.

Java max heap limit can also be calculated based on the container limits.

Generic script that correlates JVM memory settings to the container limits: https://github.com/fabric8io-images/run-java-sh, https://github.com/fabric8io-images/run-java-sh/blob/master/fish-pepper/run-java-sh/fp-files/run-java.sh.