Skip to content

Instantly share code, notes, and snippets.

@toinouH
Last active August 18, 2020 17:34
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save toinouH/42d592dbbfa25471af93578f393cd028 to your computer and use it in GitHub Desktop.
Save toinouH/42d592dbbfa25471af93578f393cd028 to your computer and use it in GitHub Desktop.
Flags recommanded for Yatopia with zgc
java -Xms8G -Xmx10G -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:-UseParallelGC -XX:-UseParallelOldGC -XX:-UseG1GC -XX:+UseZGC -jar server.jar -nogui
# So whenever you stop it it doesn't go kaboom
PAUSE
# If you notice degraded performance, higher CPU usage, more memory commits/uncommits, setting the following flag might help you: -XX:-ZUncommit
# If your run a jdk more recent than the jdk 14 (fore eg 15 or 16 or +) use that flag to start your server: -DPaper.IgnoreJavaVersion=true
# If you want the gui remove this flag: nogui
# YOU MUST CHANGE Xms AND Xmx DEPENDING OF YOUR SYSTEM; it is better to have a -Xms 20% lower than the value of Xmx.
# To log GC to a file add the following flag: -Xlog:gc*:logs/gc.log:time,uptime:filecount=2,filesize=8M
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment