Skip to content

Commit

Permalink
feat(jvm): update jvm for jdk17
Browse files Browse the repository at this point in the history
  • Loading branch information
halibobo1205 committed Jul 24, 2024
1 parent fda215f commit cf285ca
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
14 changes: 8 additions & 6 deletions gradle/java-tron.vmoptions
Original file line number Diff line number Diff line change
@@ -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
-XX:+UseCodeCacheFlushing
-XX:MetaspaceSize=256m
-XX:MaxMetaspaceSize=512m
-XX:MaxDirectMemorySize=1g
-XX:+HeapDumpOnOutOfMemoryError
11 changes: 6 additions & 5 deletions start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit cf285ca

Please sign in to comment.