Skip to main content

Server Optimization

Optimizing your Minecraft Server can go a long way in helping you and your players enjoy your server at maximum performance. Through intelligent optimizations, you can maximize the value of your hosting and reduce the time spent troubleshooting lag.


For starters, we’ll begin with the version of Minecraft you’re actually going to play on. It’s always recommended to play on the latest possible version of Minecraft, which offers the latest security and bug fixes. However, going a little further back offers significant performance benefits, 1.12.2 is a very stable version of Minecraft that requires less resources to operate and host. Any version after 1.13+ requires 3GB ram minimum, with 6GB being the recommended amount. 1.13-1.14 is not recommended to play on as they are known to have chunk and lighting render issues. These issues were fixed in version 1.15.

Picking the software of your server is important. We highly recommend the use Paper due to its compatibility with Bukkit and Spigot plugins, as well as its many performance improvements. At WinterNode, we strongly encourage players to run Paper even on Vanilla servers. The effects that Paper has on the Vanilla experience is minimal to none and can be mitigated by enabling Papers Unsupported Settings.

We’ll be referencing a couple of amazing guides that have been put together by people in the Paper community with the goal to add more context and direct you to the sections you’re looking for. Regardless of our directing, we encourage you to read through these two guides written by YouHaveTrouble and Paper chan, as they are valuable resources and the authors have put a lot of work into them.


caution

A number of the settings and values we recommend will impact the vanilla experience, so it’s highly recommended to read through what we, and the guides we reference, have to say and understand what you’re changing before you do so.

Server Configuration

We’re going to go over each configuration file and some recommended settings all the way up to Paper. If you’d like to check out other forks that try to improve on Paper or Spigot, the guide by YouHaveTrouble we mentioned above has more details on those.

Locating Configuration Files

You’ll find most of your servers configuration files in the root directory next to your server jar. Each subsequent fork of Bukkit adds it’s own configuration file with the name of the fork.

In order, we have the server.properties file, which contains the vanilla server settings, bukkit.yml which contains the settings related to the base Bukkit server, spigot.yml which contains settings that the Bukkit fork Spigot provides, then the config folder which contains the configurations files provided by Paper, which is a fork of Spigot. Finally back in the root directory we can have forks of Paper like Pufferfish and Purpur also adding their configuration files under their names.

Which files you have will depends on what fork you’re using, but it’s highly recommended to use at least Paper when running any type of Minecraft server.

6 Key Values

There are 6 values that affect your server the most, and this is re-iterated in the two guides we reference. Not only do these 6 values affect the server on their own, but they must be adjusted in tandem with each other for a good player experience. These values are the View Distance, Simulation Distance, Mob Spawn Range, Hard Despawn Range, Soft Despawn Range, and Entity Activation Range.

We go into detail about what each of these settings are, and link to sections that go into greater detail in the two articles we reference, but the important thing to understand is that you shouldn’t adjust any one of these without taking the others into account.

tip

For the most detailed explanation and the math behind the interactions between these values, check out this section in Paper chan’s guide about the mob spawning mechanics in Minecraft.

If you or your players delve into the technical side of Minecraft at all, even if it’s just copying designs from YouTube, you’ll want to take careful note of exactly what each of these settings do. You can easily reduce the output of or outright break your farms or machines with almost any of these settings. There will be a warning on some of the most important ones, but it’s important that you understand what your changing and why you should change it.

Even if you aren’t a technical player, and you’re just here to get your server performing better, these recommended values are a minimum for a playable experience. You may find that your play style doesn’t agree with some of these settings, especially if you rely on designs built for Vanilla Settings or you rely on some Vanilla Settings.

Just make sure you understand each setting before you change it. If you don’t, then it’s ok to leave it as the default. The only caveat is the 6 key values where you should leave all of them as default if you don’t understand them.

Server Configurations

Each of our sections will have the minimum recommended value next to the title, and then the title itself is a drop down that will show the default value for that setting and the important information about it. There will also be links to the two articles we mentioned and any software specific documentation that exists.

Make sure you read it before deciding if that’s a setting you want to change.

Vanilla

view-distance: 7

default: 10
recommended: 7

tip

Check out this section in Paper Chan’s guide on the Mob Spawning mechanics in Minecraft for more detailed information on how this setting affects the game!

This value is one of the most impactful from a performance and player perspective. This is the radius around a player in chunks that will be sent to every player on the server. It’s a square and is centered on the chunk that the player is standing in, so the default value will load 441 chunks for every player.

tip

With the recommended view-distance value of 7, it’s important to also change the change the despawn-ranges to fit into the smaller chunk area. By default the 128 block despawn-ranges will need at least an 8 chunk simulation distance and lowering it any further than that without adjusting the despawn-ranges will result in mobs not despawning as expected.

