Skip to content

Commit

Permalink
[Docker] Limit JVM memory for AMS in docker (apache#899)
Browse files Browse the repository at this point in the history
* limit jvm memory for ams in docker

* Add GC log for ams

* Add GC log file rotation
  • Loading branch information
HuangFru authored Dec 9, 2022
1 parent 122c1d8 commit c7b543c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion dist/src/main/arctic-bin/bin/ams.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ XMX=$XMX_CONFIG
XMS=$XMS_CONFIG
MAX_PERM=$MAX_PERM_CONFIG

JAVA_OPTS="-server -Xms${XMS}m -Xmx${XMX}m -XX:MaxPermSize=${MAX_PERM}m \
JAVA_OPTS="-server -Xloggc:$ARCTIC_HOME/logs/gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=10M \
-Xms${XMS}m -Xmx${XMX}m -XX:MaxPermSize=${MAX_PERM}m \
-verbose:gc -XX:+PrintGCDetails \
-Dcom.sun.management.jmxremote \
-Dcom.sun.management.jmxremote.ssl=false \
Expand Down
4 changes: 2 additions & 2 deletions docker/ams/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@


if [ -z "$XMX_CONFIG" ]; then
XMX_CONFIG="8196"
XMX_CONFIG="2048"
fi

if [ -z "$XMS_CONFIG" ]; then
XMS_CONFIG="1024"
XMS_CONFIG="2048"
fi

if [ -z "$MAX_PERM_CONFIG" ]; then
Expand Down

0 comments on commit c7b543c

Please sign in to comment.