Skip to content
Back to Homepage

How can I Optimize my Minecraft Server?

How to Optimize Your Minecraft Server and Reduce Lag

Section titled “How to Optimize Your Minecraft Server and Reduce Lag”

Minecraft can be a very resource-intensive game, and it can lag even on the best hardware under heavy load. Fortunately, there are many ways to optimize your server.

AleForge Minecraft servers come with special Java flags already set in the startup command. These flags improve how Minecraft uses CPU and memory, but sometimes that still isn’t enough. This guide covers the next steps you can take.

Tip: Change one setting at a time and test it. That way you know which change helped, and you can undo any change that causes problems.

Before you change settings, find out what is actually slow.

  • Check TPS. TPS (ticks per second) shows how healthy your server is. A healthy server runs at 20 TPS. On Paper and Spigot servers, you can check it with the /tps command in the console or in-game.
  • Use a profiler. A tool such as the spark plugin or mod can show you which plugins, mods, entities, or chunks use the most time. This is the best way to find the real problem instead of guessing.
  • Watch your RAM. If the server runs out of memory, it will lag or crash. See our guide on how much RAM a Minecraft server needs.

The software your server runs on makes a big difference.

If you run Consider
Vanilla Switching to Paper for much better performance, and plugin support.
Spigot or CraftBukkit Switching to Paper, which includes many extra optimizations.
Fabric Performance mods such as Lithium and FerriteCore.
Forge Checking your modpack for known performance mods and recommended settings.

You can change your server type from the Versions page in the panel. Make a backup first.

Step 3: Lower View Distance and Simulation Distance

Section titled “Step 3: Lower View Distance and Simulation Distance”

Two settings in server.properties have a large effect on performance.

view-distance=8
simulation-distance=6
  • view-distance is how many chunks players can see. Lower values load fewer chunks.
  • simulation-distance is how far from players the game runs things such as mobs and crops. Lower values reduce the work the server does.

Try lowering them a little, such as to 6-8 for view distance and 4-6 for simulation distance, then see how your server runs. The values above are examples, so find what works for your players.

Generating new chunks while players explore is one of the biggest causes of lag. You can generate the world ahead of time with a plugin such as Chunky.

  1. Install the plugin.
  2. Set a world border for the area you want to generate.
  3. Run the pre-generation while few players are online.

Pre-generation can use a lot of CPU and disk space, so do it at a quiet time.

Too many mobs, items, and animals slow down a server.

  • Reduce mob spawn limits in bukkit.yml on Paper and Spigot servers.
  • Limit farms and animal pens. Large farms with lots of animals or villagers can cause lag. Set a limit on how many animals players can keep in one area.
  • Clear dropped items. Lots of dropped items on the ground add up. A plugin can remove them regularly.
  • Be careful with hoppers. Many hoppers and large item sorting systems can be expensive.
  • Remove plugins and mods you don’t use. Each one adds work for the server.
  • Keep them up to date. Updates often include performance fixes.
  • Avoid duplicates. Don’t run two plugins that do the same job.
  • Use a profiler (see Step 1) to find any plugin or mod that uses too much time.

Step 7: Keep an Eye on Redstone and Large Builds

Section titled “Step 7: Keep an Eye on Redstone and Large Builds”

Large redstone machines, clocks that never stop, and huge builds can cause heavy lag. If a profiler points to a certain area of your world, check what’s built there and ask the owner to turn it off or reduce it.

Step 8: Keep Your Server Updated and Restart Regularly

Section titled “Step 8: Keep Your Server Updated and Restart Regularly”
  • Keep your server software and Minecraft version up to date.
  • Restart your server on a regular schedule, such as once a day. You can use the Schedules page in the panel to set this up.

Adding more RAM is not always the answer. Once your server has enough, extra RAM does not fix lag caused by too many entities, heavy plugins, or limited CPU. Fix the cause of the lag first.

  • Checked TPS and ran a profiler
  • Switched to Paper (or added performance mods on Fabric)
  • Lowered view distance and simulation distance
  • Pre-generated the world
  • Limited mobs, items, and farms
  • Removed unused plugins and mods
  • Kept everything updated
  • Set up regular restarts
Problem What to try
Lag only happens when players explore Pre-generate your world and lower the view distance.
Lag happens at certain times Check for large farms, redstone, or scheduled tasks running at those times.
Lag started after adding a plugin or mod Remove it or update it, then test again.
TPS is low even with few players Run a profiler to find the plugin, mod, or area causing it.
The server crashes under load Check the Console for out-of-memory errors, and review your RAM.

If you have tried these steps and your server still lags, contact AleForge support and tell us your server type, version, player count, and what you have already tried.