Running a Minecraft server can be demanding, especially with a large number of players or mods. While hardware and operating system tweaks can help, many performance improvements can be made directly in the server’s configuration files. Many of these suggestions require knowledge on editing your server.properties
settings, so check out our guide here on editing these. Here are the top 7 ways to optimize your Minecraft server's performance through configuration changes.
Your view distance is one of the most highly performance affecting settings on your Minecraft server. Settings this lower in server.properties will double to triple the performance of your Minecraft server. It's really only necessary to set this to above 10-12 at the maximum, and if you're dealing with lag, setting it to 6-8 should help dramatically.
Minecraft will autosave the game as you play, which can cause lag on larger worlds. To increase the time between these autosaves, you can set the value max-tick-time in server.properties. This will be the amount of ticks in milliseconds in between autosaves. This will reduce the amount of lag spikes you'll experience on your server.
PreGenerating chunks can be costly in storage, but can greatly improve server performance, since the server will not have to compute and load them in real time. Instead, it will just show what has already been generated. You can use the /forceload
command to load chunks within a certain area, and then have players join your server when the specified chunks have been loaded. This will avoid the chunk slow loading issue when flying with elytra or in creative.
You can use a command to lower the amount of mobs and dropped items that can stack up on the ground in a small space. By default this is set to 24 items or mobs, but lowering it can have a performance boost. This is especially helpful if you have a lot of farms where items stack up. Placing hoppers where the items fall will avoid this limit from ever being met as long as you have space available. Anyways, you can use the command /gamerule maxEntityCramming 16
to lower it from the default 24.
Tile entities such as hoppers, furnaces, chests, use a lot of server resources and they must update their statuses regularly. Try to avoid using these in bulk, for example, if you must use a lot of hoppers to transport items, consider using a minecart or water stream. These actively ticking blocks will drag down the server's resources, especially on a server with many farms.
The simulation distance controls how many chunks around the player are being loaded, so lowering this will decrease lag as the server has to process less chunks at a given time. This setting can be found in server.properties, and it's recommended to lower it down to 4-6 to reduce the amount of chunks per player being processed by the server. This will greatly help in worlds with large bases and farms.
You can use the command /gamerule randomTickSpeed 1
to set the random tick speed to a lower value which can reduce CPU usage on the server. This will slow down the rate of random events such as crop growth or firespread, but it will stop the server from having to do so many different events at one time, which can slightly help increase performance.
Those are some of the best ways to improve the performance of your vanilla Minecraft server without using any mods. Be sure to also check out our best performance mods for even more ways to optimize.