How to fix Minecraft server lag:
checking TPS, RAM and network

When a Minecraft server lags, check TPS in the console first. If TPS keeps dropping below 19, the server can't keep up, and the usual causes are mobs, redstone, world generation and the CPU. If TPS is fine but someone still lags, the problem is that player's connection or computer.

Updated 5 min read vProxy Cloud team

vPanel Console log: a Paper server starting, spark starting its background profiler, and Done when startup finishes, with the command input below

Figure out which kind of lag it is

How server lag, network lag and low FPS differ
TypeWhat it looks likeWhere the problem is
Server lagEveryone lags together, broken blocks come back, mobs teleport and crops grow slowlyThe server (low TPS)
Network lagOnly some players lag, with delayed actions and rubber-bandingThose players' connection, or they are far from the data center
Low FPSThe picture stutters while everyone else on the server is fineThe player's own computer

Ping is lowest when the data center is close to most of your players. vProxy Cloud has Minecraft servers in Taiwan, Hong Kong and Singapore.

Check TPS with spark

A Minecraft server updates the world 20 times a second, and that rate is called TPS (ticks per second). A steady 20 TPS means the server is keeping up, and if it keeps dropping below 19, the server is lagging. The time each update takes is called MSPT, and once it goes past 50 milliseconds, TPS starts to drop.

  • On Paper, typing tps in the console shows TPS for the last 1, 5 and 15 minutes.
  • mspt shows how long each tick takes.
  • spark health builds a health report. Open the link it prints in the console to see TPS, MSPT, CPU and memory in one place.
  • spark profiler start starts a profile. Let it run for a few minutes while the server is lagging, then type spark profiler stop. The console prints a link to the report, which shows the plugins, entities and chunks that take the most time.
The vPanel console log: tps answered with 20.0 for the last 1, 5 and 15 minutes, mspt answered with average, minimum and maximum tick times for the last 5 seconds, 10 seconds and 1 minute such as 0.2/0.1/4.6, and spark health generated a health report with a link
TPS is 20.0 over the last 1, 5 and 15 minutes, so the server is keeping up (demo screen).

Recent Paper builds ship with spark built in and start a background profiler when the server boots. Look for [spark] Starting background profiler in the log.

Common causes and fixes

Common causes of Minecraft server lag, how to spot them and how to fix them
CauseHow to spot itFix
Too many mobs Lag is worst near farms and animal pens, and mobs take up a big share of the spark report Keep farms smaller and clear out piled-up item drops and extra mobs
Redstone Lag around one particular area Make machines run only when needed and cut back on redstone clocks that never stop
World generation Lag only when players explore new areas Pre-generate the world with the Chunky plugin, then set a world border
View distance too high CPU usage climbs as more players join Lower view-distance and simulation-distance
Plugins or mods One plugin or mod takes a lot of time in the spark report Update, replace or remove that plugin
Not enough RAM The log shows OutOfMemoryError, or the server crashes and restarts on its own Open a support ticket to upgrade to the plan with the next size up in RAM
CPU too slow No OutOfMemoryError, and mobs, redstone and plugins are under control, but TPS stays low Move to a CPU with stronger single-core performance

World updates mostly run on one thread, so when you compare CPUs, the number to look at is the single-core score.

Pre-generate the world

When players keep heading outward, the server has to keep generating new terrain. On a new server, this is the most common cause of lag. Install the Chunky plugin, generate the map ahead of time while few players are on, and then fence it in with a world border.

chunky radius 3000
chunky start
worldborder set 6000

This generates a 6000 × 6000 block area centered on 0, 0 and puts the world border around the same area. Generation takes a while. chunky pause pauses it and chunky continue picks it up again. A bigger radius means a bigger world save, so check that your server has the storage space first.

Settings you can change

Both settings are in server.properties and take effect after a restart.

server.properties settings that affect lag
SettingDefaultWhat it does
view-distance10How far players can see. Lowering it cuts down the chunks the server has to send
simulation-distance10How far from players mobs, crops and redstone keep running. Lowering it helps TPS the most

Paper's own config files (in the config folder) can also cap mob counts and set how far apart dropped items merge. Back up the files before you edit them.

Fixing it in the control panel

Watch live usage

The top of the Console shows live CPU, memory, disk and network usage. High memory use alone doesn't mean the plan is too small, because Java holds on to the memory it is given. An OutOfMemoryError in the log, or a server that crashes and restarts on its own, means the plan is too small. If CPU usage stays high, the world has too much to compute, so go back to the spark report and find the plugins, entities or chunks taking the most time.

Top of the vPanel Console: server Running, CPU 1.3%, memory 757 MiB of 1.0 GiB, disk 297 MiB, network usage and uptime
Live usage at the top of the Console. Screenshot from vPanel (Chinese interface). The menu in the top-right corner switches vPanel to English.

Restart at the same time every day

In Schedules, create a daily restart from a template. You can also have it post an in-game warning before the restart. Pick a quiet hour such as early morning, so players who see the warning have time to log off.

Creating a schedule from a template in vPanel: daily restart and daily backup templates, a restart time of 05:00 AM Taipei Standard Time, and the in-game announcement before restart switched on
The daily restart template. Schedule times use Taipei time (UTC+8).

Upgrade or switch CPUs

If you've dealt with mobs, redstone and plugins and TPS is still low, the CPU can't keep up. To move to a product line with stronger single-core performance, open a support ticket in the client portal first to arrange the move. Upgrading to a plan with more RAM also goes through a support ticket.

References

FAQ

Does more RAM mean less lag?
No. Once the server has enough RAM, adding more will not raise TPS. If the log shows no OutOfMemoryError and the server still lags, the cause is usually the CPU, mobs or plugins.
What TPS is normal?
TPS tops out at 20. Holding 19 or above feels smooth. Below 15, players clearly notice the delay.
Why does the server lag when players explore?
It has to generate new terrain on the spot. Pre-generate the map with the Chunky plugin and set a world border, and exploring no longer creates new chunks all the time.
What should I do if the server keeps crashing?
Look at the last error in the console first. Running out of RAM and incompatible plugins or mods are the usual causes. If the error makes no sense, try the docs page on reading errors with AI (Chinese), or open a support ticket in the client portal. Which languages support replies in depends on your support plan.
Only I lag and everyone else is fine. Why?
Then the problem is your own network or computer. A choppy picture (low FPS) comes from your computer. Blocks reappearing after you break them and high ping point to your network. Try a wired connection or a different network.

Start a Minecraft server

Taiwan from NT$99/mo, Singapore from NT$120Billed every 30 days