This is an automated email from the ASF dual-hosted git repository.

zhoubo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/rocketmq-connect.git


The following commit(s) were added to refs/heads/master by this push:
     new 46daf22c reduce default memory usage and drop PermSize config for jdb 
1.8+ (#305)
46daf22c is described below

commit 46daf22cf7ea1fa44e74d7458b833184a24d5066
Author: Fan Lin <[email protected]>
AuthorDate: Wed Sep 7 15:02:50 2022 +0800

    reduce default memory usage and drop PermSize config for jdb 1.8+ (#305)
---
 distribution/bin/runconnect.sh | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/distribution/bin/runconnect.sh b/distribution/bin/runconnect.sh
index 78ffe964..6caa5438 100644
--- a/distribution/bin/runconnect.sh
+++ b/distribution/bin/runconnect.sh
@@ -87,13 +87,16 @@ export LANG=en_US.UTF-8
 # JVM Parameters Configuration
 
#===========================================================================================
 
-JAVA_OPT="${JAVA_OPT} -server -Xms8g -Xmx8g -XX:PermSize=128m 
-XX:MaxPermSize=320m"
+JAVA_OPT="${JAVA_OPT} -server -Xms2g -Xmx2g"
 JAVA_OPT="${JAVA_OPT} -XX:+UseG1GC -XX:G1HeapRegionSize=16m 
-XX:G1ReservePercent=25 -XX:InitiatingHeapOccupancyPercent=30 
-XX:SoftRefLRUPolicyMSPerMB=0 -XX:SurvivorRatio=8 -XX:+DisableExplicitGC"
 JAVA_OPT="${JAVA_OPT} -verbose:gc"
 JAVA_OPT="${JAVA_OPT} -XX:-OmitStackTraceInFastThrow"
 JAVA_OPT="${JAVA_OPT} -XX:+AlwaysPreTouch"
 JAVA_OPT="${JAVA_OPT} -XX:MaxDirectMemorySize=10g"
 JAVA_OPT="${JAVA_OPT} -XX:-UseLargePages -XX:-UseBiasedLocking"
+if [[ $(check_java_version "$JAVA" "1.8") == "false" ]]; then
+  JAVA_OPT="${JAVA_OPT} -XX:PermSize=128m -XX:MaxPermSize=320m"
+fi
 if [[ $(check_java_version "$JAVA" "9") == "false" ]]; then
   JAVA_OPT="${JAVA_OPT} -Xloggc:/dev/shm/mq_gc_%p.log -XX:+PrintGCDetails 
-XX:+PrintGCDateStamps -XX:+PrintGCApplicationStoppedTime 
-XX:+PrintAdaptiveSizePolicy"
   JAVA_OPT="${JAVA_OPT} -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 
-XX:GCLogFileSize=30m"

Reply via email to