Is your server lagging to the point it is almost unplayable? Do you notice yourself rubberbanding constantly? This guide will talk you through all of the steps and suggestions for troubleshooting and setting rid of lag. Lets get started!
Server issues
Some lag issues may be caused by the server itself. Below are common causes!
Not enough resources
It is entirely possible that your server may not have enough RAM or CPU resources to properly run your SMP/Game server. Resources are taken up by plugins, mods, and players, among other things. While we suggest you look at the rest of the article, please feel free to reach out to support. They may be able to assist you in temporarily upgrading your server resources, so you can see if this is the problem!
Your view distance is too high
When your view distance is too high, the server will expend all of its resources by loading or generating chunks around players. This may lead to a crash if you have too many players loading too many chunks. A view distance of 6 is recommended, as that will only require that the server loads 144 chunks, as compared to the 400+ it would need to load at 10 or more view distance. This setting can be changed in the server.properties file!
Using an unoptimized software
If you are running a server for the first time, it is very likely you might be running an unoptimized server software, like CraftBukkit or Spigot. We recommend using an optimized software based on Spigot, like Paper or Purpur! We wrote an entire article for you outlining the difference between the many choices!
Broken or Outdated plugins
Plugins that are outdated or broken are known to consume large amounts of both RAM and CPU. Some can even result in your world being corrupted. To double check if any of your plugins are outdated or broken, please check your server.log file, and look for entries that start with the [SEVERE] tag. It is suggested that you either update or remove the plugin causing issues. If you notice increased RAM/CPU usage, and a plugin is throwing severe errors, do not ignore it! This may cause a memory leak, which can lead to crashing and world corruption!
Intensive activities and plugins
Lag can be caused by some plugins and ingame activities. If your server uses a custom World Generation plugin, like Iris, your server will consume more resources to ensure that the custom generation works flawlessly. You may also encounter lag if you have a plugin that prevents people from using xray. Another cause for lag can be NPCs. One of your players may have a village farm, or maybe you have too many entities in a loaded chunk. Loading all of those entities at once can take a serious toll on your server’s performance.
You also have to be on the lookout for players who may want to purposely crash your server. This can be done in many ways, like entity cramming, redstone spam, or using hacks to fly in a certain direction quickly, forcing your server to generate new chunks rapidly. These issues can be solved by using a plugin like ClearLagg!
Reloading your server
Reloading your server by using the /reload command can make your server lag or crash by causing a memory leak. It is recommended that you use a plugin like Plugman to properly restart or reboot plugins without having to reload the server. Some plugins may also have a built in reload command!
Infrequent restarts
Restarting your server frequently will help get rid of server lag by freeing RAM that may have been horded due to a memory leak. It is recommended that you restart your server at least once a week.
Outdated Minecraft Version
Newer versions of Minecraft often come with performance fixes, so it is recommend that you always update to the latest stable version of Minecraft! If you want to stay on a specific version, please make sure you download the newest version of that software, so you can get all of the fixes.
Client Issues
Some types of lags are caused by issues on the client (Player’s) side
Connection Lag
If you have a higher latency to the server, you will experience lag. This is simply due to how your game communicates with the server. If you have a ping of 0-100ms, you should have a enjoyable experience. You will notice some lag at 200ms, and it might become unplayable at 200+ ms. To get a general idea on how good your connection to the server will be, ask support for a test IP. They should be able to provide one you can ping. Simply open your command prompt and type in ping <IP>. (For example, ping 1.1.1.1)
FPS Lag
FPS, or Frames Per Second, can massively affect your gameplay. It depends on numerous factors, including server performance, and your pc’s performance. If you are playing a modded server, or if you have numerous resource intensive programs running on your PC, you will encounter FPS lag. This is when the game cannot handle what is going on in your game, so it slows down to prevent itself from crashing. FPS lag can be helped by using tools like Optifine. You can also change your ingame graphics settings to better suit your PC’s specs.