Skip to content

Instantly share code, notes, and snippets.

@toriato
Last active June 19, 2024 09:13
Show Gist options
  • Save toriato/ae0118d070ab780575ce6b4152b3db5d to your computer and use it in GitHub Desktop.
Save toriato/ae0118d070ab780575ce6b4152b3db5d to your computer and use it in GitHub Desktop.
#!/bin/zsh
PATH="/usr/lib/jvm/java-21-openjdk/bin/:$PATH" \
java \
-Xms24G -Xmx24G \
\
--add-modules=jdk.incubator.vector \
\
-XX:+UnlockExperimentalVMOptions \
-XX:+UseLargePages -XX:+UseTransparentHugePages \
\
`# https://wiki.openjdk.org/display/zgc` \
`# https://docs.oracle.com/en/java/javase/21/gctuning/z-garbage-collector.html` \
`# https://krusic22.com/2020/03/25/higher-performance-crafting-using-jdk11-and-zgc/` \
-XX:-UseParallelGC -XX:-UseG1GC \
-XX:+UseZGC -XX:+ZGenerational \
-XX:MaxNewSize=30 \
-XX:SurvivorRatio=32 \
\
-XX:+AlwaysPreTouch \
-XX:+DisableExplicitGC \
-XX:+PerfDisableSharedMem \
\
`# https://bugs.openjdk.org/browse/JDK-8267186` \
-XX:+UseStringDeduplication \
\
-Dusing.aikars.flags=https://mcflags.emc.gs \
-Daikars.new.flags=true \
-Djava.awt.headless=true \
\
-jar purpur-1.21-2235.jar \
--world-container worlds \
nogui
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment