With Minecraft offering so many settings, mods, and plugins, there are several ways to improve server lag.
Common Reasons:
- Too many players without sufficient RAM.
- Too many mobs/items without sufficient RAM.
- The player is too far away from the server.
- Corrupt chunks/Entities
- Too many worlds are running on the server without sufficient RAM.
- Errors are spamming in the console.
- Too many plugins are running on the server without sufficient RAM.
Console Errors
Always check for console errors before submitting a ticket.
Step 1. Check the console for any errors. If there are any SEVERE errors, this may be the cause of the lag.
Step 2. Try to troubleshoot these errors. MelonCube has a knowledgebase full of guides.
Do not be alarmed if there is an End of Stream with a SEVERE tag unless this is spamming in the console.
TPS Lag (Server Lag)
The next type of lag is server lag. In Minecraft, it is called TPS. TPS stands for Ticks Per Second. TPS, also known as game ticks, is limited to 20. 20 TPS is hardwired into Minecraft as the universal speed. That is to say, the smallest amount of time possible is distinguishable from the game's perspective. Each "tick" causes the game to recalculate the directions of mobs and other things, such as growing crops and adjusting mob directions.
To get an idea of how long it is, each redstone tick is equivalent to 2 game ticks. This is also why redstone "half" ticks exist: they are 1 game tick. Remember that TPS and FPS are different—the server's speed and capabilities determine TPS. FPS is based on the player's computer.
Reduce View Distance
It is recommended to reduce the server's view distance from the default 10 to a value between 6 and 8.
ClearLag
This plugin is excellent, highly configurable, and recommended for any server. ClearLag can be found here.
Step 1. Once ClearLag is installed, run the command lagg check to see how many entities are on the server.
Step 2. If it is a small server, anything over the value "500" may be the reason for the lag.
Step 3. If there are many entities, run the commands lagg clear and lagg killmobs. This will remove the lag-causing entities from the server, i.e., items on the ground and mobs.
Remove Plugins
The more players and plugins there are, the more RAM is needed. If there are many plugins and insufficient RAM, the server will be overloaded, causing lag spikes and crashes.
The best thing to do is limit the number of plugins on the server, as some, such as Survival Games, can use up to 1GB of RAM.
Corrupted Chunks + Entity Buildup
A common issue with Minecraft servers is world "chunks" becoming corrupted—for example, Chunk Corruption Errors. Additionally, entities can accumulate in the world, and many entities in a small area (mobs, items on the floor, etc.) can also cause FPS and TPS lag. Running a region fixer is suggested. When running a server with MelonCube, a support ticket can be created to get this done. Alternatively, the player can use the Minecraft Region Fixer tool.
Low Memory
Running the server without enough memory for the world/plugins/mods can often cause lag. Read more about this here: Out of Memory issues.
FPS Lag (Client Lag)
As a player, client lag is concerning. This lag is a direct result of the client, caused by their computer running Minecraft. Client lag is affected by many entities (e.g., thousands of dropped blocks or animals) and other related items, such as light values on structures running shader packs, mods, etc.). This will cause the FPS (Frames Per Second) to drop and is the most common type of lag.
When playing on servers, this is reduced because the game engine calculations run on another computer (the server), minimizing the work the player's computer needs to do and giving the player more resources to play the game. This is the only kind of lag affected by the computer's quality.
Fixing FPS lag
The Optifine mod can help players achieve higher FPS with the same quality. Another strategy is to create a void world with only the spawn area, removing all unnecessary land.
Additionally, if the spawn area is within the same world where players will be playing, using WorldEdit to fill the caves below with stone can help reduce the number of light values calculated when a player spawns.
Another helpful step is to remove any unnecessary and fast-flashing redstone mechanisms. To limit the presence of mobs near the spawn area, WorldGuard can be utilized on regions and flags to block mob spawning.
Latency
Finally, there is Latency or Internet lag. Internet lag usually results from being geographically far from the server host. This means the electrical impulses take many milliseconds to reach the server and then travel back. There can be a lag between the computer's input and its appearance on the player's screens, for example, when placing a block in front of a friend.
Firstly, the player has to click to place the block; that information then has to travel up to 12,756 km (the Earth's diameter) to the server. Then, this information must be processed and sent to the player's friend's computer, which might be up to another 12,756 km away. Traveling this long distance can take a while.
Other kinds of internet lag can include bandwidth issues, common during a DDoS (Distributed Denial of Service) attack, when the server is bombarded with so many connections that it is unable to process standard traffic. This is similar to how roads slow down and back up when there are many cars.
Fixing Latency Lag
To check latency with a server, log in to Minecraft and add the server to the test. When it's added, a small icon will appear in the top-right corner of the server field, just above the server's slot count. Hover over the icon to see the ping of the server.
Fast Ping: <100ms>
Medium Ping: 100-200ms
Satisfactory Ping: 200-300
Slow Ping: 300-500ms
Laggy Ping: 500ms
Latency lag occurs when a player is too far from the server, resulting in a slight delay in the connection. Check the server Daemon/Node location and assess its proximity to MelonCube servers. If any of the server locations are closer than the current server's location, submit a ticket to request a free transfer.
Want a super-fast, lag-free server experience? Get a Minecraft Server with MelonCube and run a server with the experts!