Since 1.13, Minecraft servers have gotten harder to run. However, that does not stop you from making the server perform the best it possibly can.
But first, it’s good to note that Modrinth offers excellent CPUs for all customers, thus any performance issues are likely to be due to a misconfiguration rather than under-performing hardware.
General Tweaks
There are a few general tweaks you can make, without adding any mods or messing around with config files, to make your server perform natively well. This can include lowering the simulation-distance and view-distance to not put as much load on the CPU. We recommend lowering the simulation-distance to anywhere between 4 to 6, and the view-distance to 6 to 12.
If you require a higher render distance, you can try client-side chunk caching such as Bobby, which can reduce the need for a higher view distance on the server.
One other option you can tweak is to turn sync-chunk-writes to false. Otherwise, this forces chunk saving to occur on the main thread, likely causing occasional lag spikes.
Spark
Spark is a performance profiling plugin/mod that can be used to display server information, such as TPS, memory, tick durations, CPU usage, and disk usage. One specific feature about the mod is the ability to create a performance profile that can be viewed on a web viewer.
Setup
Note: You can ignore this step if you are running Purpur 1.19.1 or above, or Paper 1.21+. These versions include Spark by default and you do not need to download Spark separately.
Download the latest version from Modrinth and drop it into your plugins or mods folder. Turn on or restart the server. Then, you can run a profile by typing with spark profiler start --timeout 60 to run a one-minute profile.
Fabric Servers
If you are running a Fabric server, there are a wide variety of performance mods which you can use to your disposal.
Chunky: Chunk pre-generation mod, which is helpful for reducing server lag caused by chunk loading.
FerriteCore: Performance mod that reduces the memory usage of Minecraft in a few different ways.
Immersive Optimization: Performance mod that optimises the entity tick scheduler to massively reduce lag and resource requirements of entities.
Krypton: Performance mod that optimises network usage.
Lithium: Performance enhancing mod that optimises general-purpose systems.
ModernFix: Performance mod that improves performance, reduces memory usage, and fixes many bugs.
ServerCore: Performance mod that optimises the Minecraft server in several ways.
Some mods are also only relevant to older versions of the game.
Minecraft versions 1.14-1.19.4 only: LazyDFU: Performance mod that makes your server start faster.
Minecraft versions 1.16.3-1.19.x only: Phosphor: Performance mod that optimises the lighting engine. The most noticeable impact of this mod is chunk generation speed.
Phosphor and Starlight are alternatives to each other, you can't use both at the same time.
Minecraft versions 1.17.x-1.20.x only: Starlight: Performance mod that completely rewrites the vanilla lighting engine to make it much faster. The most noticeable impact of this mod is chunk generation speed.
Phosphor and Starlight are alternatives to each other, you can't use both at the same time.
NeoForge Servers
If you are running a NeoForge server, modern versions support many of the aforementioned performance mods mentioned above. We recommend having a look at them.
Forge Servers
If you are running a Forge server, older versions support many of the aforementioned performance mods mentioned above, with unofficial Forge ports such as Canary being worth looking into.
Bukkit-based Servers
When running a Bukkit-based server, like Paper or Purpur, we recommend following this guide for tips on improving server performance! It's very in-depth, covering many of the common configuration changes that server administrators should make, as well as situation-dependent changes such as entity spawn limits and redstone behavior.
If you would like a general guide for improving your server performance, we recommend following this guide. It doesn’t go in depth as the previous guide, but it still goes into detail about important options you can change to improve your server performance!
