If you experience lags, make sure to identify the correct kind of lags first. This article explains the different kinds of lags and how you can identify them: Lags
This article covers several general ways to find and solve server performance issues. Minecraft is a complex game and lots of factors influence the performance of a server.
If you want to track down your specific performance issues, you can use the plugin/mod spark. We have an article with detailed instructions here: Identify server performance issues using spark
Make sure to carefully read this article and follow the instructions to improve your server performance.
PaperMC is a software which contains several enhancements over the vanilla version to improve performance. Additionally, it supports the installation of plugins.
You can install it here: https://exaroton.com/software/papermc/
Admittedly, PaperMC does not solve all problems, but still worth the switch. By the way, the rule that the newer the version the better also applies here. They always contain the latest improvements and corrections.
There are a few other tricks on how you can reduce lags.
Mobs: For example, mobs have a big impact on performance. We do not recommend keeping many mobs (animals or monsters). Limit yourself to a few.
Items: Having many items on the ground can cause performance problems. This can for example happen when you give a player a very large number of items through the /give command. You can delete all dropped items on the ground with the command
Random tick speed: The random tick speed is a gamerule that changes how often certain random events in a world occur (read more here). Setting this gamerule to a high number can harm the performance. You can set it back to the default value of 3 using the command
/minecraft:gamerule randomTickSpeed 3
Also, loading chunks has a big impact on performance.
Exploring: Exploring new areas causes large lag spikes and decreases performance massively
Loaded chunks: It is also worth reducing the number of chunks loaded, especially if you play with several players on one server. This means that if there are many players close to each other it is better for performance than if there are many players far away from each other. We already reduced the number of loaded chunks for 1.14 and newer servers, you can find more information about that here.
Do you use plugins, mods, or a modpack?
Too many or misused mods, plugins, or worlds can cause server lags. Make sure to install a reasonable amount of plugins and don't create too many worlds. Mod features, e.g. machines or chunk loaders also can cause lags. To identify the problem here, it could be helpful to check your log (https://exaroton.com/log).
It is also possible that a single mod contains a bug or is just not really performant and causes on its own to slow down your server. Try to remove mod by mod to find out if you are affected by such.
It is not really likely, but possible, that an exaroton host machine is temporarily overloaded. This should be only for a few minutes and only occur rarely. In this case, you can only wait or completely stop and start (not restart) your server.