simulation-distance: 4

default: 10
recommended: 4

tip

Check out this section in Paper Chan’s guide on the Mob Spawning mechanics in Minecraft for more detailed information on how this setting affects the game!

The simulation-distance works in tandem with the view-distance by only “simulating” the specified potion of the view-distance. Setting this value to a lower number than your view-distance will only tick blocks and entities within the radius you specify, using the same math as if the view distance were smaller, but will still send the client all of the chunks specified by the view-distance

By only simulating, or ticking, a portion of the chunks you’re loading you can have a larger view-distance while also reducing the load required by that view distance.

tip

With the recommended simulation-distance value of 4, it’s important to also change the change the despawn-ranges to fit into the smaller chunk area. By default the 128 block despawn-ranges will need at least an 8 chunk simulation distance and lowering it any further than that without adjusting the despawn-ranges will result in mobs not despawning as expected.

Bukkit

chunk-gc.period-in-tick: 300

default: 600 recommended: 300

This is how often the server will remove “vacant” chunks, or chunks that are deemed to be unloaded, from memory and stop ticking them. There’s no negative effect to players in reducing it, but there’s a balance between spending too long on cleaning up chunks that may be loaded again relativity quickly by a player moving over a small area and leaving chunks in memory that aren’t needed anymore.

spawn-limits: ...
Defaults: ...

axolotls: 5
water-underground-creature: 5
monsters: 70
animals: 10
water-animals: 15
water-ambient: 20
ambient: 15

Recommended: ...

axolotls: 3
water-underground-creature: 35
monsters: 20
animals: 5
water-animals: 2
water-ambient: 2
ambient: 1

These are the settings for how many of each type of mob will be allowed to spawn on the server, otherwise known as a mob cap. Lowering these values alone will reduce the amount of mobs you encounter and slow down vanilla mob farms. Adjusting them in tandem with the mob spawn ranges can make mobs more manageable and make an otherwise low mob cap feel closer to a vanilla one, though farms will still have a lower rate compared to what they would have if the cap were left at it’s default value.

Spigot

max-tick-time: ...
Default: ...

tile: 50 entity: 50 If you are using Spigot, it is highly recommended to disable this feature. Paper has this feature disabled by default, but we still recommend setting it in spigot.yml regardless.

Recommended: ...

tile: 1000 entity: 1000 If you are using Spigot, it is highly recommended to disable this feature. Paper has this feature disabled by default, but we still recommend setting it in spigot.yml regardless.

tip

Check out this section in Paper Chan’s guide on the Mob Spawning mechanics in Minecraft for more detailed information on how this setting affects the game!

This sets the maximum amount of time a tile can work before it skips to the next task, but it’s generally thought that it’s not worth the other issues it causes and is recommended to disable it by setting it to 1000. Paper also has this disabled by default, so you shouldn’t have to change the max-tick-time at all if you’re running Paper or any of it’s subsequent forks.

entity-ticking-range: ...
Default: ...

players: 48 animals: 48 monsters: 48 misc: 32 other: 64

Recommended: ...

players: 48 animals: 48 monsters: 48 misc: 32 other: 64

The entity activation range is the maximum distance from a player that an entity can be before the server will stop sending it’s position to the player. Essentially meaning that any entities outside of the range won’t be visible to a player, but they will be active or loaded depending on the other settings the server has.

There’s not much performance impact to this setting, but it’s important to note because it can be the cause of mobs like ghasts shooting at players when the player can’t see it. This setting should normally be higher than your entity activation range for each group for that reason.

merge-radius: ...
Default: ...

exp: 3.0
item: 2.5

Recommended: ...

exp: 4.0
item: 3.5

This can reduce the number of processed entities by grouping entities like items and experience into larger stacks or orbs when they get close together. This can cause items to be merged through walls and may increase the speed at which you can pick up experience from farms as well as affect how effective experience farms are at mending tools.

tick-inactive-villagers: false

Default: true
Recommended: false

Disabling this setting prevents the game from ticking inactive villagers, potentially reducing resource usage and improving TPS. Inactive villagers are defined as those outside of the entity activation range. If your activation range regularly unloads entities that would otherwise be loaded, then this will cause issues with villagers restocking on time and iron farms working when players would otherwise expect the farm to be loaded. It will however increase performance by reducing the number of villagers that are tracking the actions they need to perform and then performing those tasks. The goal of not ticking some villagers is to only tick villagers that players are actively interacting with.

entity-activation-range: ...
Default: ...

animals: 32
monsters: 32
raiders: 48
misc: 16
water: 16
villagers: 32
flying-monsters: 32

