This guide will include plugins and other optimization tools you can use to improve the lag on your server if you are not reaching 20TPS (Ticks Per Second). A combination of all these tools will work the best, and you can tweak certain settings to your liking.
Paper is a Minecraft Server API which is built on Spigot and Bukkit. Paper contains numerous improvements and optimizations resulting in a significant improvement in performance. Paper also includes the next version of Timings, enabling you to quickly find out what's slowing down your server.
Paper adds features like a-sync chunk generation, customization of game saves per tick and a ton of others which are crucial for 1.14+.
Because Paper is built on top of the Spigot API, it is compatible with all Spigot plugins. (If a Spigot plugin isn't supported by Paper, then the Dev of the plugin should find another job)
Paper also has a built-in anti-Xray, which works way better than most plugins I've seen for the same issue, and is easy to use and setup. Make sure you don't go overboard with the config because this can hurt your server and players performance.
PaperMC has a setting in
paper.yml config file called
no-tick-view-distance . This allows you to change how far players can see. It's similar to the
view-distance setting in
server.propertiesexcept that this view distance isn't ticked, and thus doesn't use as much server resources. You can think of the no tick view distance as how far the player can see, and normal view distance as how far from a player the game will actually do calculations.
The gold blocks here represent the view distance, where mobs will spawn and crops will grow. The diamond blocks here represent the no-tick-view distance, Because no-tick view distance doesn't affect the server very much, you can set it to high values without much consequence (ex:32 chunks). You also want to make sure that the no tick view distance is higher than the actual view distance.
Timing reports are built-in to Paper, which will display data on what your server is doing. With Timings you can easily figure out why your server is having lag.
To use Timings you need to know 2 commands:
Timings will start as soon as your server launches, so you can do
/timings paste at any given time to get your Timings from startup to the moment you run the command. If you want to get Timings from a specific time frame, run the commands above to create your own time period.
We recommend to run Timings for at least 10 minutes and up to an hour while you are experiencing lag to find out why you your server is experiencing lag, and what is causing it.
After you run
/timings paste you will be given a link to your Timings Report, which will direct you to a webpage where you can view your timings. If you aren't experienced in reading Timing reports, you can join the Admincraft or PaperMC Discord to ask for help. There are tons of experienced people in these Discords which can help you in the right direction!
Two Members of the SpigotMC community have written and been updating a Guide on how to optimize your
server.properties files which are crucial to use for 1.13+ servers. Without optimizing these your server will be horridly un-optimized and will most likely go below 20TPS all the time.
A link to this Guide can be found here: https://www.spigotmc.org/threads/guide-server-optimization%E2%9A%A1.283181/
Chunk generation in 1.14+ is sadly completely broken. With more than 5 players on a server all loading chunks, your TPS can go below 4.0, and at some point even crash because of this. To counter this issue, you can use a plugin called ChunkMaster to pre-generate your chunks before hand. This is absolutely critical to get rid of chunk generation lag.
To use this feature, you will have to install the plugin from this link: https://www.spigotmc.org/resources/chunkmaster.71351/
Set a vanilla world border in your world with the
/worldborder set <radius> command. This will set a vanilla world border in your world, centered on your world spawn.
After you have set a world border in your world, you have to use the
/chunkmaster generate [world] command to generate the chunks within this border.
Depending on how big you set your border, this process may take actual days, but it will be completely worth it if you plan on having a lot of players on your server. Will also take up a big portion of storage since it will generate all chunks, so make sure you have enough storage on your server.
These 2 plugins are crucial for any 1.14+ Server. Villager and Pillager AI is completely broken in this version, and will cause your server to lag to below 5TPS in some cases. Pillagers infinitely spawn, and can go upwards of 900+ entities around 1 outpost.
To use these plugins, simply install them in your
/plugins folder and restart your server. VillagerOptimiser needs no configuration changes to work, LimitPillagers can be customized in the
config.yml file to fit your needs, the config file speaks for itself.