First, work out which kind of lag it is
Players call everything lag, but there are three separate problems. Server lag means the server cannot finish its work in time: blocks reappear after you break them, mobs move in jumps and everyone feels it at once. Network lag means a slow or unstable route between one player and the server: that player rubber-bands while others are fine. Client lag is a low frame rate on one person's computer and has nothing to do with the server at all.
The quick test is to ask who is affected. If everyone has the problem at the same moment, look at the server. If it is one player, look at their connection or their PC.
- Everyone affected at once: server lag, measured in TPS
- One player rubber-banding: network lag, measured as ping
- One player with a stuttering picture: client lag, measured in FPS
Measure before you change anything
A Minecraft server aims for 20 ticks per second. Each tick has a budget of 50 milliseconds, and when the work takes longer than that the server falls behind. On Paper and Purpur, the tps command shows the recent tick rate, and the mspt command shows how many milliseconds each tick is taking.
To find out what is using the time, run a profiler. Spark is the standard one and current Paper versions include it. Start it during the lag, let it run for a few minutes, and it produces a report that names the plugin, entity type or world area responsible. Ten minutes with a profiler replaces days of guessing.
Lower view distance and simulation distance
This is the biggest single lever. View distance controls how many chunks are sent to each player, and simulation distance controls how far from each player the world is actively ticking. Every step up adds a ring of chunks around every player online.
A view distance of 8 and a simulation distance of 5 or 6 keeps most servers smooth and few players notice the difference. Both settings are in server.properties.
Pre-generate the world
Generating new terrain is the most expensive thing a server does. When players explore in different directions, or fly with elytra, the server generates chunks in real time and tick rate drops.
The fix is to generate the map in advance. Set a world border, then use a pre-generation plugin such as Chunky to fill it in while the server is quiet. After that, exploring only loads chunks from disk, which is far cheaper.
Keep entities and farms under control
Entities are mobs, animals, dropped items, minecarts and villagers. A few hundred cows in a pen, a mob farm that never stops, or thousands of items on the ground can each use more tick time than twenty players.
The profiler report shows entity counts per area, so you can find the farm responsible instead of banning farms in general. Agree a sensible limit for animal pens with your players, and switch off farms that nobody is standing at.
Use Paper instead of vanilla
If you are running the vanilla server and do not need it for a specific reason, moving to Paper is free performance. It runs the same worlds with heavily optimised internals and lets you tune many more settings. Purpur builds on Paper and adds further options.
On StormNodes you can change the server software from the panel. Take a backup first, as with any change of this size.
Audit your plugins
Every plugin gets a share of each tick. Most are light, but a single badly written or outdated plugin can use more time than the rest of the server together, and the profiler will show it by name.
Remove plugins you no longer use, keep the rest updated, and be careful with anything that scans large areas of the world or logs every block change.
Restart on a schedule
A restart clears memory that has built up over days and reloads everything cleanly. A daily restart at a quiet hour is common practice on busy servers. You can set it up as a scheduled task in the StormNodes panel, with a warning message to players a few minutes before.
When the hardware really is the limit
If memory use sits near the top of the graph and the server pauses for a moment every so often, it needs more RAM. If memory is fine and ticks are still slow after the changes above, the limit is processor speed, because Minecraft does most of its work on a single thread.
For network lag, the fix is distance. A server close to your players has a shorter route, which is why a community in Portugal or Spain gets better ping from a server in Portugal than from one in central Europe or the United States.
- Memory near the ceiling with periodic freezes: move to a plan with more RAM
- Memory fine, ticks slow: reduce the workload, or move to faster hardware
- High ping for everyone: host the server closer to where your players live