You may experience chat, block and other delays on a Minecraft server. There are various causes, ranging from high CPU and memory usage to network issues. To simplify troubleshooting, first check the CPU usage in Command Center right when you experience performance issues. Next, refer to the appropriate sections below.
Based on our experience, too high CPU usage is the main cause of lag. To maintain best performance, try to keep your CPU usage below 100%. There are many different reasons for increased CPU usage. Mods, plugins, and world entities are the most common culprits.
If you’re wondering whether you can get access to more and “better” CPU resources, the short answer is “no.” As the Minecraft server is dependent on single-core performance, we only use the latest 3+ GHz Intel Xeon processors and don’t impose any hard limit on your usage. We also monitor our machines around the clock to ensure that you can always use at least one core. Since we already give you the best, the best way to identify the cause of CPU usage issues is to troubleshoot in-game.
Whenever you first start a server, you may notice some lag immediately while people are exploring. The world is divided into regions, which are divided into chunks, which contain a 16x16 area of blocks. Every time you see a new chunk, that chunk is generated by Minecraft.
Chunk generation takes up CPU. It is very common for this to cause lag on your server whenever someone is exploring the world. There is no way around this other than to wait for the lag to die down after the generation is complete.
If you are playing modded Minecraft using the Forge modloader, there is a mod that can help alleviate the chunk generation problem by quietly and automatically generating chunks before you explore, without using as much CPU. It is called Chunk Pregenerator. Try adding that to your server to see if it helps when people are exploring.
If you’re running a modded server, some mods can cause increased CPU usage and result in performance issues. Think back for a bit. Did you start experiencing lag after you started using certain items on your server? For example in Minecraft 1.6.4, Twilight Forest and certain Mekanism items, can be very CPU intensive. However, these are general experiences, and may not be relevant to your situation.
Fortunately, if you’re running Minecraft 1.6.4 or later, you can use Opis to identify the sources of your CPU usage: How to Use Opis to Diagnose Lag
For versions 1.10 to 1.12, instead of Opis, you would want to read: How to Use LagGoggles to Diagnose Lag
For those who are on older versions of Minecraft, open a support ticket, and we’ll run an external profiler to determine the mod(s) that are causing the lag. Unlike Opis, which has the ability to tell you the exact problematic blocks, our profiler can only give results at a high level.
Another common issue is too many world entities. One of your players might have blown something up, resulting in tons of unplaced blocks. Another might have spawned hundreds or thousands of monsters. Each one of these items or mobs will use up CPU and memory resources, and when there are many, will cause a noticeable impact on performance.
CraftBukkit, Spigot, and Cauldron were issued DMCA takedown notices. Because of this, CraftBukkit and Cauldron are no longer publically available. Spigot was largely rewritten for Minecraft 1.8+, but still suffers in a legal gray area. If you are running a Forge based server, you can use ForgeEssentials or the Forge version of WorldEdit for similar features.
To remove entities, make sure you’re running a server that can support CraftBukkit plugins, like CraftBukkit, Spigot, or Cauldron. Next, install Essentials or WorldEdit and run one of the appropriate commands:
/clear items -1
Sometimes your server may crash while trying to load because of the number of item entities everywhere. This might be due to a rogue collector of some kind not picking up the items from a mob farm, other other similar situation. There is a way to combat this:
max-tick-time=60000and restart your server.
In vanilla Minecraft, there is only one chunk that is loaded when you're not around, and that is the spawn chunk. However, in modded Minecraft, there are a lot of mods that offer the ability to keep a chunk loaded even when people aren't nearby. Some functions of mods require this, so it has its uses.
However, some players get in the habit of loading all of their chunks so that items can be created while they are offline. This causes a bunch of chunks to continue working even when no one is on the server. Servers should always limit chunk loading as a rule. We would also recommend that you turn off "easy" chunk loaders like the one found in FTB Utilities. Just check the configs of the mod and looking for chunk loading references. Turn them off if possible.
Java’s memory cleanup process, garbage collection, uses up CPU resources. In some cases, you may run into the memory limit of your server. You may experience extended high CPU usage at 100%, crashes with
OutOfMemoryErrors or spikes of latency. There is currently no way to tell in Command Center whether your garbage collector is using up CPU resources.
If you suspect this, open a support ticket, and we can check for you from our end.
If you have a popular server with players scattered across your map, reducing your view distance may help improve performance. From the Minecraft Wiki the server view distance:
Sets the amount of world data the server sends the client, measured in chunks in each direction of the player. It determines the server-side viewing distance. The “Far” viewing distance is 9 chunks, sending 441 total chunks (the amount of chunks that the server will load can be seen in the debug screen).
10 is the default/recommended. Tip: if you have major lag, reduce this value.
Reducing it may lower the CPU usage when you have many players on. It may also help players who have slower Internet connections.
If you've been playing on your server for a few days and it just keeps getting laggier and laggier every day, you probably haven't restarted in a while. A regular restart helps to keep the servers nice and fresh and happy. You should use our scheduler to create automatic restarts at least twice a day:
Scheduled Tasks. Click it.
Restart Everyto 12 hours, or even 6 hours.
Schedule Commandinstead, and set it for 5 minutes before your restart.
say Server restarting in 5 minutes.This will give your users a warning before the server suddenly restarts.
To check plugin resource usage, use the Bukkit
/timings command, and scrutinize the output.
When you start experiencing lag, run:
timings merged. The command produces a
timings[n].txt file in the
timings folder. Open it and look at how many seconds it took to process each plugin. If you need an easy to use timings file interpreter, try this timings tool. The ones that take the longest should be the most of concern. You can try temporarily disabling them and seeing if the lag improves.
Certain mods in Tekkit are known to cause performance issues. The following commands let you determine the most resource intensive mods in Tekkit Classic. When you experience lag, run:
modtiming start [seconds], where seconds is the duration to sample for. For example,
modtiming start 10, will sample for 10 seconds.
Try stopping the usage of the mods and seeing if performance improves.
Transient network connection issues or if you’re physically far away from your server can make your Minecraft server appear less responsive. Before continuing with the directions below, we recommend trying to use a wired connection and making sure that the users on your network aren’t downloading large files or consuming a lot of bandwidth.
You and your players can test the connection quality from your computer to your server by testing in game and running the ping and trace route commands.
testappears right away in your game window. A delay indicates network latency.
To provide further diagnostic information, run the ping and traceroute commands and send us the results.
Sometimes reducing the server view-distance can help players who have slower connections:
Your server may appear to lag, but in reality it’s your client. To check your frames per second (FPS), press
F3 within Minecraft. It’ll display your current FPS. Anything above 20-30 FPS should provide adequate gameplay. If it’s below 20-30 FPS, try adjusting your video settings in game. Try using the following settings:
You can also attempt to use mods like OptiFine and FpsPlus to increase your framerate and improve your client side rendering performance. However, mods like these rewrite the default Minecraft rendering engine and game logic that the game and other mods depend on. You could experience weird errors, visual glitches, or crashes. Most people trade stability for some increase in performance.
Finally, there are other more obscure causes of lag. The SK Minecraft Wiki has a detailed list. This list includes causes and instructions to solve them.
Please contact support if you continue to experience any issues.
Powered by WHMCompleteSolution