Introduction
This tutorial helps you to optimize your Rcs Minecraft server to avoid the slightest lag and to have the best possible performance as measured in Ticks Per Second (TPS).
What are TPS (Ticks Per Second) ?
A Rcs Minecraft server advances the game aspects such as object movement, health, crop growth, mob movement, and more, every 0.05 seconds—a clock rate of 20 ticks per second.
If the Minecraft server cannot update all the items on each tick, the server may lag. A TPS rating below 20 indicates that the server must skip tasks to keep up, which creates a rubber-band effect, sometimes reverting in-game actions a few seconds back. You may experience this as a block breaking, and the item drops later, or the sun moving counterclockwise.
TPS ratings of 19.95 or above are acceptable, and ratings below 18.5 are poor. Anything less than 16 is unplayable.
Server Selection
To improve your Minecraft server experience, use Spigot or Paper. Bukkit, CraftBukkit or other server implementations are not recommended for stability and safety.
Pre-generate the Map
Map pre-generation is a critical factor in improving your server's TPS rating. When a player connects to your Rcs Minecraft server, it has to generate the map while the player moves, which requires hardware resources. When a player passes over a part of the map already generated, the server requires fewer resources. It's essential to pre-generate the map before opening your server to the general public.
Chunky is a plugin that allows you to pre-generate your map.
Execute the following commands to setup a worldborder with a 10000 block radius. If you want a smaller or larger map, replace the 20000
with any value you want to use.
worldborder center 0 0
worldborder set 20000
chunky worldborder
chunky start
If the map has been generated successfully, continue editing the server files for maximum optimization.
Edit Your Configuration Files
If your file does not contain an entry listed, you are using an outdated version.
bukkit.yml
spawn-limits:
- Default: monsters:70, animals:10, water-animals:15, water-ambient:20, ambient:15
- Optimized: monsters:50, animals:8, water-animals:7, water-ambient:10, ambient:1
Impact: Medium
While there is more to this than "mobs per player", lower values mean less mobs. Avoid going too low or the mob shortages will be noticeable. Subsequent values in the guide will make the reduction less noticeable.
chunk-gc.period-in-ticks
- Default: 600
- Optimized: 400
Impact: Medium
This unloads vacant chunks faster. Ticking fewer chunks means less TPS consumption.
ticks-per.monster-spawns
- Default: 1
- Optimized: 4
Impact: Medium
This sets how often (in ticks) the server attempts to spawn a monster. Slighty increasing the time between spawns should not impact spawn rates. Note: Only go higher if you have significant tick loss to the mobSpawn task.
spigot.yml
save-user-cache-on-stop-only
- Default: false
- Optimized: true
Impact: Medium
Should the server constantly save user data (false) or delay that task until a stop/restart (true)? This is nice TPS savings on Spigot (less on Paper since it's more efficient). Note: Take regular backups to avoid data loss in the rare event of a fatal crash.
mob-spawn-range
- Default: 8
- Optimized: 6
Impact: N/A
This sets the max mob spawn distance (in chunks) from players. After limiting spawns in Bukkit, this will condense mobs to mimic the appearance of normal rates. Warning: If your view-distance is 6 or less, set a spawn range 1 below that value. For example, if view-distance is 5, set mob-spawn-range to 4.
entity-activation-range
- Default: animals:32, monsters:32, raiders: 48, misc:16
- Optimized: animals:16, monsters:24, raiders: 48, misc:8
Impact: Medium
Entities past this range will be ticked less often. Avoid setting this too low or you might break mob behavior (mob aggro, raids, etc). Note: Villagers should be left alone (if possible) to protect mechanics. If you must lower their activation range, consider enabling villagers-active-for-panic. The setting below also helps.
tick-inactive-villagers
- Default: true
- Optimized: false
Impact: Medium
Enabling this prevents the server from ticking villagers outside the activation range. Note: Vanilla behavior ticks all villagers in loaded chunks (lag!).
merge-radius
- Default: item:2.5, exp:3.0
- Optimized: item:4.0, exp:6.0
Impact: Medium
Merging items means less ground item ticking. Higher values allow more items to be swept into piles. Note: Merging will lead to the illusion of items disappearing as they merge together. A minor annoyance.
nerf-spawner-mobs
- Default: false
- Optimized: true
Impact: Medium
When enabled, mobs from spawners will not have AI (will not swim/attack/move). This is big TPS savings on servers with mob farms, but also messes with their behavior. A farm limiter plugin might be a better solution. Note: Paper has an option to force nerfed mobs to jump/swim. This fixes water push farms and keeps the TPS savings.
item-despawn-rate
- Default: 6000 (5 minutes)
- Optimized: less?
Impact: Situational
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 is critical. Note: See Paper's alt-item-despawn-rate so you can target trash items (cobblestone) without clearing valuable items (diamonds).
arrow-despawn-rate
- Default: 1200
- Optimized: 300
Impact: Minor
Similar to item-despawn-rate, but for fired arrows. Some servers may want to keep arrows on the ground longer, but most will have no complaints from faster removal. Note: Paper has settings to reduce the gameplay impact of arrow removal. Leave this near default if you use Paper's despawn options.
paper.yml
max-auto-save-chunks-per-tick
- Default: 24
- Optimized: 6
Impact: Heavy
This slows incremental chunk saving during the world save task. This is incredibly important for 1.13+ servers with how inefficient chunk saving is. Note: Be sure your save can finish between your autosave interval. Setting this too low might result in unsaved chunks. If you have 40+ players online, you should try to keep this at 8 to be safe.
optimize-explosions
- Default: false
- Optimized: true
Impact: Minor
Paper has a very efficient algorithm for explosions with no impact to gameplay.
mob-spawner-tick-rate
- Default: 1
- Optimized: 2
Impact: Minor
This is the delay (in ticks) before an active spawner attempts spawns. Doubling the delay will not impact spawn rates. Only go higher if you have significant tick loss from ticking spawners.
disable-chest-cat-detection
- Default: false
- Optimized: true
Impact: Minor
Chests scan for a cat on top of it when opened by a player. While enabling this eliminates vanilla behavior (cats block chests), do you really need this mechanic?
container-update-tick-rate
- Default: 1
- Optimized: 3
Impact: Minor
This changes how often (in ticks) inventories are refreshed while open. Do not exceed 4 to avoid visual issues.
max-entity-collisions (in spigot.yml in some builds)
- Default: 8
- Optimized: 2
Impact: Medium
Crammed entities (grinders, farms, etc.) will collide less and consume less TPS in the process.
grass-spread-tick-rate
- Default: 1
- Optimized: 4
Impact: Medium
The time (in ticks) before the server tries to spread grass in chunks. This will have no gameplay impact on most game types.
despawn-ranges
- Default: soft: 32, hard: 128
- Optimized: soft: 28, hard: 96
Impact: Minor
- Soft = The distance (in blocks) from a player where mobs will be periodically removed.
- Hard = Distance where mobs are removed instantly.
Lower ranges clear background mobs and allow more to be spawned in areas with player traffic. This further reduces the gameplay impact of reduced spawning (bukkit.yml).
hopper.disable-move-event
- Default: false
- Optimized: true
Impact: Heavy
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 enable.
non-player-arrow-despawn-rate
- Default: -1 (uses Spigot arrow-despawn-rate)
- Optimized: 60 (3 seconds)
Impact: Minor
Similar to Spigot's arrow-despawn-rate, but targets skeleton-fired arrows. Since players cannot retrieve mob arrows, this is only a cosmetic change.
creative-arrow-despawn-rate
- Default: -1 (Spigot arrow-despawn-rate)
- Optimized: 60 (3 seconds)
Impact: Minor
Like the setting above, but for player-fired arrows that cannot be retrieved (infinity bows).
prevent-moving-into-unloaded-chunks
- Default: false
- Optimized: true
Impact: Medium
Prevents players from entering an unloaded chunk (due to lag), which causes more lag. The true setting will set them back to a safe location instead. Note: If you did not pre-generate your world this setting is critical.
use-faster-eigencraft-redstone
- Default: false
- Optimized: true
Impact: Heavy
This setting reduces redundant redstone updates by as much as 95% without breaking vanilla devices. Note: If you use a plugin to change redstone algorithms, consider replacing them with this option as plugins tend to break redstone behavior.
armor-stands-tick
- Defaulf: true
- Optimized: false
Impact: Minor
Some items are viewed as entities (require ticking) since they interact with the world. Unticked armor stands will not get pushed by water. Note: Paper also offsets item frame ticking instead of ticking all frames at once. This is not configurable, just enjoy the TPS savings with no gameplay impact.
per-player-mob-spawns
- Default: false
- Optimized: true
Impact: Minor
This implements singleplayer spawning behavior instead of Bukkit's random algorithms. This prevents the actions of others (i.e. Massive farms) from impacting the server's spawn rates. Note: If you lowered spawn-limits in Bukkit and notice shortages of animals and monsters, consider bumping those back up until you find a happy place.
no-tick-view-distance
- Default: -1
- Optimized: 8
This is the distance at which chunks are loaded, but will still not be ticked outside your view-distance. Note: If you had to set your view-distance really low (like 3 or 4), you might set this at 5 or 6 to improve your gameplay experience.
server.properties
view-distance
- Default: 10
- Optimized: 5
Impact: Heavy
This is the most impactful setting in all your files as it caps the chunk render distance. Open world servers (like Survival) should strive to use 6+, but others on shared hosts, low specs, or huge player counts might consider 4-5 if chunk gen causes lag. Warning: See note in mob-spawn-range (spigot.yml) if you set your view distance lower than 7.
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 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.
More Tips
- This optimization guide can help improving the performance of your server. Heavy plugins can still drain performance where not necessary.
- Keep your console clean. If you spot errors caused by plugins, reach out for the author so they can fix it.
- Use modern plugins. It's highly likely that a modern plugin receives updates more frequent than one last updated in 2015.
See our guide: Diagnosing Minecraft Server Lag and Low TPS
Conclusion
Finding the correct settings to optimize a server takes time and improves TPS performance to reduce server lag. Each server is different, and you may want to learn more about the parameters. See the following documentation: