Skip to main content

Reducing Server Lag

Server lag usually shows up as a drop in TPS (ticks per second). A healthy server runs at 20 TPS; anything lower means the server can't keep up. Here are the most effective ways to bring it back up.

Use a Performance-Focused Server Software

If you're running Vanilla or Spigot, switch to Paper. It's fully compatible with Spigot plugins and includes a huge number of performance improvements out of the box.

Tune Your Distances

Lowering view-distance and especially simulation-distance in server.properties is one of the biggest wins for a busy server. See Changing Max Players & View Distance.

Pre-generate Your World

Generating new terrain on the fly is a common source of lag spikes. Use Chunky to generate your world in advance.

Audit Your Plugins & Mods

Poorly optimised or unused plugins are one of the most common causes of lag. Remove anything you don't need, keep the rest updated, and use a profiler to find the worst offenders.

Watch Your Entities

Large numbers of mobs, dropped items, and especially mob farms can grind a server down. Paper lets you cap entities per chunk in paper-world-defaults.yml, and clearing lag with a plugin can help in emergencies.

Don't Over-allocate RAM

More memory isn't always better, and allocating far more than your server needs can lead to longer pauses. Give it enough to run comfortably and use optimized JVM startup flags (commonly called Aikar's flags) to keep memory pauses short.

tip

Guessing at the cause of lag wastes time. Install spark to measure exactly what's slowing your server down. See Profiling Lag with spark.