Skip to content
9MinecraftServer.com home Search servers
EN

Translate this page

Sign up free
Run your server

How to fix Minecraft server lag

Most Minecraft server lag is low TPS, and you fix it by profiling with spark first, then cutting the cost it points to: too many loaded chunks, new terrain generation, entities, redstone or a bad plugin.

For server ownersUpdated 7 min read

Quick answer
  • Check TPS first with /spark tps. Below 20 TPS (over 50 ms per tick) is server lag; 20 TPS with rubber-banding is a network or client problem.
  • Run /spark profiler start --timeout 300 during lag and fix whatever the report shows at the top.
  • The usual fixes: lower simulation distance, pre-generate with Chunky, cap entities per chunk, and switch redstone to ALTERNATE_CURRENT on Paper.

The real Minecraft server lag fix is to measure before you change anything: run /spark tps to see whether the server is actually falling behind, then /spark profiler to see exactly what it's spending time on. Once you know the cause, the fix is usually one of five things: fewer ticked chunks, a pre-generated world, fewer entities, cheaper redstone, or removing a plugin. Guessing is how owners end up with 16 GB of RAM and the same lag.

Which lag is it? TPS vs ping vs FPS

Players say "lag" for three different problems, and only one of them is fixed on the server.

What players seeWhat it isWhere to fix it
Everyone: blocks reappear after mining, mobs freeze then jump, furnaces slow down, day cycle crawlsLow TPS. The server can't finish its 20 ticks per second.This guide.
One player: rubber-banding, delayed chat, hits not landing, while others are fineHigh ping or packet loss between that player and the server.Their connection or route. See our timed out guide.
One player: choppy picture, but the world behaves normallyLow FPS on their computer.Their graphics settings, render distance, shaders.
Everyone, but only when joining or exploring new landChunk generation or loading.Pre-generation, below.

So "minecraft server lagging only for me" is almost always ping or FPS, not TPS. Ask them to press F3: if their FPS is fine, run /spark ping to compare their latency with everyone else's.

50 msThe time budget for each server tick. At 20 TPS, every tick has to finish in 50 milliseconds or the next one starts late.

Step one: measure with spark

spark is the profiler Paper bundles (since 1.21), and it's available as a plugin or mod for other server software. The spark docs list every command. This is the workflow:

  1. Check the numbers. /spark tps shows TPS and MSPT (milliseconds per tick) over recent windows, plus CPU use. MSPT under 50 means the server keeps up. Watch the max, not just the average: the spark docs point out that decent averages can hide ticks taking 300 ms or more.
  2. Profile during lag. When players complain, run /spark profiler start --timeout 300. It samples for five minutes and uploads a report link.
  3. Catch spikes separately. If the server stutters every few minutes but is fine otherwise, use /spark profiler start --only-ticks-over 100. It records only ticks slower than 100 ms, so the spikes aren't averaged away.
  4. Read the report top-down. Open the Server thread and expand the largest percentages. Plugin names appear in the tree; so do entity ticking, chunk loading and world generation.
  5. Check memory too. /spark health and /spark gc show whether garbage collection pauses line up with the stutters.

Lower view and simulation distance

These two lines in server.properties decide how much of the world the server holds and ticks around every player. Both default to 10 on Java Edition (minecraft.wiki).

view-distance

How many chunks are sent to players so they can see them. Costs memory and bandwidth.

simulation-distance

How many chunks around each player actually tick: mobs move, crops grow, redstone runs. Costs CPU every tick.

Simulation distance is the big lever. Every step down removes a whole ring of ticking chunks around every player. A widely used community optimization guide suggests starting around view-distance=7 and simulation-distance=4 on busy survival servers. Farms stop working when no player is close, so tell your players if you drop it far.

Pre-generate the world with Chunky

Generating new terrain is one of the most expensive things a server does. When five players with elytras fly in five directions, the server builds fresh chunks all at once and TPS falls. The fix is to generate the world ahead of time, inside a border, with Chunky.

  1. Set a world border. /worldborder center 0 0, then /worldborder set 10000. The number is the border's full width, so this gives 5,000 blocks in each direction.
  2. Match Chunky to it. /chunky worldborder copies the border's center and radius.
  3. Start. /chunky start. Check with /chunky progress. Use /chunky pause and /chunky continue around busy hours.
  4. Repeat per dimension. /chunky world world_nether switches worlds. The Nether border can be smaller, since one Nether block is eight Overworld blocks.

Run it when nobody is online if you can. It's heavy work while it runs, and it's worth it: after this, exploring only loads chunks, which is far cheaper than generating them.

Entities, farms, villagers and lag machines

