CAUTION: This site hosts draft documentation for the next release. For published content of the latest release, visit www.eclipse.org/openj9/docs

-XX:InitialRAMPercentage / -XX:MaxRAMPercentage

These Oracle HotSpot options can be used to specify the initial and maximum size of the Java heap as a percentage of the total memory available to the VM. The options are recognized by OpenJ9 and provided for compatibility.

Syntax

Setting Effect
-XX:InitialRAMPercentage=N Set initial heap size as a percentage of total memory
-XX:MaxRAMPercentage=N Set maximum heap size as a percentage of total memory
Where N is a value between 0 and 100, which can be of type "double". For example, 12.3456.

Note: If you set a value for -Xms, these options are ignored.

If your application is running in a container and you have specified -XX:+UseContainerSupport, both the default heap size for containers, the -XX:InitialRAMPercentage option, and the -XX:MaxRAMPercentage option are based on the available container memory.