Recommended: ...

animals: 16
monsters: 24
raiders: 48
misc: 8
water: 8
villagers: 16
flying-monsters: 48

tip

Check out this section in Paper Chan’s guide on the Mob Spawning mechanics in Minecraft for more detailed information on how this setting affects the game!

This setting will stop ticking entities that exit outside the defined radius around a player, meaning that they will no longer walk, grow, eat, or perform the tasks that they would normally. This can greatly increase performance when balanced correctly. But will often be noticed by players when they try to set up a point in their base to have their passive farms stay active.

mob-spawn-range: 3

Default: 8
Recommended: 3

tip

Check out this section in Paper Chan’s guide on the Mob Spawning mechanics in Minecraft for more detailed information on how this setting affects the game!

This is the distance, in chunks, that the server will attempt to spawn new mobs around a player. This should be adjusted in tandem with the 6 key values mentioned at the start of the configuration section. This greatly affects how mob farms operate and changing this value at all will break most farm designs you will find on YouTube.

Paper

Paper has split it’s configuration files into a Per-World file and a Global file. Each file doing basically what it says on the tin, either applying to specific worlds or globally to all worlds. There are different settings for each file, meaning that the settings in the Global file can not be used in the Per-World file and will always effect the entire server. Settings found in the Per-World file can be applied to all worlds by using the paper-world-defaults.yml file or applied to specific worlds by following this guide on the PaperMC Website.

Per-World Config

Paper allows you to configure most of it’s settings on a per world basis. This is a very powerful system and specifically to our use case allows fine grained control over what optimizations are active in which world. We’ll be working in the paper-world-defaults.yml file that contains and changes the defaults for all worlds loaded by your server, but you can create configuration files for each world that overrides the values you set in the paper-world-defaults.yml file if you find situations where you can squeeze more performance or player experience out of having separate values for each world by following this guide on the PaperMC Website.

max-auto-save-chunks-per-tick: 8

Default: 24
Recommended: 8

This value adjusts the amount of chunk saves attempted per tick and when lowered can spread the saves out over a longer period of time.

max-entity-collisions: 2

default: 8
recommended: 2

How many collisions an individual entity can process before the server skips additional ones. Lowering it prevents mobs trapped in a hole together from causing lag from their collisions alone and raising it has little effect other than allowing for some extremely technical play with entity collision mechanics.

optimize-explosions: true

Default: false
Recommended: true

This replaces the default explosion algorithm with a more optimized but slightly more inaccurate one. Enabling this has little to no effect on game play, even on technical game play. Extremely fine tuned machines like world eaters or automatic bedrock breakers may perform better with this setting off.

anti-xray.enabled: true

Default: false Recommend: true

To prevent x-ray hacks, enabling this is highly recommended. You can set the engine to 1 or 2. Engine 1 simply hides all hidden ores, while engine 2 randomizes all non-visible blocks with random blocks. Engine 1 is faster and uses fewer resources, but engine 2 is more effective against x-ray hacking.

redstone-implementation: eigencraft

Default: vanilla
Recommended: eigencraft

This option provides a few alternate redstone engines, eigencraft being the most well tested and implemented as of right now. The other option is Alternate Current, which has actual documentation covering the changes it makes.

Both engines provide a significant performance increase when compared to vanilla redstone, especially when running a server with a lot of independent farms. But it’s important to note that any technical-level redstone may rely on bugs or inconsistencies that are patched in the other Redstone implementations. They are both made with the goal of not breaking the vanilla implementation of redstone, but based on our experience this is not always the case.

despawn-ranges: ...
Default: ...
ambient:
hard: 128
soft: 32
axolotls:
hard: 128
soft: 32
creature:
hard: 128
soft: 32
misc:
hard: 128
soft: 32
monster:
hard: 128
soft: 32
underground_water_creature:
hard: 128
soft: 32
water_ambient:
hard: 64
soft: 32
water_creature:
hard: 128
soft: 32
Recommended: ...
ambient:
hard: 56
soft: 30
axolotls:
hard: 56
soft: 30
creature:
hard: 56
soft: 30
misc:
hard: 56
soft: 30
monster:
hard: 56
soft: 30
underground_water_creature:
hard: 56
soft: 30
water_ambient:
hard: 56
soft: 30
water_creature:
hard: 56
soft: 30
tip

Check out this section in Paper Chan’s guide on the Mob Spawning mechanics in Minecraft for more detailed information on how this setting affects the game!

These are the ranges around a player in blocks that a mob will despawn. The hard despawn range should always be the greater one and will be the one where the mob will instantly despawn. The soft despawn range is the range at which a mob outside of it will have a chance to despawn, and inside of it a mob will never despawn.