If the profiler shows entity ticking at the top, you have too many mobs, items or villagers in loaded chunks. Paper lets you cap that in config/paper-world-defaults.yml. These are real keys from the Paper world configuration reference:

KeyDefaultWhat it does
entities.spawning.entity-per-chunk-save-limit-1 (no limit)Caps how many of an entity type are saved per chunk. Add entries like arrow: 16 or experience_orb: 16 to stop projectile and orb pile-ups.
entities.spawning.max-entity-collisions8How many collisions each entity processes per tick. Lower it for dense mob farms.
entities.spawning.per-player-mob-spawnstrueSpreads the mob cap per player, so one AFK farm can't eat everyone's spawns.
entities.spawning.alt-item-despawn-ratedisabledLets junk like cobblestone despawn faster than valuable drops.
entities.armor-stands.ticktrueSet false if armor stands are only decoration.
tick-rates.sensor.villager.secondarypoisensor40Raising villager sensor and behavior tick rates lightens big trading halls.

Two more files help. In spigot.yml, entity-activation-range lets far-away mobs tick less often, and merge-radius merges dropped items and XP orbs. In bukkit.yml, spawn-limits sets the mob caps. Change one thing at a time and profile again.

Why some servers have no villagers

Villagers are some of the most expensive mobs to tick, because they path-find to beds, workstations and each other. That's why you'll see servers that limit or remove them. Most servers don't need to go that far: cap villagers per chunk, slow the sensor tick rates above, and ask players to keep trading halls compact.

Lag machines

A lag machine is a build made on purpose to drag TPS down, usually with huge numbers of entities, falling blocks or redstone updates in one spot. The per-chunk entity limits above blunt most designs. spark shows the chunk and entity type, CoreProtect (/co lookup) shows who built it, and your server rules should ban lag machines by name so staff can act quickly.

Redstone, hoppers and the settings that change them

  • misc.redstone-implementation accepts VANILLA, EIGENCRAFT or ALTERNATE_CURRENT. Paper's docs say the alternatives can greatly reduce redstone dust lag by cutting the number of block and shape updates. Because updates change, test your technical players' contraptions after switching.
  • hopper.cooldown-when-full is on by default and stops full hoppers from retrying every tick. Leave it on.
  • hopper.disable-move-event makes hoppers much faster, but Paper warns it breaks protection plugins that rely on that event. Only enable it if you've checked your claims plugin doesn't need it.

Minecraft server lag fix plugins and mods

No plugin fixes lag by itself. The ones that help are the diagnostic and prep tools: spark and Chunky. "Clear lag" style plugins that delete dropped items on a timer treat a symptom and annoy players. Paper's merge and despawn settings do that job better.

On Fabric servers, where you can't use Paper, server-side performance mods fill the gap. Lithium describes itself as a no-compromises game logic optimization mod for singleplayer and servers, and FerriteCore reduces memory use. For modpacks, check the pack's own recommendations before adding optimization mods, since some conflict with specific mods.

If the profiler blames a plugin, check for an update, then check its config for a scan interval or cache setting. If it's still at the top, replace it. Our plugin guide lists alternatives.

Lag on free hosts, Bedrock servers, and "more RAM didn't help"

Free hosts such as Aternos share CPU between many servers, so you can't buy your way out with hardware. What you control still helps: pick Paper as the software, lower simulation distance, keep plugins few, and pre-generate a small bordered world if the host allows the plugin. Accept that a free plan has a ceiling.

Bedrock Dedicated Server doesn't have spark or Paper. The main dials are in its server.properties: tick-distance (4 to 12, default 4) and view-distance (default 32). Keep tick-distance at 4 unless your machine has plenty of headroom, and lower view-distance if memory or bandwidth is tight.

"Lagging despite more RAM" is the most common complaint of all. RAM only helps if the server was actually out of memory, and spark's health report shows that directly. Most lag is the main thread running out of time, which depends on CPU speed and on how much work each tick has to do. Our RAM guide explains Aikar's flags and when more memory is worth it.

Quick questions

Why is my Minecraft server lagging for no reason?

There's always a reason; it's usually hidden in spikes. Run /spark profiler start --only-ticks-over 100 and wait for the next stutter. Autosaves, a player generating new chunks, and a plugin running a scheduled task are the usual suspects.

What TPS is good for a Minecraft server?

20 is the target and the maximum. A steady 19.5 or higher feels normal. Below about 18, players start noticing.

Does restarting the server fix lag?

It clears loaded chunks and resets memory, so it can help for a while. If lag returns every day, the cause is still there, and a restart schedule only hides it.

Why does my singleplayer world lag too?

Singleplayer runs a server inside your game, so the same causes apply, plus your graphics settings. Lowering simulation distance in the world options often helps.