Minecraft server lagging? Find the cause, then fix it
Lag is one word for three different problems, and each has a different fix. Work out which one you have first. It usually takes five minutes and saves you from paying for resources that won't help.
Step 1: Work out which kind of lag you have
| What you see | What it is | Where the fix is |
|---|---|---|
| Everyone lags at once: blocks you break come back, mobs freeze, chests open late | Server lag (low TPS) | The server: this guide |
| Only one player lags while everyone else is fine | Connection lag (high ping) | That player's internet, Wi-Fi or distance to the server |
| Only one player has low frames but the world responds normally | Client lag (low FPS) | That player's PC: render distance, shaders, mods |
Minecraft runs the world in "ticks". A healthy server does 20 ticks per second (TPS), so each tick gets 50 milliseconds. When a tick takes longer than that, the whole world slows down for everyone. The console message Can't keep up! Is the server overloaded? is the server telling you it's falling behind.
To see your TPS, run /tps if you're on Paper. On a newer vanilla server, /tick query shows how long ticks are taking. Anything steadily under 20 TPS is real server lag.
Step 2: Look at the CPU and RAM graphs
Open your server's Overview tab and watch the CPU and RAM graphs while it's lagging.
- CPU sits near 100% when it lags: the server is out of processing power. Add a vCPU from the Add-ons tab. It applies live, with no restart.
- RAM is almost full when it lags or crashes: add some RAM from Add-ons. See how much RAM a Minecraft server needs for sensible numbers.
- Both are low but it still lags: more resources won't help. The load is coming from something specific, and the fixes below are what you want.
One thing worth knowing: the main game loop in Minecraft mostly runs on one CPU thread. That means a faster core helps more than lots of cores, and adding RAM to a server that isn't short of RAM does nothing.
Step 3: The fixes, in the order to try them
1. Run Paper instead of vanilla
Paper is a drop-in replacement that fixes a lot of performance problems vanilla has. Open the Version tab and switch the type to Paper. Your world data is untouched, only the server software changes. Take a backup first from the Backups tab if you're changing a major version too.
2. Lower the distances
Two settings control how much of the world the server works on:
view-distance: how many chunks around each player are sent to them. In the Properties tab. Dropping it from the default of 10 to 7 or 8 makes a noticeable difference.simulation-distance: how far from each player the server actually ticks mobs, crops and redstone. This is the bigger lever for TPS. It lives inserver.properties, which you can edit in the Files tab. Try 5 or 6.
Keep simulation distance at or below view distance. Restart the server after changing either.
3. Pre-generate the world
Generating new terrain is one of the most expensive things a server does, and it happens live while people explore. A pre-generation plugin like Chunky does it ahead of time while nobody is online. On a Paper server, open the Plugins tab, search Modrinth for Chunky, install it, restart, then set a radius and start it from the console (for example chunky radius 3000 then chunky start). Pick a radius players will realistically explore, not the biggest number you can type.
4. Find what is actually eating the tick
If it's still slow, stop guessing and measure. The spark profiler shows exactly which part of the server is costing time. Install spark from the Plugins tab (Paper) or Mods tab (Fabric or Forge), run spark profiler start while the lag is happening, wait a few minutes, then run spark profiler stop and open the link it gives you. The usual suspects it will point at:
- Too many entities. Big animal pens, villager halls and mob farms are the classic cause. Thin them out, or spread them across the map.
- A plugin or mod. If one shows up near the top of the profile, update it, replace it or remove it.
- Redstone. A fast clock or a huge contraption can hurt the whole server. Find it and switch it off.
- Loaded chunks nobody is using. Chunk loaders and far-flung players keep a lot of the world active.
5. Remove what you don't use
Every plugin and mod costs something. If you can't say what one does, take it out and see if the lag changes. Restore from a backup if something breaks.
When resizing is the right answer
If the graphs showed the server running out of CPU or RAM during real play and you've already done the fixes above, then it needs more. The Add-ons tab resizes a running server live. It shows exactly what you'll pay before you confirm, and if your card is declined nothing changes. You can also see a Recommendations card on the Overview when we've noticed the pattern from your usage.
Still lagging?
Open a support ticket with your Minecraft version and server type, what you see (low TPS, one player, everyone), and the profiler link if you ran spark. That's enough for us to look at the real cause.
Want a server without the setup?
See Minecraft hosting
PingByte