How to Optimize Performance using Spigot or PaperSpigot
***Please note that this guide was written and posted by frash23 on the SpigotMC forums - any credit/appreciation, or suggestions on alterations etc... should be made on their original post found HERE -- The section on Java & Launch flags has been removed from this post as this is handled on our end***Last updated 2016-04-04Spigot has a lot of performance improvements disabled by default, as they often alter the server so it no longer replicates vanilla behaviour. This guide is supposed to help you tweak the settings for optimal performance while understanding what you are actually changing. If you do not understand a setting frash mentions here, don't change it. If you are curious, reply to the thread (make sure to @tag frash23) and ask what it does. If you are still having issues with performance, take timings (2-5 minutes) and reply here, or make a new thread on the SpigotMC forums.Frash lists all the config values you can consider tuning to improve performance while doing his best to explain what the setting does and when you do/don't want to change it.The guide is currently written for 1.9. Most options appear in 1.8 as well. If they don't, just go to the next option.
You will need Paper/PaperSpigot, a fork of Spigot, to have this file available.
Uses an alternative, more efficient explosion algorithm. Instantly removes dead entities inside explosion.
Suggested: 2 - 3
This changes how many ticks pass before mob spawners try spawning mobs.
A value of 2 should not affect vanilla behaviour much. If mob spawners are lagging your server, this is a good value to play around with.
This will stop chests from looking for ocelots / cats sitting on the chest, thus allowing players to open it even if there is a cat sitting on it.(Improves performance)
The `hopper-check` option in spigot.yml is currently ignored, making it pretty much impossible to optimize hoppers on your own. This option re-enables it.
Suggested: 3 - 4
Changes how frequently inventories (player, chest, all of them) are ticked. Inventories can appear buggy / laggy when set above 5.
Attempts to spread light updates across ticks. Async lighting is currently broken in 1.9, this can help make up for it until fixed.
This stops redstone from firing the BlockPhysicsEvent.
A lot of plugins listen on the BlockPhysicsEvent but don't do anything with redstone. Since redstone can flicker extremely frequently on some servers, this can add up to a lot of wasted CPU.
This can be a major improvement on redstone lag.
Suggested: 2 - 4
Ticks between grass updates.
Increasing this will lower grass spread rates! Make sure you set this value to something that makes sense for your server. i.e. skyblock servers may not want to change this at all.
This does not change performance and may break some plugins.
This makes your server wait with connecting to any networking until all plugins are enabled. Frash sees this as good practice and security, but is completely optional.
Controls how far away spawned mobs can be.
We are going to lower how frequently and how many mobs can spawn, so lowering this will create the illusion we haven't lowered mob spawns.
Default: animals:32, monsters:32, misc:16
Suggested: animals:6, monsters:16, misc:2
Entities outside these ranges will be ticked less frequently. Animals generally don't need much. "misc" is stuff like item drops. Setting it to 1 may prevent item drops from i.e. flowing in water.
This is a major player in entity performance!
hopper-transfer, hopper-check, hopper-amount
Default: transfer:8, check:8, amount:1
Suggested: transfer:24, check:24, amount:3
This will make hoppers tick three times slower, but move three items at a time. This can break some vanilla behavior, especially stuff like redstone clocks depending on hopper times. Can be a major player in hopper lag.
Requires "use-hopper-check" to be enabled in paper.yml - and therefore requires PaperSpigot
Suggested: 1 - 2
How many times an entity can collide with per tick. Setting this to 1 usually has no implications. Helps a lot with mob farms.
Default: item:2.5, exp:3.0
Suggested: item:3.5, exp:6.0
The item merger is a powerful way to prevent item drop lag (no more ClearLag!). Setting the item property to 3.5 means items in a radius of 3.5 blocks will be "merged" into one stack of items. Exp has no real downside to merging at a high radius.
Suggested: 3 - 5
How many chunks are sent to the player. I generally recommend 4 as setting it to 3 will cause ender pearls to go into unloaded chunks and thus not work.
Default: monsters:70, animals:15, water-animals:5, ambient:15
Suggested: monsters:50, animals:10, water-animals:3, ambient:4
These values are more complicated than just "allowed mobs per player", but they do something in that direction. Setting these lower will grant less maximum mobs spawning around players. The more players you have, the lower you can safely set this.
Default: period-in-ticks:600, load-threshold:0
Suggested: period-in-ticks:300, load-threshold:300
This feature is disabled by default (load-threshold is zero) for no reason, as far as I can tell.
This option will unload chunks that aren't needed (outside players' view distance), freeing up memory and potential CPU resources.
Suggested: 2 - 5
Controls how often the server should attempt spawning a hostile mob. This accounts for the entire server, not per-player. Setting this high will drastically lower the amount of monsters spawning. I generally recommend 2 unless a server has lots of lag coming from the mobSpawn function or just have too many monsters in general.
Suggested (standalone server): 512
Suggested (behind local Waterfall/BungeeCord): -1
This option controls how large a packet should be before attempting to compress it. Setting it higher can save some CPU resources at the cost of more bandwidth use, setting it to -1 disables it.
If your server is in a network with the proxy on localhost or the same datacenter ( < 2 ms ping ), disabling the feature should only be beneficial. If your players connect directly to your server, set this to 512. It will save a bit of CPU while still gaining bandwidth.
Was this answer helpful?
A white list is your primary means of preventing unauthorized entry into your server. Any...
How to set up the Minecraft 1.7 Server Icon -- As one of the great features of Minecraft 1.7+,...
Minecraft has many commands that allow you to control your server in different ways. Here are...
As of this writing (October 2015), we are using Java 8 on all of our systems!
Why pick BeastNode Minecraft Hosting over Realms? There are several reasons, actually. Realms is...