Skip to main content

Reduce lag and optimize your server

Lag usually comes from a few things: too many chunks loaded, too many entities, a heavy plugin or mod, or terrain being generated while players explore. This guide goes from the biggest wins to the smallest. Make one change at a time and test, so you know what helped.

What FenixHost already handles​

The Java version and the Java launch flags are managed for you. You cannot edit them in the panel, so you do not need to tune them. Your effort is best spent on the settings below.

1. Use Paper or Purpur​

Vanilla and the old mod loaders are not built for performance. Paper is much faster and still behaves like normal Minecraft. Purpur is Paper with more options. If your server runs plain Vanilla and you do not need mods, switch on Versions. A backup is made automatically before the change.

For mod servers, Fabric is the lighter loader and has well-known performance mods.

2. Lower view and simulation distance​

These two settings have the biggest effect. Open Properties and look at the Performance section:

SettingSuggested startWhy
View Distance8 to 10How many chunks players can see. Each extra chunk of distance costs a lot.
Simulation Distance5 to 6How far mobs, crops and redstone are active around a player.

Restart the server after changing them. Players can still lower their own view distance in their game settings.

3. Pre-generate the world​

Generating new terrain is one of the heaviest things a server does. Pre-generating means it is created before players need it.

  1. Install the Chunky plugin from Plugins, then restart.
  2. In the Console, run these commands:
chunky world world
chunky radius 5000
chunky start
  1. Run chunky progress to check on it. Use chunky pause and chunky continue if needed.

A radius of 5000 blocks is a good start for many servers. A large radius takes a long time and a lot of disk space, so start smaller if you are unsure. You can set a world border with worldborder set 10000 so players cannot go beyond what you pre-generated.

4. Limit entities​

Many mobs, dropped items and animal farms slow down a server.

  • Lower Entity Broadcast Range % in Properties if players see many entities from far away.
  • On Paper and Purpur, open Files and edit these files (restart afterwards):
    • config/paper-world-defaults.yml: lower the spawn-limits values, and keep per-player-mob-spawns on.
    • spigot.yml: lower entity-activation-range (for example animals 16, monsters 24) and mob-spawn-range. Raise merge-radius for items and experience.
    • bukkit.yml: the spawn-limits section also controls how many mobs spawn.
  • Reduce the size of animal pens and villager halls, and avoid huge automatic farms.
warning

Very low entity activation ranges can make mobs look frozen until you are close. Lower them gradually.

5. Find the real cause with spark​

When lag has no obvious cause, measure it. Install spark from Plugins and run:

spark profiler start

Play normally for a few minutes, then:

spark profiler stop

It prints a link to a report that shows which plugins, entities or chunks use the most time. Paper also has /tps (should be close to 20) and /mspt.

6. Plugins, mods and memory​

  • Remove plugins and mods you no longer use. Every one has a cost.
  • Do not use /reload. Restart the server instead.
  • Watch the MEMORY card on the Console. If it sits at the limit all the time, you have too many plugins or mods, or too large a world area loaded. If it still happens after trimming, a bigger plan helps. You can change plans from the service page in the store.
  • Use Pause When Empty Seconds in Properties if the server is often empty.

7. Ask FenixAI for a check-up​

FenixAI can check the status of your server: CPU, memory and disk, and read the console and latest log. Ask it something like "my server lags, can you check it?". It explains what it finds in plain English and proposes a change. Nothing is applied until you press Apply.

Checklist​

  1. Run Paper or Purpur.
  2. View distance 8-10, simulation distance 5-6.
  3. Pre-generate the world and set a world border.
  4. Trim entities and mob spawns.
  5. Profile with spark.
  6. Remove unused plugins and mods.

Still struggling? Contact support with your server details and the spark report link.