-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 Eclipse OpenJ9™ and provided for compatibility.
||Set initial heap size as a percentage of total memory|
||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.
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.