InfoAn info icon to represent an info message

Warning

This article is very opinion-based and may not be suitable for everyone. The following article is entirely based on my personal experience.

In this article, I will not discuss about how you should configure your server settings, there are already a lot of guides out there.

Server

Generally, you should avoid…

  • Paid server jars that claimed to async-ify something
  • Anti-lag plugin that remove ground items/entities
    • paper.yml already has a setting for that.
    • Most of them caused more lags than they fixed
  • Using VPS that oversold their CPU
    • Check their reviews before buying.

1. Avoid using “Anti-Lag” plugins

These plugins are designed to reduce server lag, but in most cases, they actually cause more issues than they solve. Additionally, most features they offer are probably already included in Paper (or its forks).

2. Hardware Problems

When consider upgrading your server hardware, you should focus on SSD > RAM > CPU.

IO speed matter, a lot

Getting as fast as possible SSD is crucial, as server needs to load chunks to memory. If you are using a HDD, loading chunks can take a long time, which can cause lag spikes (especially in SMP servers, where multiple players are loading chunks at the same time).

Get a NVMe SSD, ideally with a high IO speed and a DRAM caches.

RAM

Modern Minecraft servers require a lot of RAM. I would recommend at least 4-6 GB of RAM even for a small-scale server. Although Minecraft can run with less RAM, but a lack of memory can cause the Garbage Collector (GC) to run more frequently.

Beside that, consider use high frequency RAM (3200MHz or above). RAM speed would affect CPU performance in general.

CPU

Minecraft servers are, unfortunately, mostly single-threaded (there are some server jars that are multi-threaded, but as of writing, they are still unstable/early stage) with some task that are multi-threaded (like Asynchronous chunk loading, Networking etc). However the main game loop is still single-threaded. Therefore, having high single-core performance is crucial for good server performance. You don’t need a high core count, focus on single-core performance.

Also, using VPS may not be a good choice, many of them are either oversold or have a “fair use” policy, which limits your CPU. Please consider finding a provider that offers dedicated servers.

3. Server Jar, JVM, and fine-tuning GC with JVM arguments

Using the right server jar may be the most important part of optimizing your server.

Server Jar

There are a lot of server jars out there, Here are some of the most popular ones:

CraftBukkit / Spigot

The foundation of almost all plugin servers. They offer a plugin API without changing vanilla mechanics. However, it is not recommended to use them as they are slow and outdated.

Paper

A fork of Spigot, with more optimizations and bug fixes. It is recommended to use this server jar. However, there is a problem…

Because of how PaperSpigot (AKA: paper) works, their patches also fix TNT duplication and other “bugs” (some may consider them features), which can cause redstone contraptions to fail. Therefore, using Fabric (with optimization mods) is also a great choice for optimizing your server.

Purpur

A fork of an archived project called Tuinity (which is a fork of Paper). It is a great choice for optimizing your server with a lot of customization. It is a drop-in replacement for Paper, so you can just replace the jar and start the server.

Leaf

A new server jar created in June 2022, originally designed for “Winds Network”, but now aimed to be a drop-in replacement balancing performance, vanilla gameplay, and compatibility. There are still some incompatibilities with some plugins, so be aware of that.

Folia

A server jar that is multi-threaded. It is still in the early stages, and a lot of plugins are not compatible with it, so it is not recommended for production use.

Other Forks

There are a lot of optimizing forks out there, However I wouldn’t recommend using them, as they are mostly outdated (or even abandoned), with some forks even had user claimed getting chunk corruption.

Therefore, I suggest only using well-known server jar forks or well-maintained forks, as you are more likely to get help when you have a problem.

As for paid server jars, unless you are willing to take the risk of exit scams, lack of support, bugs, etc., I suggest you stay away from paying for a server jar. Most of the time, they are just forks of open-source projects with small modifications. (I’m not saying all paid server jars are bad; some are actually well-maintained, but most are not, so be careful.)

JVM

Using different JVMs can also affect your server performance. Here are some of the most popular JVMs server owners use:

Reminder: Some JVMs have been reported to have incompatibilities with other plugins. Please do your research before using them in production.

JVM Arguments

In addition to using different JVMs, specifying JVM arguments can also greatly improve your server performance! I highly recommend users who use Paper (and its forks) to use Aikar’s flags.

If you are running Pufferfish’s fork (Purpur, Leaf, Leaves, etc.), you can use Pufferfish’s flags to add SIMD vector optimization for better performance.

To enable it, simply add --add-modules=jdk.incubator.vector to your JVM arguments to enable it.

Client

1. Stop using Optifine

Optifine is not open source, and it messes with the vanilla code (outside of the rendering code), which can cause incompatibilities with other mods.

However, Optifine is still a decent choice for people who mainly do PvP (as the majority of the player base is still on 1.8.9), but this guide is for people who play on newer versions.

For 1.16.5 and above, Sodium is a better choice for performance.

2. Fabric with Mods

Using mods can also help with your client performance. Here are some of the most popular mods:

  • Sodium - Basically a must-have mod for improving your client performance. In my personal experience running Sodium on a laptop (i7-1355U, 16GB RAM, Intel Arc A350M) boosted my FPS from 47 to 120 (dedicated server, 1.20.1, same settings).
  • Lithium - Improves Minecraft code without changing the vanilla mechanics.
  • FerriteCore - A mod that optimizes memory usage.
  • Krypton - A mod that optimizes network performance, from the developer of Velocity.
  • Entity Culling - Culls entities that are not visible to the player using async path-tracing.
  • Iris Shaders - A shader mod that aims to be compatible with Optifine shaders.

Just to name a few. Many of them can also be installed on the server side, so you can have better TPS and FPS at the same time.

If you are lazy to find them and just want a one-click solution, check out Fabulously Optimized, a modpack aimed at optimizing your client/server performance.

Conclusion

Disclaimer: None of the server jars, mods, and JVMs mentioned in this article are sponsored. None of the links are affiliate links.

Overall, optimizing a Minecraft server is not easy, and not everyone’s configuration works for you. Take this article as a reference, not a copy-paste guide. There are a lot of factors that can affect your server performance, and not all of them are mentioned in this article.