This tutorial helps you to optimize your Vultr Minecraft server to avoid the slightest lag and to have the best possible performance as measured in Ticks Per Second (TPS).
A Vultr Minecraft server advances the game aspects such as object movement, health, crop growth, mob movement, and more, every 0.05 seconds—a clock rate of 20 ticks per second.
If the Minecraft server cannot update all the items on each tick, the server may lag. A TPS rating below 20 indicates that the server must skip tasks to keep up, which creates a rubber-band effect, sometimes reverting in-game actions a few seconds back. You may experience this as a block breaking, and the item drops later, or the sun moving counterclockwise.
TPS ratings of 19.95 or above are acceptable, and ratings below 18.5 are poor. Anything less than 16 is unplayable.
To improve your Minecraft server experience, use Spigot or PaperSpigot. Bukkit is quite old and less optimized than Spigot.
Map pre-generation is a critical factor in improving your server's TPS rating. When a player connects to your Vultr Minecraft server, it has to generate the map while the player moves, which requires CPU resources. When a player passes over a part of the map already generated, the server requires fewer resources. It's essential to pre-generate the map before opening your server to the general public.
WorldBorder is a plugin that allows you to pre-generate your map. It is available in most versions of Minecraft.
Define a limit for the generation of your world.
/wb [worldname] setcorners <x1> <z1> <x2> <z2>
To generate the map, use the command:
Wait for the server to generate the map. It may take quite a while, depending on the size of the map and the server's power.
Most of the rest of the optimization for the server involves editing your server files. The default settings aren't optimized for servers with 10 to 30 players.
This setting is critical for good performance because it forcibly reduces the maximum rendering distance for players. Open world servers (such as Survival) should strive to use 6+, but others on shared hosts, low specifications, or large numbers of players might consider 4-5 if the chunk generator causes a lag.
If you set a lower value, the server has to use more resources to compress the packets. If you set a higher value, the server uses more bandwidth but saves resources. If you set the value too high, players with a bad connection are going to lag.
👉 Note: If your server is in a network with a proxy and your server has less than 2ms with the proxy, a value of –1 is beneficial.
This setting controls the maximum number of mobs that can appear around a single player. These parameters may vary depending on the game mode of your server.
This setting unloads empty chunks faster, which consumes fewer resources.
This setting determines the frequency (in ticks) at which the server tries to generate a monster. A small increase in the time between spawning should have no impact on the spawning rates.
Disclaimer: Some settings may not exist or may have disappeared depending on your version of Spigot or PaperSpigot.
Enabling this prevents the server from ticking villagers outside the activation range. Villager tasks in 1.14+ are heavy.
This method is no longer useful, and it consumes needless resources.
This setting controls the max mob spawn distance (in chunks) from players. After limiting spawns in Bukkit, this will condense mobs to mimic the appearance of normal rates.
Entities past this range are ticked less often.
When enabled, mobs from spawners don't have AI (not swim/attack/move). This is significant performance savings on servers with mob farms but also messes with their behavior. A farm limiter plugin might be a better solution.
Merging items means less ground item ticking. Higher values allow more items to be stacked.
This setting slows incremental chunk saving during the world save task. This is incredibly important for 1.13+ servers with how inefficient chunk saving is.
This setting controls the delay (in ticks) before an active spawner attempts to spawn. Go higher if you have significant tick loss from ticking spawners.
Disable chests scan for a cat on top of it when opened by a player.
This setting changes how often (in ticks) inventories refresh while open. If you exceed 4, you can have visual issues.
This setting controls the time (in ticks) before the server tries to spread grass in chunks.
This setting prevents players from entering an unloaded chunk (due to lag), which causes more lag.
👉 Note: If you use a plugin to change the Redstone algorithms, set this value to false.
To optimize the Java runtime, review the latest version of this guide, written by a core Spigot/Paper developer and the creator of the timings program. It applies to 99% of servers.
Finding the correct settings to optimize a server takes time and improves TPS performance to reduce server lag. Each server is different, and you may want to learn more about the parameters. See the following documentation: