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
+8-14Lines changed: 8 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -14,22 +14,13 @@ 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: 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"
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.
19
18
- name: JAVA_INITIAL_MEM_RATIO
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"
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"
26
21
- name: JAVA_MAX_INITIAL_MEM
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"
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"
33
24
- name: JAVA_DIAGNOSTICS
34
25
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.**
35
26
example: "true"
@@ -39,6 +30,9 @@ envs:
39
30
- name: JAVA_DEBUG_PORT
40
31
description: Port used for remote debugging. Defaults to *5005*.
41
32
example: "8787"
33
+
- name: CONTAINER_MAX_MEMORY
34
+
description: Memory limit given to the container.
35
+
example: "1024"
42
36
- name: GC_MIN_HEAP_FREE_RATIO
43
37
description: Minimum percentage of heap free after GC to avoid expansion.
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
9
+
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
Given s2i build https://github.com/jboss-openshift/openshift-quickstarts from undertow-servlet
15
15
| variable | value |
16
16
| GC_MIN_HEAP_FREE_RATIO | 5 |
17
-
Then container log should contain -XX:MinHeapFreeRatio=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
Given s2i build https://github.com/jboss-openshift/openshift-quickstarts from undertow-servlet
21
22
| variable | value |
22
23
| GC_MAX_HEAP_FREE_RATIO | 50 |
23
-
Then container log should contain -XX:MaxHeapFreeRatio=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
24
26
25
27
Scenario: Check GC_TIME_RATIO GC configuration
26
-
Given container is started with env
28
+
Given s2i build https://github.com/jboss-openshift/openshift-quickstarts from undertow-servlet
27
29
| variable | value |
28
30
| GC_TIME_RATIO | 5 |
29
-
Then container log should contain -XX:GCTimeRatio=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
Given s2i build https://github.com/jboss-openshift/openshift-quickstarts from undertow-servlet
33
36
| variable | value |
34
37
| GC_ADAPTIVE_SIZE_POLICY_WEIGHT | 80 |
35
-
Then container log should contain -XX:AdaptiveSizePolicyWeight=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
Given s2i build https://github.com/jboss-openshift/openshift-quickstarts from undertow-servlet
39
43
| variable | value |
40
44
| GC_MAX_METASPACE_SIZE | 120 |
41
-
Then container log should contain -XX:MaxMetaspaceSize=120m
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
0 commit comments