“Lag” can mean two different problems, and the fix depends on which one you have:
- Server lag (low TPS): blocks break slowly, mobs freeze, everyone lags at the same time. The server can’t keep up.
- Connection lag (high ping): only some players lag, often far away from the server. That’s their internet route.
A healthy server runs at 20 TPS (ticks per second). On Paper, type tps in the console to check. Under 18 is noticeable, under 15 is bad.
1. Find the cause with spark
Install the free spark plugin (or mod), then run spark profiler start, wait a few minutes while the lag happens, and run spark profiler stop. You get a link showing exactly which plugin, entity or chunk uses the most time. Fix the top item first.
2. Lower the view and simulation distance
In server.properties, try view-distance=8 and simulation-distance=6. View distance is how far players see; simulation distance is how far away things like crops and mobs keep working. Lowering simulation distance helps the most and players barely notice.
3. Pre-generate the world
Generating new chunks is the heaviest thing a server does. Use the Chunky plugin to generate the world ahead of time, for example a 5,000-block radius, and set a world border so players don’t explore forever.
4. Use Paper or Purpur
If you run Vanilla or Spigot, switching to Paper alone often fixes lag. Its config files have many extra performance settings, like limiting how many mobs and items can pile up.
5. Control mob farms and items on the ground
Huge mob farms, thousands of items on the ground and redstone clocks are classic lag sources. Limit entity counts, clear dropped items now and then, and ask players to switch off farms they don’t use.
6. Remove plugins you don’t need
Every plugin costs a bit of performance. Remove the ones you don’t use, and replace plugins that show up at the top of your spark report.
7. Give it the right amount of RAM
Too little RAM causes stutters and crashes. But more is not always better: past what your server really needs, extra RAM doesn’t add speed. Most plugin servers are happy with 6 GB, modpacks with 8–12 GB. See How much RAM does a Minecraft server need?
8. Restart once a day
A daily restart clears memory and keeps long-running servers smooth. In the panel, create a Schedule that restarts the server at night when few people play.
9. Pick a server close to your players
Ping depends on distance. Our servers are in Los Angeles, USA, which is best for players in North and South America. If most of your players are far away, some ping is normal and not something settings can fix.
Still lagging?
Send your spark report in a ticket and we take a look. On a TheXHosting plan you can also upgrade the RAM in a few clicks when your community grows.