diff --git a/gradle/java-tron.vmoptions b/gradle/java-tron.vmoptions index e994a332740..17cc5e8909c 100644 --- a/gradle/java-tron.vmoptions +++ b/gradle/java-tron.vmoptions @@ -1,7 +1,9 @@ --XX:+UseConcMarkSweepGC --XX:+PrintGCDetails --Xloggc:./gc.log --XX:+PrintGCDateStamps --XX:+CMSParallelRemarkEnabled +-Xmx9G +-XX:+UseZGC +-Xlog:gc*:file=gc-%t.log:time,uptime,level,tags:filecount=50,filesize=100M -XX:ReservedCodeCacheSize=256m --XX:+CMSScavengeBeforeRemark \ No newline at end of file +-XX:+UseCodeCacheFlushing +-XX:MetaspaceSize=256m +-XX:MaxMetaspaceSize=512m +-XX:MaxDirectMemorySize=1g +-XX:+HeapDumpOnOutOfMemoryError \ No newline at end of file diff --git a/start.sh b/start.sh index 89f13cf25a7..1099f3d0675 100644 --- a/start.sh +++ b/start.sh @@ -355,11 +355,12 @@ startService() { exit fi - nohup $JAVACMD -Xms$JVM_MS -Xmx$JVM_MX -XX:+UseConcMarkSweepGC -XX:+PrintGCDetails -Xloggc:./gc.log \ - -XX:+PrintGCDateStamps -XX:+CMSParallelRemarkEnabled -XX:ReservedCodeCacheSize=256m -XX:+UseCodeCacheFlushing \ - -XX:MetaspaceSize=256m -XX:MaxMetaspaceSize=512m \ - -XX:MaxDirectMemorySize=$MAX_DIRECT_MEMORY -XX:+HeapDumpOnOutOfMemoryError \ - -XX:NewRatio=2 -jar \ + nohup $JAVACMD -Xms$JVM_MS -Xmx$JVM_MX \ + -XX:+UseZGC \ + -Xlog:gc*:file=gc-%t.log:time,uptime,level,tags:filecount=50,filesize=100M \ + -XX:ReservedCodeCacheSize=256m -XX:+UseCodeCacheFlushing \ + -XX:MetaspaceSize=256m -XX:MaxMetaspaceSize=512m \ + -XX:MaxDirectMemorySize=$MAX_DIRECT_MEMORY -XX:+HeapDumpOnOutOfMemoryError \ $JAR_NAME $FULL_START_OPT >>start.log 2>&1 & checkPid echo "info: start java-tron with pid $pid on $HOSTNAME"