4 ms·
Yeah, don't do that. Run SpigotMC under Java 8 with the following flags: -d64 (force a 64-bit data model, although usually this isn't necessary) -server (use
by xenophonf 12y ago
Yeah, don't do that. Run SpigotMC under Java 8 with the following flags:
-d64 (force a 64-bit data model, although usually this isn't necessary)
-server (use the server-optimized JVM instead of the desktop-optimized one, again, may not be necessary)
-Xmx1G (start with this heap memory limit and increase if necessary)
-XX:+UseConcMarkSweepGC (for multithreaded GC)
-XX:+CMSIncrementalMode (only use on computers that support 1 or 2 hardware threads)
-XX:+AggressiveOpts (enables additional JVM optimizations)
There's a ton of bad advice out there when it comes to JVM configuration and Minecraft. The above comes from my understanding of this somewhat dated Java GC tuning guide (http://www.oracle.com/technetwork/java/gc-tuning-6-140523.html http://www.oracle.com/technetwork/java/gc-tuning-6-140523.ht...) and sk89q's excellent Minecraft server tuning guide (http://www.sk89q.com/2013/03/improving-your-minecraft-servers-performance/ http://www.sk89q.com/2013/03/improving-your-minecraft-server...), coupled with small-scale server profiling on my part.
- needusername 12y agoI though that -XX:+AggressiveOpts is a noop these days.
- xenophonf 12y agoIt depends on the JVM release. On my Windows 8.1 laptop running 1.8.0_31,this flag increases AutoBoxCacheMax from 128 to 20000 (which affects autoboxing and collections performance), and it lowers BiasedLockingStartupDelay from 20000 to 500 (which can effect multithreaded access to shared data - see http://www.oracle.com/technetwork/java/tuning-139912.html#section4.2.5 http://www.oracle.com/technetwork/java/tuning-139912.html#se... for more details). It isn't strictly necessary, but if you're trying to squeeze every possible drop of performance out of your Minecraft server, the experimental optimizations aren't a bad thing to enable. I will admit to doing only informal performance testing when it comes to the AggressiveOpts flag.
- josephwilk 12y agoThats really helpful, thanks! Will give it a try.