Skip to main content

Java Docker Images & JVM Arguments


Reference: https://github.com/Mukul1127/Minecraft-Performance-Flags-Benchmark

If you are on Java 11+17 (>=1.12)17+) we recommend the following arguments under JVM ARGUMENTS
-XX:+UseShenandoahGCUseZGC -XX:AllocatePrefetchStyle=1 -XX:-ZProactive

If you are on Java 11/16 (1.12-1.16) we recommend the following arguments
-XX:+UseG1GC -XX:MaxGCPauseMillis=130 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:+UseStringDeduplication -Dfml.ignorePatchDiscrepancies=true -Dfml.ignoreInvalidMinecraftCertificates=trueG1NewSizePercent=28 -XX:-OmitStackTraceInFastThrowG1HeapRegionSize=16M -XX:+OptimizeStringConcatG1ReservePercent=20 -Dfml.readTimeout=180XX:G1MixedGCCountTarget=3 -XX:InitiatingHeapOccupancyPercent=10 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=0 -XX:SurvivorRatio=32 -XX:MaxTenuringThreshold=1 -XX:G1SATBBufferEnqueueingThresholdPercent=30 -XX:G1ConcMarkStepDurationMillis=5.0 -XX:G1ConcRefinementServiceIntervalMillis=150 -XX:G1ConcRSHotCardLimit=16 -XX:AllocatePrefetchStyle=3

If you are on Java 8 (<1.12) we recommend the following arguments under JVM ARGUMENTS
-XX:+UnlockExperimentalVMOptions -XX:+UnlockDiagnosticVMOptions -XX:+AlwaysActAsServerClassMachine -XX:+ParallelRefProcEnabled -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:+UseStringDeduplicationPerfDisableSharedMem -Dfml.ignorePatchDiscrepancies=trueXX:+AggressiveOpts -Dfml.ignoreInvalidMinecraftCertificates=trueXX:+UseFastAccessorMethods -XX:MaxInlineLevel=15 -XX:MaxVectorSize=32 -XX:+UseCompressedOops -XX:ThreadPriorityPolicy=1 -XX:+UseDynamicNumberOfGCThreads -XX:NmethodSweepActivity=1 -XX:ReservedCodeCacheSize=350M -XX:-OmitStackTraceInFastThrowDontCompileHugeMethods -XX:MaxNodeLimit=240000 -XX:NodeLimitFudgeFactor=8000 -XX:+OptimizeStringConcat -Dfml.readTimeout=180UseFPUForSpilling

Full default forced arguments (can't be modified)
java -Xmx{{SERVER_MEMORY}}M {{JVM_ARGS}} -Dterminal.jline=false -Dterminal.ansi=true -jar server.jar
image.png

Java Docker Images
image.png