Game servers

Optimising a Minecraft server: less lag, more TPS

What TPS means, how to find what causes lag with spark, the start command Paper recommends, view distances and pre-generating the world.

3 min readUpdated on 6 October 2026Minecraft

A Minecraft server computes the world 20 times per second: these are the TPS (ticks per second). When it cannot keep up, TPS drop below 20 and everything goes in slow motion: blocks take longer to break, mobs jump around, farms fail. That is server lag, which is not the same as ping (your connection).

1. Measure before changing anything

Recent Paper versions ship with spark built in (on older ones, install it as a plugin):

  • /spark tps: TPS and MSPT (milliseconds each tick takes). Below 50 ms you have headroom; above 50, TPS start to drop.
  • /spark profiler start and, after a few minutes with people playing, /spark profiler stop: you get a link to a report of what eats the time (a plugin, a farm, entities...).

If the console often shows Can't keep up! Is the server overloaded?, the server is falling behind. At start-up it is normal; if it is constant, read on and also check your VPS's usage.

2. Use Paper, not the official server

Paper (or forks such as Purpur) fixes many of the Mojang server's performance problems without changing the game. If you play with mods (Fabric, Forge, NeoForge), Paper is not an option; on Fabric, the Lithium mod helps a lot.

3. The recommended start command

Paper's documentation recommends the so-called Aikar's flags, which tune how Java frees memory to avoid stutters. For an 8 GB Linux VPS (6.5 GB for Minecraft):

java -Xms6500M -Xmx6500M -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 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true -jar paper.jar --nogui

Change only the first two values to match your memory (how to work it out). If you will give it more than 12 GB, Paper's documentation tweaks a few values: use its start-script generator.

More RAM is not more speed. Minecraft does nearly all its work on a single CPU core. Beyond the memory it needs, more does not raise TPS.

4. Lower the distances

In server.properties:

  • simulation-distance: how far the world "runs" around each player (mobs, crops, redstone). It is the heaviest one: 6 to 8 suits almost everything.
  • view-distance: how far players see. 8 to 10 is a good balance.

5. Pre-generate the world

Generating new terrain while people explore is one of the heaviest jobs, especially with elytra. With the Chunky plugin you generate it in advance, ideally when nobody is on:

/worldborder set 10000
/chunky radius 5000
/chunky start

The border stops terrain being generated beyond what you pre-generated.

6. What usually causes lag

  • Too many entities: huge farms, crowded animals, items lying on the ground.
  • Looping redstone: clocks that never stop.
  • Heavy or badly written plugins: the spark report tells you which.
  • A world that was not pre-generated with many players exploring at once.

If after all this the VPS's CPU is still at 100% with people playing, the server has outgrown its plan: upgrade it without migrating anything.

Related articles

Back to the help centre

Can’t find what you need?

Open a ticket from your panel and we will answer in under 5 minutes.