Minecraft Server Performance Optimization: A Paper & Purpur Guide (2026)
How to tune Paper and Purpur Minecraft servers: why the tick loop is single-threaded, how to read MSPT, and Aikar's JVM garbage collection flags.
In this guide
1. Understanding Minecraft Server Bottlenecks: Tick Loop & CPU Single-Thread Limits
The Minecraft server runs its game logic in a single-threaded loop (the main tick loop). Every 50 milliseconds it has to process tile entities, mob AI, redstone, player movement, chunk generation and network packets to hold 20 ticks per second (TPS).
When the main tick takes longer than 50ms (MSPT > 50.0), the server drops ticks, producing visible rubberbanding, delayed block breaking, and desynchronized combat. Paper and Purpur move world saving, chunk generation and authentication off the main thread, but game logic stays single-threaded. That is why high single-core clock speed matters more than a high core count with low clock speeds.
- Always measure MSPT (Milliseconds Per Tick) rather than just TPS. A server at 20 TPS could have an MSPT of 48ms, meaning it is only 2ms away from lagging.
- Use the built-in Spark profiler (
/spark profiler start) to pinpoint exactly which plugin, entity type, or coordinate is consuming tick time.
2. Aikar's G1GC JVM Flags
Untuned garbage collection (GC) can pause the main thread long enough to cause visible stutter. Aikar's flags tune Java's Garbage-First (G1) collector for shorter, more frequent pauses, which suits a server that has to finish a tick every 50 ms.
java -Xms8G -Xmx8G -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true -jar server.jar nogui