Stutters, delays when breaking blocks, mobs that "teleport" around – almost always the cause is low TPS. The good news: most performance problems on a Minecraft server can be greatly reduced with the right server software, proper JVM flags and a few config values. This guide walks you through finding and fixing the causes step by step.

What is TPS – and why is my server lagging?

TPS stands for Ticks per Second. A Minecraft server calculates the world 20 times per second – so the target is 20 TPS. If the value drops below that, the world runs slower than real time: the server "hangs".

Just as important is MSPT (Milliseconds per Tick) – how long the server takes for one tick. At 20 TPS you have 50 ms per tick. Values consistently above 50 ms mean lag.

ValueMeaning
20 TPS / < 40 ms MSPTEverything optimal
18–20 TPSLight load, usually fine
< 18 TPSNoticeable lag – find the cause
< 10 TPSServer struggling, act urgently
Tip
Check current performance in-game with /tps and /mspt (available on Paper and its forks). That's always the first step when troubleshooting lag.

Step 1: Choose the right server software

The biggest performance jump often comes simply from switching server software. Vanilla and Spigot are significantly slower than modern forks:

SoftwareRecommendation
VanillaPurists only – barely optimized
SpigotBetter than Vanilla, but dated
PaperRecommended standard – fast & compatible
Purpur / PufferfishPaper forks with even more tuning options

For most servers, Paper is the best choice: high plugin compatibility and noticeably better performance than Spigot.

Step 2: Java version & memory

Modern Minecraft versions require an up-to-date Java version:

  • Minecraft 1.17–1.20.4 → Java 17
  • Minecraft 1.20.5 and newer → Java 21

For RAM the rule is: as much as needed, not as much as possible. Over-allocating memory lengthens garbage collection pauses and can actually cause more lag.

Info
Set -Xms and -Xmx to the same value (e.g. both 4 GB). That way the JVM doesn't constantly grow/shrink the heap, which avoids stutters.

A rough RAM guideline (without large modpacks):

PlayersRecommended RAM
1–52–3 GB
5–154–6 GB
15–406–10 GB
Modpacks8 GB and up

Step 3: Aikar's Flags – the optimal JVM startup parameters

The default JVM settings aren't ideal for Minecraft. Aikar's Flags are a proven set of startup parameters that tune the garbage collector (G1GC) to minimize lag spikes. Add them as your server's startup parameters (example for 4 GB):

java -Xms4G -Xmx4G --add-modules=jdk.incubator.vector -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -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 -jar server.jar --nogui

Adjust -Xms and -Xmx to your RAM. From 12 GB upwards, also change these values:

-XX:G1NewSizePercent=40
-XX:G1MaxNewSizePercent=50
-XX:G1HeapRegionSize=16M
-XX:G1ReservePercent=15
-XX:InitiatingHeapOccupancyPercent=20
Info
Don't copy "miracle flags" from random forums. Many outdated or aggressive combinations do more harm than good. Aikar's Flags are the tested standard.

Step 4: Find the causes of poor TPS

Don't guess – measure. The spark plugin shows you exactly what's slowing the server down:

  1. Install spark as a plugin
  2. Run /spark profiler start and let it run for a few minutes
  3. Run /spark profiler stop – you get a link with a detailed breakdown

This immediately shows whether entities, a specific plugin or world generation is causing the load.

Step 5: Common lag causes & fixes

CauseFix
Too many entities (mob farms, items)Lower mob limits, check item despawn
View/simulation distance too highReduce in server.properties
Redstone & hopper machinesLimit the count, use hopper alternatives
Too many or bad pluginsRemove unused ones, check with spark
Chunks generated on the flyPre-generate the world with Chunky
Too little/too much RAMMatch allocation to player count

Step 6: Fine-tune server.properties & Paper config

Two values in server.properties have the biggest effect:

view-distance=8
simulation-distance=6
  • view-distance = how far players can see. 10 is default; 8 saves a lot of load with barely any visible difference.
  • simulation-distance = how far away the world actively "ticks" (mobs, growth). 6 is a good compromise.

In the Paper configuration (config/paper-world-defaults.yml), a lower mob-spawn-range and adjusted entity activation range also help – verify the values against spark.

Info
After changing startup parameters or config files, restart the server in the client area for them to take effect.

Quick checklist

  1. Use Paper (instead of Vanilla/Spigot)
  2. Pick the correct Java version (17 or 21)
  3. -Xms = -Xmx, match RAM to player count
  4. Set Aikar's Flags as startup parameters
  5. Measure with /tps and spark instead of guessing
  6. Lower view-distance and simulation-distance
  7. Pre-generate the world with Chunky

With these steps you'll get the most out of your server. If your current machine is permanently at its limit, the only remaining fix is more power – then it's worth looking at a more powerful game server.