Fix server lag: TPS, view distance and giving Java the right RAM

Why Minecraft servers lag, how to measure TPS, and the handful of changes - simulation distance, entity control, pre-generation, memory - that actually fix it.

By Levi Wanner · Updated 25 June 2026 · 10 min read

Server lag and low FPS are two different problems. FPS is your computer drawing frames and has nothing to do with the server. Server lag is the server failing to keep up with the game’s heartbeat: Minecraft runs at 20 ticks per second (TPS), one tick every 50 milliseconds. As long as a tick finishes in under 50 ms you are at a healthy 20 TPS. When ticks take longer - too many mobs, too much redstone, not enough CPU - TPS drops, and everything in the world slows down: mobs stutter, blocks break late, hits do not register.

The good news is that the causes are well understood and a few changes fix the large majority of cases. Work through them in order.

1. Measure first

Do not guess. On a Paper server, type /tps in the console (or in-game as an operator) to see the average over the last 1, 5 and 15 minutes - 20.0 is perfect, below ~18 is noticeable, below 15 is rough. To find WHAT is slow, install the free Spark plugin and run /spark profiler; it produces a shareable report that pinpoints the mod, plugin or entity eating tick time. Five minutes with Spark beats an hour of guessing.

2. Lower simulation distance (the biggest single win)

simulation-distance controls how many chunks around each player actually tick - where mobs think, crops grow, redstone fires and hoppers move items. It scales the server’s workload roughly with the square of the radius, so going from 10 to 6 is not 40% less work, it is more than half. Most players cannot tell the difference between 6 and 10 because distant chunks still render (that is view-distance); they just are not simulated.

Set simulation-distance to 5 or 6 and view-distance to 7 or 8. On Levyathan you can change both in the World tab, which also warns you when a value is high for your RAM. This one step resolves most "my server lags with a few friends" reports.

3. Get entities under control

After distance, entities are the usual culprit. A few patterns cause outsized lag:

  1. 1Mob farms and big animal pens - hundreds of entities in loaded chunks tick every cycle. Light them up, cap breeding, or move them outside simulation range when idle.
  2. 2Item-sorting systems with long hopper chains - hoppers are surprisingly expensive. Reduce them or use a plugin that optimises item movement.
  3. 3Dropped items - a stream of un-picked-up drops adds up. On Paper, lower the merge-radius and the item despawn time in the Paper config.
  4. 4On Paper, the mob spawn limits and ticks-per spawn settings in bukkit.yml / paper-world-defaults let you thin mob density without touching gameplay much.

4. Pre-generate the world

Generating brand-new terrain is one of the heaviest things a server does, and it happens live as players explore the edges of the map. The fix is to generate it ahead of time when nobody is waiting: install the Chunky plugin and run /chunky radius 3000 then /chunky start. It fills in the world up to your border in the background. Combined with a sensible max-world-size, exploration stops causing lag spikes because the chunks already exist.

5. Give Java enough RAM - but not too much

Memory is not a speed dial; past "enough", more does not help and can hurt. A vanilla or lightly-plugged server is happy with 2-4 GB; a busy plugin server wants 4-6 GB; heavy modpacks need 6-10 GB. The trap is over-allocating: a huge heap makes the garbage collector pause longer when it runs, which shows up as periodic stutter. Give the server what it needs for its mods and player count, and no more.

How the memory is collected matters as much as how much there is. The community-standard "Aikar’s flags" tune Java’s G1 garbage collector to do small, frequent cleanups instead of rare long ones, which keeps tick times smooth. Levyathan already launches servers with G1GC tuning, so you get smooth collection without configuring anything - your job is just to pick a sane memory size for the workload.

6. Use Paper (and its config)

If you are on Vanilla and chasing performance, switch to Paper - it is fully compatible with vanilla worlds and is dramatically more efficient, with per-world tuning for spawn limits, redstone, entity activation range and more. For modded servers the equivalent gains come from optimisation mods (Lithium, FerriteCore, and friends), which good modpacks already include.

A quick checklist

  1. 1Measure with /tps and /spark before changing anything.
  2. 2simulation-distance 5-6, view-distance 7-8.
  3. 3Tame mob farms, hopper chains and dropped items.
  4. 4Pre-generate with Chunky and cap the world border.
  5. 5Right-size RAM for the workload - more is not faster.
  6. 6Run Paper (vanilla) or a pack with optimisation mods (modded).