Articles on: Minecraft

Diagnosing lag on your Minecraft server

I HATE LAG!!!



Don't we all? Luckily, Lilypad provides the tools and support you need to quickly diagnose and fix the most common causes of lag. Unluckily, we're taking money from your bank account every month. Checkmate.

While some statistics may lead you to believe your server is lagging, it's important to check if you're actually experiencing lag in-game. If you're not, then there is probably nothing to worry about.

Diagnosing lag can be confusing sometimes. If you need any help throughout the process, don't hesitate to contact us via live chat or our Discord server

Make sure you have spark installed on your server. Modded servers will automatically have the mod installed if you use our Software installer. Modern plugin servers running Paper/Pufferfish/Purpur/other Paper forks will have spark built-in.
Run the spark profiler open command in your server's console, and click the link in sends in console. If it says "The profiler isn't running", run spark profiler --start, wait 15+ minutes (the longer the better), and then repeat this step.

A spark profile from an 8GB RAM server that isn't lagging
If your TPS, MSPT, CPU, and Memory are all mainly green, then that means the lag you're experiencing is most likely not caused by the server and could be client lag (FPS) or network lag (poor internet connectivity). To resolve FPS drops, try allocating more RAM to your Minecraft client (not your server).

Ping statistics from a server that isn't lagging
It's fairly normal to see ping as high as 300, especially if your players are connecting from all over the world. You may experience a few ping spikes due to your internet connection or similar. If lots of players are experiencing extremely high ping, please contact us!
If only one or a few players are experiencing networking issues, have them install 1.1.1.1 to see if that helps (it does some magic routing fixes).

If you're still experiencing lag in-game, the next thing to check are specific plugins/mods.

In your spark profile, click the plugins/mods button in the top navigation bar and scroll down until you reach a list of your mods/plugins:


The ones listed at the top are the ones most likely causing the lag. However, it's important to note that these may not be the root cause of the lag! If the percentages for the mods/plugins at the top are low/green, then they most likely are not a problem. It's typically only a concern if their percentages are significantly larger than the rest of the mods/plugins.
If you have a list of suspected plugins/mods, try temporarily removing those to see if they're really the ones causing the lag. You'll want to take a backup first before removing anything. If not or removing them didn't work, return back to the all page on your spark profile
Scroll down to the bottom until you reach the text that reads Server thread 100.00% and click on it
Continue expanding, clicking on the largest percentages each time, until you reach recognizable details (such as a mod/plugin name, or vanilla features such as entities/chunk loading)

Typically, when lag is noticeable in-game, these large-number nodes will be orange, red, or just significantly bigger than the rest of the nodes next to them.

However, if the nodes seemingly responsible look like this (including text such as wairForTasks, LockSupport.parkNanos(), and Unsafe.park() ), then it means spark is not detecting any lag on your server. You may not be experiencing server lag, but rather FPS or ping (internet) lag. Or, you may need to find a new way to diagnose your server lag.



If you see a bunch of nodes referencing Minecraft commands, the lag you're experiencing is most likely being caused by a datapack. Datapacks can cause a lotof lag, especially if you have a lot (5 or more generally). There are some other profilers you can use, such as Minecraft's /perf command, that can help you determine exactly which datapack is causing the lag.

Now that you know what is causing the lag, you can take actions to squash it! For example, if it's entities, you can lower your view-distance, simulation-distance, and entity spawn rates.

If you're using a pre-made modpack from Modrinth, CurseForge, or similar, it'd be best to contact the author of that modpack, as they will know best how to resolve lag and potential issues.


spark has some useful docs over at this link which may be suitable for more advanced users.

Updated on: 11/03/2025

Was this article helpful?

Share your feedback

Cancel

Thank you!