You should adjust this in-tandem with the 6 key values mentioned at the top of the article.

armorstands.tick: false

Default: true Recommended: false

This setting controls whether or not the server will “tick” armor stands. Ticking armor stands affects them being moved by gravity, pushed by water, pushed by pistons, and using their armor enchantments like Frost Walker. If you intend to use armor stands to make ice paths or for redstone based armor storage, this setting will break them. It may also affect some plugins or datapacks that use armor stands. It will however increase server performance if your player base uses a lot of armor stands for decoration.

Running a BungeeCord Hub (Lobby)?

If you have a hub (lobby) server, you can be more aggressive with settings aimed at optimizing your server, as hub servers tend to be small and mostly decorative, giving you more legroom for more optimization. Therefore, when properly optimized, many hub servers can go on much smaller hosting plans than “main” gameplay servers.

The primary settings you can further optimize are disabling spawn being loaded, increasing the ticks per mob spawn, disabling player collisions, increasing all of the tick rates, and lowering the simulation distance in server.properties.

caution

If you’re running Bungeecord or Waterfall, make sure to use BungeeGuard or a plugin like it to secure your backend servers from direct connections!

Pre-World Gen

It is highly recommended to pre-generate the world before you play on it using WorldBorder or Chunky. Depending on your use case, a good amount to generate is a few thousand blocks, somewhere between 1000-2500 blocks. The higher you set the limit the longer it takes to complete, but doing this reduces the number of new chunks your server has to generate as players explore, speeding up world loading and reducing resource usage after launch.

If you are looking for a custom world generator, there are many available. In terms of optimization, nothing is better than Vanilla’s default world gen, but a close second would be Terra as it is highly configurable and achieves near-Vanilla world generation speed.

tip

Interested in Pre-World Gen? We have a guide published on Chunky!

Chunky

Plugins

In general, reducing entities is a huge factor when it comes to maximizing TPS. However, you do not need to install ‘anti-lag’ plugins, as they primarily remove dropped items on an interval. Minecraft already has a built-in feature to do exactly this (items are automatically removed after 5 minutes on loaded chunks) and Paper has extra settings to configure the way the timer works on certain items.

Do not use plugins like Mob Stacker and ClearLagg, they have little to no impact on Lag and a large impact on how your players interact with the game. It’s important to work with your community and the server itself to solve the Lag problems you’re experiencing. Plugins that attempt to mitigate Lag by removing or altering the behavior of entities only mask the issue and often cause players to create more lag to make up for the losses they impose.

info

Paperchan has a section on Things to Avoid and some good plugins to use including Utility, diagnostic, and Lag reducing plugins,

Spark

Spark is an essential plugin that helps you profile server performance, including CPU, RAM, TPS, and disk usage. Spark is recommended over Warmroast (which it is based on) due to its ease of use, doesn’t require an unsecured temp webpage, and gathers larger samples while using less memory to do so.

Sparkhas many commands and uses for each command. A list of each command with a description is provided on their page here.

Timings

Spigot (and Paper) have a powerful built-in system to review server ticks, and it’s always good practice to monitor your server. To use timings, simply execute “/timings on” on the server, leave it running for a minimum of 3 minutes, then execute “/timings report” for a detailed chart of your server’s TPS. If you want to identify changes in your server TPS, you would need to leave the timings report to run for much longer to identify those points in the logging period chart.

info

By default, timings should enable when your server starts. So you shouldn’t need to execute /timings on when you want to make a report.

The timings graphLoading... You’re able to hover over different points in the chart to see various stats at various times.

tip

Did you know! Our Discord has an automated bot that can assist with providing optimization suggestions? Visit the #timings channel and paste the link to your timings report.

Timings Examples

The first few entries of the Timings report listLoading... In this first example (above) we can see that doTick is taking up a huge chunk (36.97%) of the full server tick! However, this is incredibly low, as the full server tick only uses 4.62%. In this case the server is extremely healthy. An overloaded Timings report listLoading... In this second example (above), we can see the server is using nearly 150% of the entire tick, which is not good! You can expand the chart to see exactly what is causing the TPS loss. An overloaded Timings report list with the Count Natural Mobs event highlightedLoading... By expanding the lists, we can identify that the major offender of TPS loss is from “Count natural mobs”. In this case, “Count natural mobs” refers to the number of entities on the server, so the natural solution would be to look into how to reduce the number of entities that exist. This can be done using some of the settings we defined earlier in this article.


We hope this article has been helpful for you in optimizing your server. As always, if you’re experiencing unusual lag on your server and the advice here hasn't helped you, please contact our support team at any time.


Reach Out!

Have Questions? Need Help? Feel free to reach out!

Join our Discord