Java in Containers Recipes
IBM and Semeru Java in Containers Recipe
- Review the general Java recipe for your
JVM. The highlights are to tune the maximum heap size (
-Xmxor-XX:MaxRAMPercentage), the maximum nursery size (-Xmn) and enable verbose garbage collection and review its output with the GCMV tool. - In general, tune
-XX:MaxRAMPercentageand-XX:InitialRAMPercentageinstead of-Xmxand-Xms, respectively, to allow for more flexibility with sizing of containers at the host level. Default values depend on any container memory limit. - Consider using
-XX:+ClassRelationshipVerifierto improve start-up time. - If using Semeru Java >= 11 and memory in the pod is limited, consider using the remote JITServer on available platforms to avoid potential throughput issues.
- Review and test different CPU limits. Steady state requirements may be different from startup requirements, particularly due to JIT compilation (unless using JITServer).
For details, see the Java J9 in Containers chapter.