"The server is lagging" can mean three very different things: low TPS (the server cannot keep up with the game), high ping (the network path is slow) or client FPS (the player's own computer). This guide focuses on the first one, which is the one you can actually fix on the server.
1. Measure before you change anything
Install spark, the de facto profiler for Minecraft servers, and run it during a laggy moment:
/spark tps
/spark profiler start --timeout 120
The report tells you exactly which plugin, entity or chunk is eating your tick time. Every other step below is a guess until you have this data.
2. Use Paper or Purpur, not vanilla
Vanilla is fine for five friends. For anything bigger, Paper (or its fork Purpur) rewrites the hottest code paths, fixes long-standing bugs and exposes dozens of performance knobs. Switching is a drop-in replacement of the server jar.
3. Lower the simulation distance
view-distance controls what players see, simulation-distance controls what the server ticks. Keeping the second one low is the single biggest win on busy servers.
# server.properties
view-distance=10
simulation-distance=6
4. Give Java the right flags
More RAM is not always better: a huge heap makes garbage collection pauses longer. Start with 6-10 GB for a modded server and use the well-known Aikar flags with G1GC:
java -Xms8G -Xmx8G -XX:+UseG1GC -XX:+ParallelRefProcEnabled \
-XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions \
-XX:+DisableExplicitGC -XX:G1NewSizePercent=30 \
-jar paper.jar --nogui
Set -Xms and -Xmx to the same value so the heap never resizes mid-game.
5. Pre-generate the world
Generating new chunks is the most expensive thing a server does. Pre-generate a border with a plugin like Chunky before you open the doors, then lock the world border to that size.
6. Tame entities and redstone
Mob farms with hundreds of entities and clocks that tick every game tick are the usual suspects in a spark report. Paper's entity limits and per-chunk caps let you keep farms working without letting them take the server down.
7. Pick hardware that matches the game
Minecraft's main thread is single-threaded. A CPU with high clock speed beats one with many slow cores, and dedicated cores beat shared ones because the tick loop hates being preempted. That is why our game servers run on high-frequency CPUs with NVMe storage and in-house DDoS protection tuned for game traffic.
A 20 TPS server on a modest plan beats a 12 TPS server on a huge one. Optimise first, scale second.
Quick checklist
- spark installed and a profile taken during lag
- Paper or Purpur instead of vanilla
- simulation distance at 6 or lower
- fixed heap size with G1GC flags
- world pre-generated and bordered
If you have done all of this and the server still struggles, send us your spark link in a ticket. Our team reads them every day and will tell you what to change next.
