-
Enhancement
-
Resolution: Done
-
Major
-
JWS31 1.2.5.GA , JWS50 1.0.0.GA
-
None
Cloned from https://issues.jboss.org/browse/CLOUD-2286 , which implements the feature for openjdk and other images by adding the GC_CONTAINER_OPTIONS env:
Would be good to allow users to change the garbage collector when using the webserver images . Adding a different collector via JAVA_OPTS_APPEND does not take effect.
Currently the garbage collector is set in this script with no option to change it:
https://github.com/jboss-openshift/cct_module/blob/1.0/os-java-run/added/java-default-options#L121
gc_config() {
local minHeapFreeRatio=${GC_MIN_HEAP_FREE_RATIO:-20}
local maxHeapFreeRatio=${GC_MAX_HEAP_FREE_RATIO:-40}
local timeRatio=${GC_TIME_RATIO:-4}
local adaptiveSizePolicyWeight=${GC_ADAPTIVE_SIZE_POLICY_WEIGHT:-90}
local maxMetaspaceSize=${GC_MAX_METASPACE_SIZE:-100}
echo "-XX:+UseParallelGC " \
"-XX:MinHeapFreeRatio=${minHeapFreeRatio} "\
"-XX:MaxHeapFreeRatio=${maxHeapFreeRatio} "\
"-XX:GCTimeRatio=${timeRatio} "\
"-XX:AdaptiveSizePolicyWeight=${adaptiveSizePolicyWeight} "\
"-XX:MaxMetaspaceSize=${maxMetaspaceSize}m"
}
error_handling() {
echo "-XX:+ExitOnOutOfMemoryError"
}
initialize_container_limits > /dev/null
## Echo options, trimming trailing and multiple spaces
echo "$(initial_memory) $(max_memory) $(gc_config) $(diagnostics) $(cpu_core_tunning) $(error_handling)" | awk '$1=$1'
- clones
-
CLOUD-2286 Ability to change the garbage collector in Java S2I image
-
- Closed
-
- relates to
-
CLOUD-2997 [tracker] [JWS31] Sprint 25 release
-
- Closed
-
-
CLOUD-2998 [tracker] [JWS50] Sprint 25 release
-
- Closed
-