Return to site

Minecraft Server Optimization

  One of the biggest concerns for server owners is lag. Lag can be caused by a variety factors, including the resources your server uses or the hardware it 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 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 several types of lag, including 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. A server's TPS is like a heartbeat. Your server beats at a fixed rate, 20 ticks per second. That's one tick every 0.05 seconds. Each tick is a small step in the progress of various server aspects. Mobs move, grass grows and animals spawn. Almost everything that happens on the server depends upon 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. The server's performance and the hardware it runs on play a significant role in determining its TPS. A server that is not managed properly can have the same effect as poor hardware. When adding mods and plugins to your website, it is important that you consider the long-term implications of your choices. Many new server owners mistakenly assume that the server's performance is determined by the number of players. 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 due to what you are doing in your world at the given time. Client Lag (FPS) Having low FPS will generally come with your game behaving slowly. A low frame rate can make it feel like you are watching a slideshow. Low frame rates on your server do not necessarily indicate that the server has stopped responding to your requests. It could simply mean that your computer is not able to keep up with the game. Minecraftservers 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 options to fix low FPS, without having to upgrade your hardware. You can adjust the video settings in Minecraft to reduce certain functions. You can also turn off clouds to save your computer from trying to render them. It's also a good idea to close other processes running in the background that you don't need. This allows your computer to use more resources for the game. You can accomplish this quickly by closing all tabs on your Taskbar. Another option is to switch 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) Your ping correlates with connection lag. Ping refers the latency between your server and your game. This is how long it takes data to travel and process. It is possible for your connection to the server not to work if you have high ping. Having high ping is not something that's due to lag, but it causes lag. It can also cause a crash in the game. Having a low ping is best as lower latency provides smoother gameplay. Your ping will rise the farther a server is from you. 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. By pinging a server, you can determine how latency is on that server. This will tell you how long it takes for a server to respond to a message. There are many ways to test your Ping, but we recommend using your Command Prompt. Open a terminal, or a command prompt (Windows+X also supports this), and then type ping serverIP. For example: 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. How to create a timings reports A timings report lets you monitor the time it takes for your server's event to process. This report allows you to spot potential lag issues and causes the server TPS drop. 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 you a link. Click on it to open your report in 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 shows a brief overview of your server, along with the average TPS. These are a nice way to get an idea of your server's performance at a glance, but they won't tell you why your server is lagging. 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 provides a broad overview about the tick type. The top tree will often give a summary of the average ticks for the entire server. These trees can be expanded by clicking on them to get more information for each layer. As you reach the end of the series of layers, you will be able to see what specific block or entity is ticking, and how long it is taking to tick. By default, a timings report will sort information so that processes that take the longest to tick appear first. These items are often responsible for any lag that you might be experiencing on the server. The fastest way to find the source of your lag is to go through the top trees. Once you identify the cause, it is possible to go back to the server to remove it, or to modify your settings to reduce its effect. It can be intimidating to read a timings report. If you get stuck or if you are not sure you are reading it right, you have some really good resources to help clear up any confusion. Contact our support team for the best solution. All of our tech support agents are familiar with timings reports and can analyze them for you, or walk you through how to read a report if you are getting stuck. How to fix a laggy Minecraft server Server lag can often be avoided by knowing how to optimize your server. There are many tools that you can use to optimize your server and push it beyond its normal performance limits. Tick/Lag removal Redstone is a great mechanic for creating almost any type of machine. But, too many machines can cause problems. It will decrease your TPS and cause lag to all players. 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 first before anything else. The Chunky plugin is the best way to do it. All you have to do is install the plugin and run the following commands: /chunky radius 5000 followed by /chunky start. This will pre-generate an area of 5,000 blocks around the world spawn. The server will lag heavily while the process is running, but once it is done your performance will improve dramatically. You can increase the radius as much as you like, but we recommend keeping it under 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 will optimize the server and not affect gameplay. To improve overall performance, it's recommended to change both the Net Compression Threshold, which is 64, and Max Tick Time, to -1. If you are running Spigot or Vanilla, we strongly recommend switching to Paper. Paper has a large number of optimization and anti-cheat features to provide excellent performance. Optimizing your config files Some of the main files that you will want to modify to really optimize your server are Bukkit. yml and Paper.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, stop your server from your control panel then click on the tabs below to show the optimized settings for each file. These files can be found in the FTP File Access tab of your control panel. These files can be opened in the online editor by clicking the edit button located at the bottom of the file. After editing is complete, click on the green button to save the file. The server will then be restarted to allow the changes to take place. Bukkit.yml Spigot.yml Paper.yml It is not enough to just change the base server file. Many plugins are available that can reduce lag. Once you are familiar with which ones to use you will find that lag can be significantly reduced on your server after installing one or two plugins. Here's a list of plugins that we recommend the most to our users. ClearLagg (1.8+), Limit Pillagers (1.14+), Village Optimiser (1.14+), MergedMobs (1.14+), Entity Tracker Fixer (1.14+), Farm Limiter (Premium 1.7+), Farm Manager (Premium 1.7+), Mob Farm Manager (1.14+), Farm Limiter (Premium 1.7+), Lag Assist (1.18+), Spark (1.16+), Armor Stand-Limiter (1.8+). These plugins are not guaranteed to completely stop the lag on your server, but they can go a long way to 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. Players don't expect to experience lag when they join a server. Although you cannot control the lag clients experience, there are many things you can do to avoid 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. The game has become resource-hungry with newer updates, such as 1.17+. Your performance will be greatly improved by switching to Paper or one its forks, such as Purpur or Airplane. This guide will help you improve performance, keep your servers lag-free, and keep your players happy.

Minecraftservers