It’s important to me to get the most out of my servers when I run a Minecraft server. There are two main things I do.
Optimization 1: Plenty of Resources
Java servers need a big chunk of RAM. I have physical servers that’s entire purpose to run game servers. Not strictly Minecraft, but they do not run anything besides a game server. They have the most RAM, and no other applications. This way the game server, Minecraft in this instance, gets the entire system to itself.
For Minecraft this is mainly for RAM. I allocate 12GB of RAM to a Minecraft Server, leaving 4GB for Ubuntu (Linux), Docker, and the JVM (Java Virtual Machine). Which in my experience is enough. Now most of the time the Minecraft server never comes close to the ceiling. I currently have a 26.2 survival server with friends, it averages 4GB of RAM usage. Now this is also due to my second tip. In short, give a game server more than it needs.
Note
Optimization 2 diverges, it depends on if you are running a modded server (Fabric, Forge, NeoForge, etc). If you are planning on a vanilla server refer to Optimization 2A, if modded refer to Optimization 2B.
Optimization 2A: Server Type Purpur
For vanilla I STRONGLY recommend using Purpur. It’s a type of server for Minecraft. It has optimization built into its DNA, via Paper. Purpur is a fork of Paper, so it inherits Paper’s optimizations, and adds configurability on top of that.
Optimization 2B: Mods. Mods. Mods
There is no shortage of optimization mods, for any mod loader you choose. I have compiled a list of the optimization mods I have used on live servers. Some of the mods change the same logic of others, so make sure mods don’t cross over before use. For the most part even mods that operate in the same area don’t crash the game.
- Lithium: It optimizes game logic, without changing it.
- FerriteCore: This helps to reduce the RAM footprint of a server, always useful.
- ModernFix: This mod works on reducing RAM, fixes bugs, and improves performance.
There are MANY more optimization mods these are just my favorites.
The most important thing you can do is be realistic about the amount of people allowed onto the server at once, and you can tune the simulation distance. Those two factors have the biggest impact. Mods and server types are fun but those two settings are something no mod can make up for.