BeastNode Game Server Hosting

Checkout our new range of Cheap Game Server Hosting! Including Rust, Terraria and Valheim!

Starting at only $2.11/mo!

Don't worry our Minecraft Servers are here to stay!

Minecraft Hosting Game Servers

Common Causes of Lag

The first thing to do when your server appears to be lagging is to try and isolate the cause of the lag - without knowing what is causing the problem there is no way to effectively fix or reduce it.

Before anything else - please make sure that the issue persists after a server restart.
One of the most common causes of lag - especially on Vanilla servers where you don't think about it as much - is that the server has simply not been restarted recently. 

Regular restarts will unload all of the loaded chunks that are not actively in use, which reduces the server resource usage - on newer Minecraft versions in particular this is important due to chunk loading/generation being a common cause of performance issues.
You can set up a scheduled task to regularly restart the server for you - which we recommend setting up for every 10-12 hours at the very least. There is a guide on setting up these scheduled tasks here.

Is the lag serverside or not?

If the lag does not occur for all players that are online at the time, even if they are all stood in the same part of the server world, then the problem is highly unlikely to be serverside and far more likely to be clientside.

With clientside lag, lowering your launchers video settings can help with this - such as disabling the sky/clouds/fog, decreasing particles and lowering the chunk view radius. Lowering the servers view-distance in the can also help as the lower this is the less chunks and entities around each player the server loads in at once that the client then has to process.
If the lag does occur for all players on the server, but only in certain areas of the map then it is local-lag. This can be caused by a number of things in that area such as a large amount of tile/block entities (the same applies to modded tile/block entities) a build up of general entities, such as mobs at a mob grinder/farm or a large amount of item drops/arrows/xp orbs, or flowing liquids such as lava (or modded flowing liquids - Water is rarely an issue). Reducing these can help with local-lag.
Server-wide lag, for all players at the same time regardless of where in the world they are, is most commonly caused by mods, plugins or world errors such as entity/chunk errors or corruption.
How to fix the lag?
As stated above - you first need to isolate the actual cause of the lag. Lag can be caused by almost anything on a server - it can only be fixed by resolving what is actually causing it.

The potential causes of lag vary depending on what you are running on the server - Vanilla, Plugins, Mods etc... While we can't list all the possible causes, we will list the main ones to check for before anything else here.
Common Misconceptions About Lag:

The most common misconception about lag is that it is RAM based and that throwing more RAM at the server will fix it - RAM is very rarely the actual case.
A simple way to tell if low free RAM is causing problems on your server simply look at the Memory meter on your control panel. If this shoots up to 100% straight after a server restart then an upgrade to a higher package to increase the RAM is recommended - if it does not, then an upgrade to a higher RAM allocation is unlikely to make any difference to your problem (excessive amounts of free RAM does not benefit a server in any way).
Note - The Memory meter is not your servers current RAM usage (if it was then your server would crash immediately as soon as it hit 100%). It is only how much of the allocation your server has accessed since the last restart - for an accurate reading you would need to use a plugin (for example EssentialsX's /gc command).

The next most common misconception is the system specs/CPU being the issue because the CPU meter on the control panel is at 100% - this is not the case.
The CPU meter on the control panel is not accurate, it's a rough indication of your server load only - when it is at 100% (during gameplay, it will also show as 100% during startup/shut down) it is simply indicating that something running on your server is causing a spike in the server load. It also does not mean that your server has issues if it is at 100% - if your server runs fine, the CPU meter can be completely ignored - it just means if your server is having issues you can check the meter and if it is at 100% then it is telling you something is causing high load.

Common Lag Causes/Fixes on Vanilla:

Along with the above misconceptions there is also the assumption that a Vanilla server will run fine and that because you are not using mods/plugins you should not have issues - also not the case.

Vanilla Minecraft has not been "Stable" for a long time now, and is actually considered much worse for performance compared to server software such as Spigot or PaperSpigot - if you are running a Vanilla server and have performance/lag issues please read the post here on the forums in full before anything else:

Common Lag Causes/Fixes on Spigot/PaperSpigot etc...:

For servers running plugins any plugins that give errors in the console should be either updated to the latest release for your server version or be disabled/removed to see if it helps the issue, and if it persists when no errors are given, all plugins should be disabled to see if the issue persists without them. If it does then add them back a few at a time until the issue starts again to find the cause and remove it (report it to the plugin devs too so they can look into it and fix it if possible).

Another way to test if a specific plugin is causing issues is to run a timings report, which will help to indicate any problem plugins - you can read up on doing this HERE.

If the issue is present without any plugins then they are not the cause and it is likely either the server version itself (see above) or issues with the world itself.
To test whether the world is the cause, due to chunk/entity errosr or corruption, a new world will need to be loaded on the server.
To do so enter a new world name in the World box on your control panel, hit Save at the bottom of the page and restart the server (If you have MultiWorld/MultiVerse installed these should be disabled whilst testing this as they will still load every previous world ontop of the new one). Your old world will still be in the files, the World box simply dictates which folder in your server files the world is being loaded from, and if it is a name not already present in the files it will generate a new one in a folder with this name.
If the issue persists with a blank world then your world is not the issue - if it does not then your world is the problem and you would either need to restore a backup of the problem world from before the issue started, or load a new world to resolve the issue.
Common Lag Causes/Fixed on Modded Setups:

Unfortunately there is little that can be suggested/recommended when it comes to modded setups, as any single mod - no matter what that mod does - can cause problems if it has been coded incorrectly/has bugs (this is simply how modding works - with any game).

Unlike with plugins disabling mods is not recommended - if the world is loaded without the mods it was generated with then any blocks/items/mobs from that mod will be removed from the world when it is loaded, which can itself cause world issues.
All we can really suggest is to keep an eye on the server console for any errors to suggest specific mods causing issues, to lower the view-distance in the as suggested for Vanilla above, and to restart the server regularly. 

In general performance issues should always be somewhat expected when running any form of modded game.

Misc Lag Causes/Fixes

Another common cause of lag is increasing the randomTickSpeed gamerule - by default it is 3 and it is not recommended to be changed unless you specifically need it changed, especially when increasing it as this will cause problems. You can check this with '/gamerule randomTickSpeed' and change it with '/gamerule randomTickSpeed <number>' (never set this to 0 as this will stop a lot of server activity from working, such as crop growth).
If none of the above helps, or you want us to take a look and see if we can find the cause, please submit a support ticket with as much information about the problem and what you have already checked and tried to fix as possible and we will take a look at things for you!
  • 17926 Users Found This Useful
Was this answer helpful?

Related Articles

World/Chunk Errors or Corruption

There is, unfortunately, always a risk of world/chunk errors or corruption happening on any...

Server Offline / Loading Icon

For certain builds of server jars that you upload as a custom jar the Multicraft control panel...

Out of Memory

Usually, out of memory errors (and other errors that are similar) is due to your server basically...

Whitelist Disabled But Getting "You Are Not Whitelisted" On Join

If the whitelist is disabled in your servers file and has been restarted to...

Failed To Check Session Lock

Failed to check session lock errors can occur randomly and usually begin with this...