Why is my server lagging?
Short answerFirst find out which lag you have. If everyone sees blocks come back and mobs freeze, the server is slow to calculate the world; if only one player rubber bands, it is their connection. The Overview tab and the tps command tell you which.
Find the cause
Open your panel on Overview and look at memory and processor right now, and at the graphs over the last day. A line pinned at the top of memory while players complain points at memory.
Type tps in the Console while the server runs, or mspt on Paper. 20 TPS is a healthy server; a lower number means the server cannot keep up with the world.
If TPS is 20 and only some players lag, the problem is between them and the server. Ask where they play from and compare it with the region of your server.
If TPS is low, look for what the server is busy with: large farms, many entities, a plugin, or chunks being generated for the first time.
The changes that help most
Lower the view distance and simulation distance in Settings, pre generate the world, limit entities in farms and remove plugins you do not use. The lag guide goes through each of them in order.
The AI Copilot in your panel can look at your logs and settings and point at what makes the server slow, and propose each change for you to apply.
Questions people also ask
Will more RAM fix the lag?
Only if memory is the cause. A server that sits at 20 TPS with memory to spare does not get faster from more of it. Check Overview first; the RAM guide shows what each player count and modpack needs.