mirror of
https://github.com/google/nomulus
synced 2026-08-20 14:16:19 +00:00
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:
+4
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user