Iɴᴛʀᴏᴅᴜᴄᴛɪᴏɴ This is a reboot of the Optimizing Spigot guide by @frash23, a legendary Spigot member we lost in 2017. Bukkit, Spigot and Paper have a number of settings that boost efficiency and let you avoid harsh plugins (i.e. ClearLagg). This guide lists recommended values and the pros/cons for applying them. Updated for the latest release version of Spigot/Paper (1.13.2). This guide will not be fully updated until after 1.14.3 is released. 1.14 - 1.14.2 is NOT recommended for production use and many values have not been re-added. If you made the mistake of updating to 1.14, I strongly urge you to use the latest Paper with its new incremental chunk saving. New server owner? Read my Lag Guide too. PRE-GEN YOUR MAP! For open world servers (i.e. Survival), pre-generating your map is the most important step you can take to eliminate lag. Take the time to do it before you even touch your server files. Spoiler: Pre-Gen Steps 1. Get the free plugin WorldBorder 2. Set a reasonable border distance. You can always expand later. 3. Command: /wb fill 4. Wait...this may take a number of hours depending on the map size. This will cause lag, so it's best done before a map is live. 5. Leave the border in place so players never generate new chunks (cause of lag). Bᴜᴋᴋɪᴛ.ʏᴍʟ Spoiler: Bukkit spawn-limits (temporary values for 1.14.0-1.14.2) Default: monsters:70, animals:15, water-animals:15, ambient:15 Optimized: monsters:55(30), animals:12(8), water-animals:5(2), ambient:3(1) Performance Impact: Medium ➫ While there is more to this than "mobs per player" (learn more in the PDF attached to this thread), lower values result in less spawning. Be cautious setting spawns much lower or mob shortages will be noticeable. Settings later in this guide will make the reduction of spawns less of an impact to gameplay. Note: Servers with <10 players average should leave these at default to avoid mob shortages. chunk-gc (removed in 1.14+) Def: period-in-ticks:600, load-threshold:0 Opt: period-in-ticks:400, load-threshold:300 Impact: Minor-Medium ➫ This unloads vacant chunks faster than vanilla rates. Ticking fewer chunks means less TPS consumption. ticks-per.monster-spawns Def: 1 Opt: 2 Impact: Medium ➫ This dictates how often (in ticks) the server will attempt to spawn a monster in a legal location. Doubling the time between attempts helps performance without hurting spawn rates. Note: Only go to 3-5 if you have severe TPS loss from the mobSpawn event. autosave Def: 6000 (usually) Opt: 6000 Impact: Situational ➫ This enables Bukkit's world saving function and how often it runs (in ticks). It should be 6000 (5 minutes) by default, just double check it is not 0 (disabled). This is a gradual/queued task and is very efficient. Check out Paper's incremental chunk saving introduced in 1.14. Note: If you use Multicraft's autosave in advanced settings, disable it! Multicraft just runs /save-all, which is the map-saving equivalent of cutting butter with a baseball bat. Sᴘɪɢᴏᴛ.ʏᴍʟ Spoiler: Spigot save-user-cache-on-stop-only Default: false Optimized: true Performance Impact: Situational ➫ This toggles whether the server constantly saves new user cache data (false) or if it delays that task until a stop/restart (true). This is a huge TPS savings on Spigot (minor on Paper since it's so efficient). Note: Whether true or false, take regular backups to avoid data loss in the rare event of a fatal crash. max-tick-time Def: tile:50, entity:50 Opt: tile:1000, entity:1000 Impact: N/A ➫ The optimized setting disables this unstable feature. The minor TPS savings is not worth the potential damage. Why disable? > Read here view-distance Def: 10 Opt: 4-8 Impact: Heavy ➫ This is a big performance setting, but noticeably impacts gameplay. This caps the chunk render distance for players. Open world servers (like Survival) should strive to use 6-8, but others with low specs, huge player counts, or custom terrain might consider 4-5 if chunk gen causes lag. Note: Paper's async chunk loading (and other Paper options) might allow you to keep this in the 7+ range. Paper is that efficient. mob-spawn-range Def: 8 Opt: 6 (or same as your "view-distance" if below 6) Impact: Minor ➫ This sets the max spawning distance (in chunks) from a player. After limiting spawns in Bukkit, this will condense the spawning around your players to mimic the appearance of normal spawn rates. If you did not change those, leave at default. entity-activation-range Def: animals:32, monsters:32, misc:16 Opt: animals:24, monsters:24, misc:12 Impact: Minor ➫ This reduces entity ticking as entities outside these ranges will be ticked less often. Lower settings might create the occasional "lazy" mob. Consider leaving these closer to default unless you have issues with active entity ticking. merge-radius Def: item:2.5, exp:3.0 Opt: item:4.0, exp:6.0 Impact: Medium-Heavy ➫ Merging items has a huge impact on tick consumption for ground items. Higher values allow more items to be swept into piles and allow you to avoid plugins like ClearLag. Note: Merging items will lead to the occasional illusion of items disappearing as they merge together a few blocks away. A minor annoyance. nerf-spawner-mobs Def: false Opt: true Impact: Medium-Heavy ➫ When enabled, mobs from spawners will not have AI (will not swim, attack, move). While this is big TPS savings on servers where mob farms are popular, it also has a significant gameplay impact (breaks farms). A merging or farm limiter plugin might be a better solution. Note: Paper has an option to force nerfed mobs to jump/swim nonstop. This re-allows water push farms and keeps the TPS savings. They will still not attack/chase players (main cause of lag). item-despawn-rate Def: 6000 (5 minutes) Opt: less? Impact: Minor-Medium ➫ The time (in ticks) before a ground item is removed. While the TPS savings can be significant if reduced, it also impacts gameplay on servers where returning to dropped items (i.e. Survival) is critical. Increasing the item merge radius (above) might be enough to avoid this setting change. arrow-despawn-rate Def: 1200 Opt: 300 Impact: Minor ➫ Similar to item-despawn-rate, but for fired arrows. While some servers may want to keep arrows on the ground longer, most will have minimal complaints from faster removal. Note: Paper has settings to reduce the gameplay impact of arrow removal, but keeps the TPS savings. Leave this near default if you use Paper's arrow despawn options. Pᴀᴘᴇʀ.ʏᴍʟ Note: Paper has async chunk loading and incremental world saving. If you have chunk-related lag, maybe give Paper a try. Spoiler: Paper Warning: Paper is an unofficial fork and is not supported on the Spigot forums. While some consider Paper less stable than Spigot, it significantly enhances performance. If you have issues related to Paper, report them on Paper's issue tracker, not on Spigot! max-auto-save-chunks-per-tick (1.14.2 value) Default: 24 Optimized: 6 (large servers should try to use >6 if possible) Performance Impact: CRITICAL for 1.14 ➫ This implements incremental chunk saving during the world save task. This is incredibly important for 1.14 servers with how inefficient chunk saving is in 1.14. optimize-explosions Default: false Optimized: true Performance Impact: Minor ➫ Paper applies a custom and far more efficient algorithm for explosions. It has no impact on gameplay. mob-spawner-tick-rate Def: 1 Opt: 2 Impact: Minor ➫ This is the delay (in ticks) before an activated spawner attempts to spawn mobs. Doubling the rate to 2 should have no impact on spawn rates. Only go higher if you have severe load from ticking spawners. Keep below 10. disable-chest-cat-detection Def: false Opt: true Impact: Minor ➫ By default, chests scan for a cat/ocelot on top of it when opened. While this eliminates a vanilla mechanic (cats block chest opening), do you really need this silly mechanic? container-update-tick-rate Def: 1 Opt: 2-3 Impact: Minor ➫ This changes how often your containers/inventories are refreshed while open. Do not go higher than 3. fire-physics-event-for-redstone Def: true (false in newer builds) Opt: false Impact: Minor-Medium ➫ This stops active redstone from firing BlockPhysicsEvent and can salvage some TPS from a cosmetic task. Note: If you have a rare plugin that listens to BlockPhysicsEvent, leave this on. max-entity-collisions Def: 8 Opt: 2 Impact: Minor ➫ Crammed entities (grinders, farms, etc.) will collide less and consume less TPS in the process. grass-spread-tick-rate Def: 1 Opt: 2-4 Impact: Medium ➫ The time (in ticks) before the server attempts to spread grass in loaded chunks. This will have minimal gameplay impact on most game types. despawn-ranges Def: soft: 32, hard: 128 Opt: soft: 28, hard: 96 Impact: Medium Soft = The distance (in blocks) from a player where mobs will be periodically removed. Hard = Distance where mobs will be removed instantly. ➫ Lower ranges clear unneeded mobs and allow more mobs to be spawned in areas with player traffic. This helps performance and further reduces the gameplay impact of reduced spawning (bukkit.yml). Note: This may slightly increase the disappearance of rendered mobs. hopper.disable-move-event Def: false Opt: true Impact: Heavy (situational) ➫ This will significantly reduce hopper lag by preventing InventoryMoveItemEvent being called for EVERY slot in a container. Warning: If you have a plugin that listens to InventoryMoveItemEvent, do not set true. non-player-arrow-despawn-rate Def: -1 (uses Spigot arrow-despawn-rate) Opt: 60 (3 seconds) Impact: Minor ➫ Similar to arrow-despawn-rate in Spigot, but targets skeleton arrows. Since players cannot retrieve mob-fired arrows, this is only a cosmetic change to gameplay. creative-arrow-despawn-rate Def: -1 (uses Spigot arrow-despawn-rate) Opt: 60 (3 seconds) Impact: Minor ➫ Like the setting above, but for player-fired arrows that cannot be picked back up (infinity bows & potion-tipped arrows). keep-spawn-loaded Def: false (true in newer builds) Opt: true Impact: Medium (situational) ➫ This keeps your highest traffic area (spawn) loaded when no players are around and prevents the server from having to constantly load the same region. Note: Be sure to set keep-spawn-loaded-range to a chunk range that makes sense for your spawn. Your spigot.yml view-distance will be used if not set. prevent-moving-into-unloaded-chunks Def: false Opt: true Impact: Medium-Heavy ➫ Prevents players from entering an unloaded chunk (due to lag), which causes more TPS loss. The true setting will set them back to a "safe" area. Note: If you did not pregenerate your world (what's wrong with you?!), this setting might be a godsend. use-faster-eigencraft-redstone Def: false Opt: true Impact: Heavy ➫ This setting eliminates redundant redstone updates by as much as 95% without breaking vanilla devices (pretty sure). Empirical testing shows a speedup by as much as 10x! Note: If you use the plugin Pandawire, you might consider this option instead as Pandawire knowingly breaks some redstone machines. anti-xray.enabled Def: false Opt: true, engine-mode: 2 Impact: N/A ➫ While this setting will actually cost TPS, it is the most efficient anti-xray in existence! Engine-mode 1 might be less heavy, but mode 2 is by far the more effective engine at preventing cheaters. Note: Paper users with versions older than 1.12.2 should consider this plugin as an alternative. Sᴇʀᴠᴇʀ.Pʀᴏᴘᴇʀᴛɪᴇs Spoiler: Server.Properties network-compression-threshold Default: 256 Optimized: Standalone(512) BungeeCord(-1) Impact: Minor ➫ This option caps the size of a packet before the server attempts to compress it. Setting it higher can save some resources at the cost of more bandwidth, setting it to -1 disables it. Note: If your server is in a network with the proxy on localhost or the same datacenter (<2 ms ping), disabling this (-1) will be beneficial. Jᴀᴠᴀ Sᴛᴀʀᴛᴜᴘ Fʟᴀɢs Spoiler: Java Flags The guide linked below is actively researched and updated by a Spigot/Paper developer and is recommended for 99% of servers. https://mcflags.emc.gs/ Note: Most shared hosts have preset flags and do not allow changes. Do not worry about these settings if that's you. Sᴜᴘᴘᴏʀᴛ For performance assistance outside the parameters of this guide, you are best served by posting your issue/question in the Spigot Performance Tweaking forum so the entire Spigot community has a chance to address your needs. Spigot and Paper devs dedicate hundreds of hours to these projects FOR FREE! If their work made your server possible, please consider a donation to both projects.