Skip to content

Commit 6b9c560

Browse files
authored
Merge pull request #337 from jmtd/OPENJDK-559-MaxRAMPercentage-default
[Openjdk-559] max ram percentage default
2 parents 8806a2e + 1cd54a7 commit 6b9c560

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

modules/jvm/api/module.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ envs:
1414
description: User specified Java options to be appended to generated options in JAVA_OPTS.
1515
example: "-Dsome.property=foo"
1616
- name: JAVA_MAX_MEM_RATIO
17-
description: Specify the maximum heap memory. Corresponds to the JVM argument `-XX:MaxRAMPercentage`. The default is `80.0` which means 80% of the available memory. You can disable this mechanism by setting the value to `0`.
17+
description: Specify the maximum heap memory. Corresponds to the JVM argument `-XX:MaxRAMPercentage`. The default is `50.0` which means 50% of the available memory. You can disable this mechanism by setting the value to `0`.
1818
example: "90.0"
1919
- name: JAVA_INITIAL_MEM_RATIO
2020
description:

modules/jvm/bash/artifacts/opt/jboss/container/java/jvm/java-default-options

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ max_memory() {
2525
if [ "x$JAVA_MAX_MEM_RATIO" = "x0" ]; then
2626
return
2727
fi
28-
echo "-XX:MaxRAMPercentage=${JAVA_MAX_MEM_RATIO:-80.0}"
28+
echo "-XX:MaxRAMPercentage=${JAVA_MAX_MEM_RATIO:-50.0}"
2929
}
3030

3131
# Check for memory options and calculate a sane default if not given

tests/features/java/memory.feature

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ Feature: OPENJDK-559 JVM Memory tests
33
@ubi8
44
Scenario: Check default JVM max heap configuration
55
Given container is started as uid 1000
6-
Then container log should contain -XX:MaxRAMPercentage=80.0
6+
Then container log should contain -XX:MaxRAMPercentage=50.0
7+
And container log should not contain -Xmx
78

89
@ubi8
910
Scenario: Check configured JVM max heap configuration

0 commit comments

Comments
 (0)