Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

memory malloc arena fix - 4.x #1217

Merged
merged 6 commits into from
Mar 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion jenkins/agent-base/Dockerfile.ubi8
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions jenkins/master/ods-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 " "
Expand Down
6 changes: 3 additions & 3 deletions jenkins/ocp-config/deploy/jenkins-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down