yu199195 commented on code in PR #3924:
URL: https://github.com/apache/shenyu/pull/3924#discussion_r964437013
##########
shenyu-dist/shenyu-bootstrap-dist/src/main/resources/bin/start.sh:
##########
@@ -31,16 +31,21 @@ LOG_FILES=${LOGS_DIR}/shenyu-bootstrap.log
EXT_LIB=${DEPLOY_DIR}/ext-lib
CLASS_PATH=.:${DEPLOY_DIR}/conf:${DEPLOY_DIR}/lib/*:${EXT_LIB}/*
-JAVA_OPTS=" -server -Xmx2g -Xms2g -Xmn1g -Xss512k -XX:+DisableExplicitGC
-XX:LargePageSizeInBytes=128m"
-
-version=`java -version 2>&1 | sed '1!d' | sed -e 's/"//g' | awk '{print $3}'`
-echo "current jdk version:${version}"
-if [[ "$version" =~ "1.8" ]];then
-JAVA_OPTS="${JAVA_OPTS} -XX:+UseFastAccessorMethods -XX:+UseConcMarkSweepGC
-XX:+CMSParallelRemarkEnabled -XX:+UseCMSInitiatingOccupancyOnly
-XX:CMSInitiatingOccupancyFraction=70"
-elif [[ "$version" =~ "11" ]];then
-JAVA_OPTS="${JAVA_OPTS}"
-elif [[ "$version" =~ "17" ]];then
-JAVA_OPTS="${JAVA_OPTS}"
+if [ -z "${SHENYU_BOOTSTRAP_JAVA_OPTS}" ]; then
+ JAVA_OPTS=" -server -Xmx2g -Xms2g -Xmn1g -Xss512k -XX:+DisableExplicitGC
-XX:LargePageSizeInBytes=128m"
+ version=`java -version 2>&1 | sed '1!d' | sed -e 's/"//g' | awk '{print
$3}'`
+ echo "current jdk version:${version}"
+ if [[ "$version" =~ "1.8" ]];then
+ JAVA_OPTS="${JAVA_OPTS} -XX:+UseFastAccessorMethods
-XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled
-XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=70"
+ elif [[ "$version" =~ "11" ]];then
+ JAVA_OPTS="${JAVA_OPTS}"
+ elif [[ "$version" =~ "17" ]];then
+ JAVA_OPTS="${JAVA_OPTS}"
+ fi
+ echo "Use default jvm param: $JAVA_OPTS"
+else
+ JAVA_OPTS=${SHENYU_BOOTSTRAP_JAVA_OPTS}
Review Comment:
where from ${SHENYU_BOOTSTRAP_JAVA_OPTS}?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]