Skip to main contentdfsdf

Home/ lierbrow37's Library/ Notes/ Minecraft Server Optimization

Minecraft Server Optimization

from web site

Dhaka's Minecraft Blog


Lag is a major concern for server owners. 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 are hardware-free. There are many ways that you can reduce 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 three types of lag: latency, TPS, and FPS. 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 of Lag



Server Lag (TPS)



TPS (Ticks Per Second) is an indicator of overall server performance. TPS is the server's heartbeat. Your server's TPS is a fixed rate of 20 ticks/second, which means that one tick occurs every 0.05 second.



Each tick advances various aspects of your server a little. Mobs move grass grows, animals hatch, and almost everything else on the server is dependent on ticks. When at peak performance, 20 TPS, you'll experience normal gameplay without any server-side lag. But if your server's TPS starts to drop, you'll begin to notice lag while you play.



What occurs on the server, as well as the hardware it is running on, plays an important role in determining the server's TPS. A server that is not managed properly can have the same effect as poor hardware.



When adding mods or plugins, you should be thinking about the long-term effects of your choices. Many server owners mistakenly believe that the server's number is the only factor that affects its performance. Although the number of players on a server can have an impact, it is not as significant as the impact of mob farms, redstone machines, and mods/plugins. TPS drops are primarily caused by what is happening in your world at any given time.



Client Lag (FPS)



A low FPS will usually mean that your game behaves slowly. You may feel like you're watching a slideshow when your frame rate drops to a low level. 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 very important that you know that there is a difference between server lag and low FPS. Sometimes, low FPS and server lag can occur simultaneously. You may think that low FPS is due server lag but it is often an issue with your device.



There are many ways to fix low FPS without needing to upgrade your hardware. You can reduce the functions of Minecraft by going to the video settings. For example, you can turn clouds off so that your computer doesn't have to try and render them. It's also a good idea to close other processes running in the background that you don't need. This will free up resources for the game. This can be done quickly by closing any open Taskbar items.



Another option is switching to the high performing plan in your device’s energy options. If you are on a Windows PC, you can do this by pressing the Windows Key + X to open a new context menu. Next, select "Power Options" and you will be able to access 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 the time it takes for data to be processed and transported in milliseconds. If your ping is high, it's possible your connection may be lost. High ping is not a sign of lag. It can cause lag. It can also cause the game to crash due to instability.



Having a low ping is best as lower latency provides smoother gameplay. Your ping will increase the farther away a server is to your physical location. The best way to minimize this is to move your server to the location closest 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 check the latency of a server by "pinging it". This tells the server how long it takes to receive a message from you and reply. There are several ways to test your server's ping. We recommend using your command prompt. MINECRAFT BLOG Open a terminal, or a command prompt (Windows+X also supports this), and then type "ping serverIP". For example: "ping play.apexmc.co". Although the process can take up to a second, you should be able to see the average ping once it is completed.



Create a timings report



A timings reports allows you to track how long it takes your server for an event to be processed. This allows you see where there may be lag issues, which can cause the server's TPS drops. To run a timings report join your server and run the command /timings on and after ~30 minutes, run the command /timings paste. This will give a link. Click it to open the report in a browser.



A timings report



The top section of the timings reports will contain a simple graph which shows your server’s average TPS over time. It is displayed in five-minute intervals. Below the graph is a brief overview of the server, with 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. You should focus on the data below the graph to diagnose the cause of lag.



The lower portion of a timings report contains a complete breakdown (also called a "tree view") of every tick that occurred during the reporting process. Each tree begins with a general overview of the type tick occurring. The top tree will often give a summary of the average ticks for the entire server. You can click on these trees to expand them and get more detailed information with each layer. As you get to the end of each layer, you can see which block is ticking and how much time it takes.



A timings report will automatically sort information so that the processes that take longer to complete appear first. These items are often what causes any lag on the server. It is easiest to identify the cause of your server lag by looking at the top trees. Once you know the cause, you can go back to your server and remove it, or edit your settings to reduce the impact it has.



Reading a timings report can be a little intimidating at first. You have a lot of great resources to help you understand the timings report if you get stuck. Your best option would be to contact our support team. Our tech support agents are well-versed in timings reports and can assist you with any questions.



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 removed



Redstone is a fantastic mechanic that can be used to create almost any type or machine. But, too many machines can cause problems. It will cause lag for all players and decrease your TPS. Limiting the machines and installing anti redstone-lag plugins like this one is the solution. 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 you do 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. While the process is being run, the server may lag a bit but performance will improve significantly once it is finished. You can increase your radius as much or as little as you want, but we recommend keeping it below 20,000 blocks. If you increase the radius, you can create more lag that you would like to prevent.



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 should help with optimizing the server without being detrimental to gameplay. To further improve server performance, it is recommended to change the view distance to 64 and the "Net Compression Threshold to 64".



If you are running Spigot or Vanilla, we strongly recommend switching to Paper. Paper provides outstanding performance because it has many optimization and anti cheat features.



Optimizing your config files



Bukkit is one file you will need to modify to optimize your server.

yml., Paper.yml., and Spigot.yml. Below is a list of settings that you can change to get maximum performance with minimal effect on gameplay.


To access these settings, first stop your server by going to your control panel. Next, click on the tabs to display the optimized settings. These files can be found under the FTP File Access tab in your control panel. You can open them in the online web editor by clicking on the "edit" button to the far right of the file. After you're done editing, click the green "Save" button and restart the server to apply the changes.



Bukkit.yml



Spigot.yml



Paper.yml



Modifying the base server files isn't the only way to reduce lag. Many plugins are available that can 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.8+), Limit Pillagers (1.14.2+), Village Optimiser(1.14.2+), MergedMobs, Premium 1.7+), Entity Tracker Fixeder (1.14+), Farm Limiter, (Premium 1.7+), Mob Manager (Premium 1.7+), Mob Limiter, (Premium 1.7+), Mob Farm Manager, (Premium 1.7+), Spark (1.8+), StackMob (1.16+), Armor Stand–Limiter (1.8+



Although these plugins won't stop all lag from your server, they can help. 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. When players join a server, it is not expected that they will experience lag. It is impossible to control the lag that clients experience on client-side. However, there are some things you can do to reduce server-side lag.



If you are running a Vanilla Minecraft server, you may think that it won't experience lag. It's the base game. Unfortunately, the base game doesn't offer a lot of options for optimization and can be really laggy as a result. Newer updates like 1.17+ have made it more resource-hungry. Switching to Paper, or one of its forks such as Purpur and Airplane, will dramatically improve your performance. This guide will help you improve performance, keep your servers lag-free, and keep your players happy.

lierbrow37

Saved by lierbrow37

on Aug 30, 22