You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/jvm/api/module.yaml
+14-8Lines changed: 14 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -14,13 +14,22 @@ envs:
14
14
description: User specified Java options to be appended to generated options in JAVA_OPTS.
15
15
example: "-Dsome.property=foo"
16
16
- name: JAVA_MAX_MEM_RATIO
17
-
description: Is used when no `-Xmx` option is given in **JAVA_OPTS**. This is used to calculate a default maximal heap memory based on a containers restriction. If used in a container without any memory constraints for the container then this option has no effect. If there is a memory constraint then `-Xmx` is set to a ratio of the container available memory as set here. The default is `50` which means 50% of the available memory is used as an upper boundary. You can skip this mechanism by setting this value to `0` in which case no `-Xmx` option is added.
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`.
18
+
example: "90.0"
18
19
- name: JAVA_INITIAL_MEM_RATIO
19
-
description: Is used when no `-Xms` option is given in **JAVA_OPTS**. This is used to calculate a default initial heap memory based on the maximum heap memory. If used in a container without any memory constraints for the container then this option has no effect. If there is a memory constraint then `-Xms` is set to a ratio of the `-Xmx` memory as set here. The default is `25` which means 25% of the `-Xmx` is used as the initial heap size. You can skip this mechanism by setting this value to `0` in which case no `-Xms` option is added.
20
-
example: "25"
20
+
description:
21
+
Specify the initial heap memory. Corresponds to the JVM argument
22
+
`-XX:InitialRAMPercentage`. By default this is not specified.
23
+
**This is deprecated and will be removed in a future release. Users should
24
+
specify `-XX:InitialRAMPercentage` directly in JAVA_OPTS instead.**
25
+
example: "25.0"
21
26
- name: JAVA_MAX_INITIAL_MEM
22
-
description: Is used when no `-Xms` option is given in **JAVA_OPTS**. This is used to calculate the maximum value of the initial heap memory. If used in a container without any memory constraints for the container then this option has no effect. If there is a memory constraint then `-Xms` is limited to the value set here. The default is 4096MB which means the calculated value of `-Xms` never will be greater than 4096MB. The value of this variable is expressed in MB.
23
-
example: "4096"
27
+
description:
28
+
This value is passed through to the `-Xms` Java option, setting both the
29
+
minimum and initial heap size. By default this is unset.
30
+
**This is deprecated and will be removed in a future release. Users should
31
+
specify `-Xms` directly in JAVA_OPTS instead.**
32
+
example: "4096m"
24
33
- name: JAVA_DIAGNOSTICS
25
34
description: Set this to get some diagnostics information to standard output when things are happening. **Note:** This option, if set to true, will set `-XX:+UnlockDiagnosticVMOptions`. **Disabled by default.**
26
35
example: "true"
@@ -30,9 +39,6 @@ envs:
30
39
- name: JAVA_DEBUG_PORT
31
40
description: Port used for remote debugging. Defaults to *5005*.
32
41
example: "8787"
33
-
- name: CONTAINER_MAX_MEMORY
34
-
description: Memory limit given to the container.
35
-
example: "1024"
36
42
- name: GC_MIN_HEAP_FREE_RATIO
37
43
description: Minimum percentage of heap free after GC to avoid expansion.
Given s2i build https://github.com/jboss-openshift/openshift-quickstarts from undertow-servlet
10
-
Then s2i build log should contain Using MAVEN_OPTS -XX:+UseParallelGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90
11
-
And container log should contain -XX:+UseParallelGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90
7
+
Given container is started as uid 1000
8
+
Then container log should contain -XX:+UseParallelGC
9
+
And container log should contain -XX:MinHeapFreeRatio=10
10
+
And container log should contain -XX:MaxHeapFreeRatio=20
11
+
And container log should contain -XX:GCTimeRatio=4
Given s2i build https://github.com/jboss-openshift/openshift-quickstarts from undertow-servlet
14
+
Given container is started with env
15
15
| variable | value |
16
16
| GC_MIN_HEAP_FREE_RATIO | 5 |
17
-
Then s2i build log should contain Using MAVEN_OPTS -XX:+UseParallelGC -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90
18
-
And container log should contain -XX:+UseParallelGC -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90
17
+
Then container log should contain -XX:MinHeapFreeRatio=5
Given s2i build https://github.com/jboss-openshift/openshift-quickstarts from undertow-servlet
20
+
Given container is started with env
22
21
| variable | value |
23
22
| GC_MAX_HEAP_FREE_RATIO | 50 |
24
-
Then s2i build log should contain Using MAVEN_OPTS -XX:+UseParallelGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=50 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90
25
-
And container log should contain -XX:+UseParallelGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=50 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90
23
+
Then container log should contain -XX:MaxHeapFreeRatio=50
26
24
27
25
Scenario: Check GC_TIME_RATIO GC configuration
28
-
Given s2i build https://github.com/jboss-openshift/openshift-quickstarts from undertow-servlet
26
+
Given container is started with env
29
27
| variable | value |
30
28
| GC_TIME_RATIO | 5 |
31
-
Then s2i build log should contain Using MAVEN_OPTS -XX:+UseParallelGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=5 -XX:AdaptiveSizePolicyWeight=90
32
-
And container log should contain -XX:+UseParallelGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=5 -XX:AdaptiveSizePolicyWeight=90
29
+
Then container log should contain -XX:GCTimeRatio=5
Given s2i build https://github.com/jboss-openshift/openshift-quickstarts from undertow-servlet
32
+
Given container is started with env
36
33
| variable | value |
37
34
| GC_ADAPTIVE_SIZE_POLICY_WEIGHT | 80 |
38
-
Then s2i build log should contain Using MAVEN_OPTS -XX:+UseParallelGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=80
39
-
And container log should contain -XX:+UseParallelGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=80
35
+
Then container log should contain -XX:AdaptiveSizePolicyWeight=80
Given s2i build https://github.com/jboss-openshift/openshift-quickstarts from undertow-servlet
38
+
Given container is started with env
43
39
| variable | value |
44
40
| GC_MAX_METASPACE_SIZE | 120 |
45
-
Then s2i build log should contain Using MAVEN_OPTS -XX:+UseParallelGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -XX:MaxMetaspaceSize=120m
46
-
And container log should contain -XX:+UseParallelGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -XX:MaxMetaspaceSize=120m
41
+
Then container log should contain -XX:MaxMetaspaceSize=120m
0 commit comments