From bca05f39821ce4a9325becc01b1b12e10b066667 Mon Sep 17 00:00:00 2001 From: Juan Celhay Date: Fri, 13 Feb 2026 16:16:57 -0500 Subject: [PATCH] Set heap size flags in nomulus start script (#2956) * Set heap size flags in nomulus start script * Add comment for flags --- jetty/start.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jetty/start.sh b/jetty/start.sh index 8cb50abe0..87e73fbb2 100755 --- a/jetty/start.sh +++ b/jetty/start.sh @@ -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