Minecraft server optimization guide

Problems and errors · updated 28 November 2026

Most lag can be fixed without a bigger plan. Make the changes one at a time and check after each one whether things got better. Make a backup before you edit any files.

1. Find out what is lagging

Install the Spark plugin in the Plugins tab and type in the console:

spark tps
spark profiler start

After 2-3 minutes of play, type spark profiler stop. You get a link to a report that shows whether mobs, chunks, redstone or a specific plugin is to blame. A server runs smoothly at 20 TPS with MSPT under 50.

The spark tps command in the console showing Minecraft server TPS and tick times
Output of spark tps and spark profiler start
Tip: not sure how to read the report? Send us the Spark link on Discord and we will help you find what is lagging.

How to read a Spark report

The report opens in your browser. You do not have to understand all of it:

  1. Expand the Server thread. This is the main game thread that does most of the work.
  2. Click the entries with the highest percentage and keep going down.
  3. Look for names you recognise: a plugin or mod name, entity (mobs and items), chunk (loading and generating the world), redstone or hopper.

If one plugin sits at the top with 30% or more, that plugin is the problem. If entities dominate, the problem is farms and mobs (steps 5 and 7).

"Can't keep up!" in the console

You may see this in the console:

Can't keep up! Is the server overloaded? Running 2034ms or 40 ticks behind

The server could not finish its work in time and skipped 40 ticks. A single message at startup or after a teleport is normal. If it shows up every few seconds, the server is overloaded and the steps below are worth going through.

2. Paper or Purpur

Vanilla and Spigot are slow. Switch to Paper or Purpur in the Server software tab (how). This is usually the biggest improvement you can get with one click.

On a Fabric server add the Lithium, FerriteCore and ModernFix mods. On NeoForge and Forge try ModernFix and FerriteCore.

3. View and simulation distance

In server.properties (how to edit it) set:

view-distance=8
simulation-distance=6

view-distance is how far players can see. simulation-distance is how far from players mobs, crops and redstone keep working. Simulation distance has the biggest impact on performance, and players rarely notice when you lower it.

4. Pregenerate the world

Generating new chunks is the heaviest job a server does. Generate the world in advance with the Chunky plugin and set a world border, so the server does not have to do it while people play (how to pregenerate).

5. Mob and item limits (Paper)

In bukkit.yml lower the mob limits:

spawn-limits:
  monsters: 50
  animals: 8
  water-animals: 3
  water-ambient: 10
  ambient: 3

In config/paper-world-defaults.yml these are the settings people change most:

entities:
  spawning:
    despawn-ranges:
      monster:
        hard: 72
        soft: 30
chunks:
  max-auto-save-chunks-per-tick: 8
  entity-per-chunk-save-limit:
    arrow: 16
    experience_orb: 16
    snowball: 8
    item: 64

A lower hard value makes monsters far from players despawn sooner. The limits in entity-per-chunk-save-limit protect you from chunks with thousands of items in them.

6. Merging items (spigot.yml)

In spigot.yml, under world-settings > default:

merge-radius:
  item: 3.5
  exp: 4.0
entity-activation-range:
  animals: 16
  monsters: 24
  misc: 8

Items and experience orbs lying next to each other merge into one, and mobs far from players do less work.

7. Farms and redstone

Big mob farms, redstone clocks and hundreds of animals in one place can use more power than the rest of the server put together. Spark shows you where they are. Agree on limits with your players, for example no more than 30 animals in a pen, and remove abandoned farms.

8. Plugins

Remove plugins you do not use and keep the rest up to date. Avoid plugins that keep clearing items from the ground or promise to "optimize RAM". They usually just move the problem somewhere else.

9. Daily restart

Restart the server once a day, ideally at night. You can schedule it in the Schedules tab (how).

What not to do

  • Do not lower view-distance below 6. Players will notice and the gain is small.
  • Do not set mob limits to 0. Mobs will stop spawning and players' farms will stop working.
  • Do not install several "lag clearing" plugins at once. They conflict with each other and with Paper's own settings.
  • Do not change ten things at once. One change at a time makes it easy to see what helped and what broke something.

When you need a bigger plan

If TPS still drops with many players online after these steps, and memory is constantly full, the server needs more resources. Check how much RAM you need. You can upgrade the plan in the Settings tab.

Frequently asked questions

Will more RAM fix lag?

Not always. Lag usually comes from CPU load caused by mobs, chunks and plugins. More RAM only helps when memory is running out.

Players see less after I lowered view-distance.

Set view-distance a bit higher (for example 10) and only lower simulation-distance. Players still see far, and the server does less work.

What is TPS?

Ticks per second, the number of game "steps" per second. A healthy server runs at 20 TPS. When it drops, the game slows down, mobs jump around and blocks appear with a delay.