Maintaining an unoptimized Minecraft Server can be quite pricey, you'd be essentially paying for extra resources only to keep the server barely working and any future issues can be the final nail in the coffin. Why risk your community's trust? With this guide, you will learn some good practices to optimize your server and reduce the server load.
Aside from these factors, you should also take into consideration the latency and what's the best location for your Minecraft Server, fortunately, we have a guide covering this topic further so you and your community can enjoy the most of your server and don't worry about lag! Check our guide here!
Now without further ado, here are some good practices to correctly manage your server and improve its performance:
Use Paper instead of Spigot for your plugins
There are multiple server jars to use plugins in your server, and while they're both good it's highly recommended you use Paper instead. Paper is a highly optimized fork of Spigot that fixes numerous bugs and features from Spigot, thus also offering better performance.
You can use all your Spigot plugins with paper with no issues at all, so we recommend using Paper for your server in 2023. We have a guide in our knowledgebase covering the installation process if you're interested, which you can read here.
Keep plugins and mods updated to prevent vulnerabilities and incompatibilities
Keeping your resources updated is an essential step in server management, many vulnerabilities and bugs are discovered each day, so the developers are always on the lookout for fixing these issues in future releases.
Keeping your resources outdated leaves you open to a player taking advantage of any vulnerabilities to cause troubles in your server, and if there's a bug in the code or a newly found incompatibility with other plugins then your server performance may end up heavily affected. Always keep your resources up to date, and try to avoid unmaintained resources.
Use Plugins or Mods meant for lag fixes
Minecraft Plugins are the basis of any multiplayer Minecraft Server in today's era. While most of them offer new features and additions to the gameplay itself, there are also some of them whose main function is to increase performance by decreasing the resource usage in your Server through its features. We could mention ClearLagg or LaggRemover with their automatic deletion of entities, prevention of lag machines, and overall reduction of resource usage.
There are also mods with a similar purpose available for modded servers, but keep in mind that most of them are only available to specific forge versions, so you'll need to make sure you've selected the right version for your server. This list is really huge but we can mention the popular and must-have Vanilla Fix, as well as Lag Removal, FoamFix, and Spark.
Keep the maximum number of players under a specific amount to avoid overusing the server resources
While there are plugins and practices to extend the recommended amount of players per GB of RAM in a Minecraft Server, it's still highly recommended to keep the number of players under a specific limit. For example, hundreds of players on a server with only 2GB of RAM will quickly crash the server as it won't have enough resources to keep up, but 15 players is more realistic and may be doable.
Keep in mind that newer Minecraft Versions use more resources, so it's always recommended to pick a Minecraft plan with more resources than the amount needed to avoid any future issues, however, feel free to pick any plan and upgrade later if required through our billing area, it's automatic and you won't lose your files!
Limit and pre-generate your world with Chunky
Worlds in Minecraft can extend quite beyond your starting area, they're procedurally generated and the more you explore the bigger the world gets, this could be a great thing for your players but a nightmare for your server, which might struggle to handle a huge number of players over the entire map, all with their own farms, mobs, and entities.
To fix this there are two useful things: Pre-generating your world, which is highly recommended for servers with only 1 vCore assigned; and Setting a border limit for your world. We'll be using a plugin named Chunky for that.
How to install Chunky
Chunky is a plugin/mod whose function is to pre-generate chunks in a quick and efficient way, you can specify the radius or area of the shape and can use the addon ChunkyBorder to create world borders. To install Chunky on your server just follow these steps:
- Go to the official page through this url and click on 'Installing'.
- Select the version corresponding to your server jar, we're using the Bukkit version with Paper.
- Download the file from your selected source, you can also download the ChunkyBorder addon.
- Go to your server's game panel and head to the Files tab.
- Drop the files previously downloaded inside the corresponding folder, either 'Mods' or 'Plugins'
How to pre-generate your world.
Now that the plugin/mod has been installed you can proceed to pre-generate your world, keep in mind you'd need an unused world or to create a new one just to get the most out of this plugin.
In this example, we'll pre-generate a radius of 600 blocks starting from the default spawn point:
- Connect to your server with your server IP.
- Open the in-game chat and type these commands:
/chunky world YourWorldName (To select which world will you use to pre-generate the blocks with the commands).
/chunky spawn (To set the center of the shape to the default spawn point)
/chunky shape Square (This is the shape for your map, you can replace 'Square' with any of the values from this list). If you don't specify a shape the default value will always be a Square.
/chunky radius 600 (The total block radius for your pre-generated chunks)
/chunky start (To finally start the generation after you've specified all the requirements)
You can check the progress through your server console in the Game Panel, this may take longer depending on the size you've used.
Learn more about all the available Chunky commands here.
How to set a border limit for your world.
Setting a border may not be the preferable option for your community, but you can keep the value to a high number and chances are that your community won't really feel the difference. We'll use the ChunkyBorder add-on previously downloaded for this, To create a border in your server, just follow these steps:
- Connect to your server with your server IP.
- Go to your previously selected region, you can use /chunky selection to verify.
- Open the in-game chat and type this command:
- /chunky border add (This will generate a border in the radius and shape previously selected).
You have now created a world border in your server and players won't be able to go past the border. Do you want to remove the border? No problem, just use: /chunky border remove
This plugin is compatible with Dynmap and the border will show in the map once created.
Limiting the world is also really useful for some modalities like Factions to keep players from making bases near the far lands, but that's ultimately up to you.
You can also edit the ChunkyBorder config.yml file and set the visualizer-enabled variable from false to true, this will display the border in-game (with particles), which is hidden by default.
You can even change the range on which it will appear and the particle colors with visualizer-range and visualizer-color respectively.
Enable automatic restarts every few hours
Restarts are a very good way to ensure your server and its resources such as the RAM and CPU stay 'fresh', the performance may be heavily decreased after a nonstop long session of players, but a simple restart will ease the server load.
Automatic Restarts will also allow some plugins to perform some changes or updates if required and will ease the load of the server. The Game Panel offers a Schedules system where you can create your own automated restarts, learn how with this guide!
We've reached the end of this blog, there are many possible configurations you can try to improve the performance of your Minecraft Server, we couldn't cover all of them but feel free to use this guide to learn more about the server-side technical configuration.
If you're interested in setting up your own server consider buying Game Hosting for Minecraft in Iceline Hosting, Start your Minecraft Journey today! and feel free to contact us through our Livechat for any Sales Questions or through a ticket.