diff --git a/jenkins/agent-base/Dockerfile.ubi8 b/jenkins/agent-base/Dockerfile.ubi8 index 92f09d499..42913ab28 100644 --- a/jenkins/agent-base/Dockerfile.ubi8 +++ b/jenkins/agent-base/Dockerfile.ubi8 @@ -10,7 +10,7 @@ ENV SONAR_SCANNER_VERSION=4.7.0.2747 \ HELM_PLUGIN_DIFF_VERSION=3.6.0 \ HELM_PLUGIN_SECRETS_VERSION=4.2.2 \ GIT_LFS_VERSION=2.6.1 \ - JNLP_JAVA_OPTIONS="-XX:+UseG1GC -XX:+ExplicitGCInvokesConcurrent -XX:+ParallelRefProcEnabled -XX:+UseStringDeduplication -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Dsun.zip.disableMemoryMapping=true" + JAVA_GC_OPTS="-XX:+UseParallelGC -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=10 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90" ARG APP_DNS ARG SNYK_DISTRIBUTION_URL diff --git a/jenkins/master/ods-run.sh b/jenkins/master/ods-run.sh index 0697d4573..9b0b572c8 100755 --- a/jenkins/master/ods-run.sh +++ b/jenkins/master/ods-run.sh @@ -99,6 +99,10 @@ if [ -e "${JENKINS_HOME}/plugins" ]; then fi fi +# https://stackoverflow.com/questions/26041117/growing-resident-memory-usage-rss-of-java-process +echo "MALLOC arena fix courtesy stackoverflow" +export MALLOC_ARENA_MAX=4 + echo " " echo "Booting Jenkins ( /usr/libexec/s2i/openshift-run ) ..." echo " " diff --git a/jenkins/ocp-config/deploy/jenkins-master.yml b/jenkins/ocp-config/deploy/jenkins-master.yml index 9f1428910..c94a6a0e9 100644 --- a/jenkins/ocp-config/deploy/jenkins-master.yml +++ b/jenkins/ocp-config/deploy/jenkins-master.yml @@ -17,7 +17,7 @@ parameters: - name: JENKINS_ENABLE_OAUTH value: "true" - name: JENKINS_MEMORY_LIMIT - value: 7Gi + value: 4Gi - name: JENKINS_MEMORY_REQUEST value: 4Gi - name: JENKINS_CPU_LIMIT @@ -27,9 +27,9 @@ parameters: - name: JENKINS_VOLUME_CAPACITY value: 5Gi - name: JENKINS_JAVA_GC_OPTS - value: "-server -XX:NativeMemoryTracking=summary -XX:-UseContainerSupport -XX:MaxRAMPercentage=90 -XX:+UseG1GC -XX:+ExplicitGCInvokesConcurrent -XX:+ParallelRefProcEnabled -XX:+UseStringDeduplication -XX:MaxMetaspaceSize=1g -XX:MetaspaceSize=256M -XX:SoftRefLRUPolicyMSPerMB=1 -XX:+UnlockExperimentalVMOptions -XX:+UnlockDiagnosticVMOptions -XX:G1SummarizeRSetStatsPeriod=1 -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/lib/jenkins" + value: "-XX:+UseParallelGC -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=10 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -XX:MaxMetaspaceSize=1g -XX:MetaspaceSize=256M -Dsun.zip.disableMemoryMapping=true" - name: JENKINS_JAVA_MAX_HEAP_PARAM - value: "-Xms1024m -Xmx4g" + value: "-Xms1024m -Xmx2g" - name: JENKINS_CONTAINER_HEAP_PERCENT value: "1" - name: ODS_NAMESPACE