Set heap size flags in nomulus start script (#2956)

* Set heap size flags in nomulus start script

* Add comment for flags
This commit is contained in:
Juan Celhay
2026-02-13 21:16:57 +00:00
committed by GitHub
parent 763630bca5
commit bca05f3982
+4 -1
View File
@@ -22,12 +22,15 @@ find . -maxdepth 1 -type d -name "console-*" -exec rm -rf {} +
cd /jetty-base
echo "Running ${env}"
PROFILER_ARGS=""
# # Use the CONTAINER_NAME variable from Kubernetes YAML to set Cloud profiler args, enable it only in frontend and console.
# Use the CONTAINER_NAME variable from Kubernetes YAML to set Cloud profiler args, enable it only in frontend and console.
case "${CONTAINER_NAME}" in
"frontend"|"console")
PROFILER_ARGS="-agentpath:/opt/cprof/profiler_java_agent.so=-cprof_service=${CONTAINER_NAME},-cprof_enable_heap_sampling=true"
esac
java $PROFILER_ARGS \
# Allocate bigger than default fraction of available memory to the application, as it's running in a (single-purposed) container.
-XX:InitialRAMPercentage=50.0 \
-XX:MaxRAMPercentage=50.0 \
-Dgoogle.registry.environment=${env} \
-Djava.util.logging.config.file=/logging.properties \
-jar /usr/local/jetty/start.jar