Установка JAVA_OPTS из файла docker в виде:
FROM registry.access.redhat.com/jboss-webserver-3/webserver30-tomcat7-openshift
2 USER root
3 ENV JAVA_OPTS="-Xms1024m -Xmx2048m"
4 ADD ./setenv.sh /opt/webserver/bin/setenv.sh
5 RUN sed -i -- 's/# export JAVA_OPTS/export JAVA_OPTS="-Xms1024m -Xmx2048m"/g' /opt/webserver/bin/startup.sh
6 ADD ./abc.war $JBOSS_HOME/opt/webserver/webapps/abc.war
7 EXPOSE 8080 8888
при запуске контейнера выделенная память выбирается согласно JAVA_OPTS, только для немедленной переопределения, как показано ниже: Окончательная выделенная куча равна 50 % памяти модуля всегда, независимо от JAVA_OPTS (это 2048, если максимальная память pod равна 4 ГБ ... / это 400 означает максимальную память pod 800 ..) MaxRamFraction равно 4, хотя я не уверен, что все факторы может повлиять на это. Как я могу отладить это дальше?
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
2020-04-06 15:59:22,714 [main] INFO org.apache.catalina.startup.VersionLoggerListener- Command line argument: -Xms1024m
2020-04-06 15:59:22,714 [main] INFO org.apache.catalina.startup.VersionLoggerListener- Command line argument: -Xmx2048m
2020-04-06 15:59:22,714 [main] INFO org.apache.catalina.startup.VersionLoggerListener- Command line argument: -Xms1024m
2020-04-06 15:59:22,714 [main] INFO org.apache.catalina.startup.VersionLoggerListener- Command line argument: -Xmx2048m
2020-04-06 15:59:22,714 [main] INFO org.apache.catalina.startup.VersionLoggerListener- Command line argument: -XX:MaxPermSize=256m
2020-04-06 15:59:22,714 [main] INFO org.apache.catalina.startup.VersionLoggerListener- Command line argument: -Djava.library.path=/opt/webserver/lib
2020-04-06 15:59:22,714 [main] INFO org.apache.catalina.startup.VersionLoggerListener- Command line argument: -Djava.security.egd=file:/dev/./urandom
2020-04-06 15:59:22,714 [main] INFO org.apache.catalina.startup.VersionLoggerListener- Command line argument: -javaagent:/opt/jolokia/jolokia.jar=config=/opt/jolokia/etc/jolokia.properties
2020-04-06 15:59:22,714 [main] INFO org.apache.catalina.startup.VersionLoggerListener- Command line argument: -Xms400m
2020-04-06 15:59:22,714 [main] INFO org.apache.catalina.startup.VersionLoggerListener- Command line argument: -Xmx400m
2020-04-06 15:59:22,714 [main] INFO org.apache.catalina.startup.VersionLoggerListener- Command line argument: -XX:+UseParallelGC
2020-04-06 15:59:22,714 [main] INFO org.apache.catalina.startup.VersionLoggerListener- Command line argument: -XX:MinHeapFreeRatio=20
2020-04-06 15:59:22,715 [main] INFO org.apache.catalina.startup.VersionLoggerListener- Command line argument: -XX:MaxHeapFreeRatio=40
2020-04-06 15:59:22,715 [main] INFO org.apache.catalina.startup.VersionLoggerListener- Command line argument: -XX:GCTimeRatio=4
2020-04-06 15:59:22,715 [main] INFO org.apache.catalina.startup.VersionLoggerListener- Command line argument: -XX:AdaptiveSizePolicyWeight=90
2020-04-06 15:59:22,715 [main] INFO org.apache.catalina.startup.VersionLoggerListener- Command line argument: -XX:MaxMetaspaceSize=100m
2020-04-06 15:59:22,715 [main] INFO org.apache.catalina.startup.VersionLoggerListener- Command line argument: -XX:ParallelGCThreads=1
2020-04-06 15:59:22,715 [main] INFO org.apache.catalina.startup.VersionLoggerListener- Command line argument: -Djava.util.concurrent.ForkJoinPool.common.parallelism=1
2020-04-06 15:59:22,715 [main] INFO org.apache.catalina.startup.VersionLoggerListener- Command line argument: -XX:CICompilerCount=2
2020-04-06 15:59:22,715 [main] INFO org.apache.catalina.startup.VersionLoggerListener- Command line argument: -XX:+ExitOnOutOfMemoryError
2020-04-06 15:59:22,715 [main] INFO org.apache.catalina.startup.VersionLoggerListener- Command line argument: -Djava.endorsed.dirs=/opt/webserver/endorsed
2020-04-06 15:59:22,715 [main] INFO org.apache.catalina.startup.VersionLoggerListener- Command line argument: -Dcatalina.base=/opt/webserver
2020-04-06 15:59:22,715 [main] INFO org.apache.catalina.startup.VersionLoggerListener- Command line argument: -Dcatalina.home=/opt/webserver
2020-04-06 15:59:22,715 [main] INFO org.apache.catalina.startup.VersionLoggerListener- Command line argument: -Djava.io.tmpdir=/opt/webserver/temp
2020-04-06 15:59:22,715 [main] INFO org.apache.catalina.core.AprLifecycleListener- Loaded APR based Apache Tomcat Native library 1.1.32 using APR version 1.4.8.
2020-04-06 15:59:22,715 [main] INFO org.apache.catalina.core.AprLifecycleListener- APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].