Skip to main content
Lag usually comes from too many chunks, too many entities or a heavy plugin. This guide shows you how to size your server, tune the settings that matter most and find the exact cause of lag.

Difficulty

Intermediate

Time

20 minutes

How much RAM do you need?

These are starting points. Big builds, farms and many plugins or mods need more.
More RAM doesn’t fix every kind of lag. If memory isn’t near the limit on the Console or Statistics page, the problem is usually CPU time: chunks, entities or a plugin. Check with spark before you upgrade.
Your server starts with optimised Java flags (Aikar’s flags) and the memory of your plan. These are set for you on the Startup page and you don’t need to change them. Java also uses some memory outside the game itself. If memory sits at your plan’s limit, you likely need 1–1.5 GB more than the table suggests.

Lower view and simulation distance

This is the biggest single change you can make. Open Server Properties: Click Save and restart. Players see a little less far, but the server loads far fewer chunks. See server configuration. A low simulation distance with a slightly higher view distance is a good balance: players still see far, but fewer chunks are kept running.

Tune Paper, Spigot and Bukkit configs

On Paper and its forks, these files sit in your server’s main folder and the config folder. Stop the server, edit them in Files, then start it. Make a backup first.

bukkit.yml

spigot.yml

config/paper-world-defaults.yml

Don’t use /reload after editing these files. Restart the server instead. Keep a copy of the original file so you can go back.

Pre-generate your world with Chunky

Generating new chunks while players explore is one of the heaviest jobs a server does. Chunky generates them in advance.
1

Install Chunky

Install Chunky from the Plugins page and restart. See plugins.
2

Set the area

In the console, run:
3

Start

Run chunky start. Progress shows in the console. Use chunky pause and chunky continue if players are online, and chunky cancel to stop.
4

Set a world border

Run worldborder center 0 0 and worldborder set 10000 so players stay inside the generated area (the border size is the diameter, so twice the radius).
A 10,000-block radius covers four times the area of 5,000 and can use 10–25 GB of disk. Start with 5,000. For the Nether, about 2,000 is enough: chunky world world_nether, chunky radius 2000, chunky start. Run pre-generation when few players are online.

Find the cause with spark

spark shows exactly which plugin, entity or chunk is using the server’s time. It is built into Paper (1.21 and newer). On other server types, install it from Plugins or Mods. Run the profiler while the lag is happening, ideally for 10–15 minutes with players online. In the report, open the slowest branches to see which plugin or task takes the time. Share the link with us in a ticket if you want help reading it.

Reduce entities

Too many mobs, items and minecarts in one place slow every tick.
  • Run spark profiler and look for entityTick, or use spark’s report to find crowded chunks.
  • Limit mob farms. Large farms with hundreds of animals are a common cause.
  • Clear dropped items now and then: kill @e[type=item].
  • Count entities with execute if entity @e (the console prints the number).
  • Use name tags sparingly: named mobs never despawn.

Server configuration

View distance and server type.

Troubleshooting

Crashes and out-of-memory errors.

Server statistics

Check CPU and memory over time.

Schedules

Restart automatically every night.

Need Extra Help?

If you encounter any issues, our support team is ready to assist:

Save on Your Hosting

Ready to upgrade your hosting? Use code KB20 at checkout for 20% off your first order!

Last Updated: October 2026