Minecraft Server Optimization

Minecraft Server Optimization


One of the biggest concerns for server owners is lag. Lag can have a variety of causes, whether it's from resources you add to your server or the hardware your server runs on. Apex hosts servers so hardware shouldn't be an issue. There are many options to reduce the lag on your server.

There are plugins that can reduce the lag. You can upgrade your server RAM, switch to a more optimized Minecraft jar, optimize your files, etc.

These options are enough to make you wonder what causes lag. There are a few different types of lag that can occur such as TPS, Latency, and FPS lag. In this guide, we will give a breakdown of the different types of lag and the best way to mitigate it on your Minecraft Server.

Types and types of lag

Server Lag (TPS)

TPS (Ticks Per Se) is the measure of server performance. A server's TPS is like a heartbeat. Your server's TPS is a fixed rate of 20 ticks/second, which means that one tick occurs every 0.05 second.

On each tick, various aspects of the server advance a little bit; Mobs move, grass grows, animals spawn, almost everything that happens on the server relies on ticks. You'll experience normal gameplay at peak performance (20 TPS), without any server-side lag. If your server's TPS drops, you will notice lag in your game.

The server's performance and the hardware it runs on play a significant role in determining its TPS. Poor server management can be as damaging as inadequate hardware.

You should consider the long-term consequences of any mods or plugins you add to your server. Many new server owners mistakenly think that the server's popularity is all that matters. The effect of the server's players can have an affect, but it is very small in comparison to redstone machines and mob farms. TPS drops are caused by what is going on in your own world at the time.

Client Lag (FPS)

A low FPS will usually mean that your game behaves slowly. If your frame rate is low enough, playing the game may feel like watching a slideshow. Having a low frame rate on your server does not mean that the server is lagging but that your computer is failing to keep up with the game. You will need to adjust your game settings, update drivers, or upgrade your graphics card, RAM, and CPU if you have a low frame rate.

It is important to know the difference between server lag and low FPS. Low FPS can sometimes appear simultaneously with server lag. While you may believe that the FPS is due the server's lag, it is often a separate problem with the device running the game.

There are many ways to increase FPS without having your hardware upgraded. You can reduce the functions of Minecraft by going to the video settings. To make sure your computer doesn't try to render clouds, you can go to the video settings. It is also a good idea not to run any other processes in the background. This will free up resources for the game. You can do this quickly by closing anything that's open on your Taskbar.

Another option is to change to the high performance plan in your device’s power options. Windows PC users can do this by pressing Windows Key + X. Then choose "Power Options" to open up your settings. Change the Power Mode to "Best performance".

Connection Lag (Ping)

Connection lag is related to your ping. Ping is the latency of your game and your server over the internet. This is how long it takes data to travel and process. High ping can cause your connection to the server to time out. Having high ping is not something that's due to lag, but it causes lag. It can also cause a crash in the game.

Low latency is better for smoother gameplay. Your ping will increase the farther away a server is to your physical location. This can be minimized by moving your server to the closest location to you and your players. Some factors that might affect ping include Internet connection speed, the quality of a user's Internet service provider, issues with the Minecraft servers network, and the configuration of firewalls.

Latency can change depending on network conditions and the status of the server to which you're connecting. You can "ping" a server to see how latency it will have. This tells the server how long it takes to receive a message from you and reply. There are a few ways to test your ping, we recommend using your command prompt. You can open a terminal or command prompt with Windows+X, and then type "ping ServerIP". For example, "ping ping play.apexmc.co". It may take a while for the process to complete, but once it is over you should see the average number of pings.

Create a timings report

A timings report lets you monitor the time it takes for your server's event to process. This allows you to see where lag issues may arise and cause the server TPS to drop. Minecraft-server-list.Info To run a Timings Report, log on to your server. Run the command: /timings ON. After 30 minutes, type the command: /timings POST. This will give you a link. You can click on it to open the report from your browser.

A timings report

The timings report's top section will include a simple graph showing your server's average TPS over five minutes. The graph's left side shows a brief summary of your server, including the average TPS. These are great for getting a quick overview of your server's performance, but they won’t tell you why your server is slowing down. To determine the cause of lag, you should look at the data under the graph.

The lower section of a timings report is a complete breakdown, also called a 'tree view', of every tick that occurred while the report was running. Each tree starts as a broad overview of what type of tick is happening. The top tree will often give a summary of the average ticks for the entire server. To expand these trees and see more information about each layer, you can click on them. Once you reach the end, you'll be able to see which block or entity is ticking. Also, how long it is taking.

By default, a timings report will sort information so that processes that take the longest to tick appear first. These items are often the root cause of any server lag. This is the fastest way to determine the cause of your lag. Once you've identified the cause of your lag, you can go back and delete it from your server or change your settings to minimize its impact.

It can be daunting to read a timings reports. You have a lot of great resources to help you understand the timings report if you get stuck. Contact our support team for the best solution. Our tech support agents are experts in timing reports and can help you analyze them or guide you through how to read one if you get stuck.

How to fix a laggy Minecraft server

Server lag is preventable by learning how to optimize your servers. There are many tools to help you get the best performance out of your server. You can even push it beyond its current performance limits.

Tick/Lag Machines Can Be Removed

Redstone is a great mechanic for creating almost any type of machine. But too many machines can lead to problems. This will reduce your TPS and cause lag for everyone. This is why you need to limit the machines, and install anti-redstonelag plugins. You should limit the number of automated farms, mob grinding machines, and other devices that require complex redstone mechanics. It is a good idea to include a way to turn off your farms and machines, so they don't run all the time and consume your server resources.

Pre-generating your world

Pregenerating the world is an important step in lag elimination. This should be done before anything else. This is best done with the Chunky plugin. Install the plugin and then run the following commands: "/chunky radius 5500 followed by "/chunky begin".

This will pre-generate the 5,000 block radius surrounding your world spawn. The server will slow down while this process is running but it will soon be completed. Your performance will improve greatly once the process is complete. You can increase the radius however much you wish, but we recommend that it not exceed 20,000 blocks. You could create more lag than what you are trying to prevent by making it larger.

One option that is beneficial to reduce on any type of Minecraft server is the view distance from the server.properties file. Any number between 6-8 could optimize the server without affecting gameplay. To further improve server performance, it is recommended to change the view distance to 64 and the "Net Compression Threshold to 64".

We strongly recommend switching from Vanilla or Spigot to Paper. Paper offers excellent performance thanks to its optimization and anticheat features.

Optimizing your config files

Some of the main files that you will want to modify to really optimize your server are Bukkit.

yml. Paper.yml. Spigot.yml. Below are the settings that you should change to get the best performance and minimize any impact on your gameplay.

To use these settings, you need to stop your server in your control panel. Then click on the tabs that appear below to see the optimized settings. These files can also be found in your control panel's FTP File Access tab. You can access them online by clicking on "edit" at the top of the file. Once you are done editing be sure to click the green "Save" button, then restart the server for the changes to take effect.

Bukkit.yml

Spigot.yml

Paper.yml

Changing the base server files is not the only way to reduce or get rid of lag. There are many plugins that are specifically designed to reduce lag. You can reduce lag significantly on your server by knowing which plugins to use. Here's a list of plugins that we recommend the most to our users.

ClearLagg (1.14+), Limit Pillagers (1).14+), Village Optimiser 1.14.2+, MergedMobs 1.7+, Entity Tracker fixer (1.14+), Farm limiter (Premium 1.7+), Mob farm manager (Premium 1.7+), Spark 1.8+), StackMob (1.7+), Armor Stand Limiter 1.8+).

These plugins may not be able to stop all lag, but they can make a difference. If you do not know how to install plugins on your Minecraft server, We have an easy guide for you to follow.

Owning a server is an important aspect. Players don't expect to experience lag when they join a server. While you can't always prevent the client-side lag, there are things you can do.

If you are running a Vanilla Minecraft server, you may think that it won't experience lag. It's the base version of Minecraft after all. Unfortunately, the base version of the game doesn't provide many optimization options and can be slow. Newer updates such as 1.17+ have made the game a lot more resource-hungry. Switching to Paper, or one of its forks such as Purpur and Airplane, will dramatically improve your performance. Following this guide after switching to Paper will further improve performance, keep your players happy, and keep your server lag-free.

Report Page