Giter VIP home page Giter VIP logo

minecraft-optimization's Introduction

Minecraft server optimization guide

Note for users that are on vanilla, Fabric or Spigot (or anything below Paper) - go to your server.properties and change sync-chunk-writes to false. This option is forcibly set to false on Paper and its forks, but on other server implementations you need to switch this to false manually. This allows the server to save chunks off the main thread, lessening the load on the main tick loop.

Guide for version 1.20. Some things may still apply to 1.15 - 1.19.

Based on this guide and other sources (all of them are linked throughout the guide when relevant).

Use the table of contents located above (next to README.md) to easily navigate throughout this guide.

Intro

There will never be a guide that will give you perfect results. Each server has their own needs and limits on how much you can or are willing to sacrifice. Tinkering around with the options to fine tune them to your servers needs is what it's all about. This guide only aims to help you understand what options have impact on performance and what exactly they change. If you think you found inaccurate information within this guide, you're free to open an issue or set up a pull request to correct it.

Preparations

Server JAR

Your choice of server software can make a huge difference in performance and API possibilities. There are currently multiple viable popular server JARs, but there are also a few that you should stay away from for various reasons.

Recommended top picks:

  • Paper - The most popular server software that aims to improve performance while fixing gameplay and mechanics inconsistencies.
  • Pufferfish - Paper fork that aims to further improve server performance.
  • Purpur - Pufferfish fork focused on features and the freedom of customization.

You should stay away from:

  • Any paid server JAR that claims async anything - 99.99% chance of being a scam.
  • Bukkit/CraftBukkit/Spigot - Extremely outdated in terms of performance compared to other server software you have access to.
  • Any plugin/software that enables/disables/reloads plugins on runtime. See this section to understand why.
  • Many forks further downstream from Pufferfish or Purpur will encounter instability and other issues. If you're seeking more performance gains, optimize your server or invest in a personal private fork.

Map pregen

Map pregeneration, thanks to various optimizations to chunk generation added over the years is now only useful on servers with terrible, single threaded, or limited CPUs. Though, pregeneration is commonly used to generate chunks for world-map plugins such as Pl3xMap or Dynmap.

If you still want to pregen the world, you can use a plugin such as Chunky to do it. Make sure to set up a world border so your players don't generate new chunks! Note that pregenning can sometimes take hours depending on the radius you set in the pregen plugin. Keep in mind that with Paper and above your tps will not be affected by chunk loading, but the speed of loading chunks can significantly slow down when your server's cpu is overloaded.

It's key to remember that the overworld, nether and the end have separate world borders that need to be set up for each world. The nether dimension is 8x smaller than the overworld (if not modified with a datapack), so if you set the size wrong your players might end up outside of the world border!

Make sure to set up a vanilla world border (/worldborder set [diameter]), as it limits certain functionalities such as lookup range for treasure maps that can cause lag spikes.

Configurations

Networking

network-compression-threshold

Good starting value: 256

This allows you to set the cap for the size of a packet before the server attempts to compress it. Setting it higher can save some CPU resources at the cost of bandwidth, and setting it to -1 disables it. Setting this higher may also hurt clients with slower network connections. If your server is in a network with a proxy or on the same machine (with less than 2 ms ping), disabling this (-1) will be beneficial, since internal network speeds can usually handle the additional uncompressed traffic.

use-alternate-keepalive

Good starting value: true

You can enable Purpur's alternate keepalive system so players with bad connection don't get timed out as often. Has known incompatibility with TCPShield.

Enabling this sends a keepalive packet once per second to a player, and only kicks for timeout if none of them were responded to in 30 seconds. Responding to any of them in any order will keep the player connected. AKA, it won't kick your players because 1 packet gets dropped somewhere along the lines
~ https://purpurmc.org/docs/Configuration/#use-alternate-keepalive


Chunks

simulation-distance

Good starting value: 4

Simulation distance is distance in chunks around the player that the server will tick. Essentially the distance from the player that things will happen. This includes furnaces smelting, crops and saplings growing, etc. This is an option you want to purposefully set low, somewhere around 3 or 4, because of the existence of view-distance. This allows to load more chunks without ticking them. This effectively allows players to see further without the same performance impact.

view-distance

Good starting value: 7

This is the distance in chunks that will be sent to players, similar to no-tick-view-distance from paper.

The total view distance will be equal to the greatest value between simulation-distance and view-distance. For example, if the simulation distance is set to 4, and the view distance is 12, the total distance sent to the client will be 12 chunks.

view-distance

Good starting value: default

This value overwrites server.properties one if not set to default. You should keep it default to have both simulation and view distance in one place for easier management.

delay-chunk-unloads-by

Good starting value: 10s

This option allows you to configure how long chunks will stay loaded after a player leaves. This helps to not constantly load and unload the same chunks when a player moves back and forth. Too high values can result in way too many chunks being loaded at once. In areas that are frequently teleported to and loaded, consider keeping the area permanently loaded. This will be lighter for your server than constantly loading and unloading chunks.

max-auto-save-chunks-per-tick

Good starting value: 8

Lets you slow down incremental world saving by spreading the task over time even more for better average performance. You might want to set this higher than 8 with more than 20-30 players. If incremental save can't finish in time then bukkit will automatically save leftover chunks at once and begin the process again.

prevent-moving-into-unloaded-chunks

Good starting value: true

When enabled, prevents players from moving into unloaded chunks and causing sync loads that bog down the main thread causing lag. The probability of a player stumbling into an unloaded chunk is higher the lower your view-distance is.

entity-per-chunk-save-limit

Good starting values:

    area_effect_cloud: 8
    arrow: 16
    dragon_fireball: 3
    egg: 8
    ender_pearl: 8
    experience_bottle: 3
    experience_orb: 16
    eye_of_ender: 8
    fireball: 8
    firework_rocket: 8
    llama_spit: 3
    potion: 8
    shulker_bullet: 8
    small_fireball: 8
    snowball: 8
    spectral_arrow: 16
    trident: 16
    wither_skull: 4

With the help of this entry you can set limits to how many entities of specified type can be saved. You should provide a limit for each projectile at least to avoid issues with massive amounts of projectiles being saved and your server crashing on loading that. You can put any entity id here, see the minecraft wiki to find IDs of entities. Please adjust the limit to your liking. Suggested value for all projectiles is around 10. You can also add other entities by their type names to that list. This config option is not designed to prevent players from making large mob farms.

max-loads-per-projectile

Good starting value: 8

Specifies the maximum amount of chunks a projectile can load in its lifetime. Decreasing will reduce chunk loads caused by entity projectiles, but could cause issues with tridents, enderpearls, etc.


Mobs

spawn-limits

Good starting values:

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

The math of limiting mobs is [playercount] * [limit], where "playercount" is current amount of players on the server. Logically, the smaller the numbers are, the less mobs you're gonna see. per-player-mob-spawn applies an additional limit to this, ensuring mobs are equally distributed between players. Reducing this is a double-edged sword; yes, your server has less work to do, but in some gamemodes natural-spawning mobs are a big part of a gameplay. You can go as low as 20 or less if you adjust mob-spawn-range properly. Setting mob-spawn-range lower will make it feel as if there are more mobs around each player. If you are using Paper, you can set mob limits per world in paper-world configuration.

ticks-per

Good starting values:

    monster-spawns: 10
    animal-spawns: 400
    water-spawns: 400
    water-ambient-spawns: 400
    water-underground-creature-spawns: 400
    axolotl-spawns: 400
    ambient-spawns: 400

This option sets how often (in ticks) the server attempts to spawn certain living entities. Water/ambient mobs do not need to spawn each tick as they don't usually get killed that quickly. As for monsters: Slightly increasing the time between spawns should not impact spawn rates even in mob farms. In most cases all of the values under this option should be higher than 1. Setting this higher also allows your server to better cope with areas where mob spawning is disabled.

mob-spawn-range

Good starting value: 3

Allows you to reduce the range (in chunks) of where mobs will spawn around the player. Depending on your server's gamemode and its playercount you might want to reduce this value along with bukkit.yml's spawn-limits. Setting this lower will make it feel as if there are more mobs around you. This should be lower than or equal to your simulation distance, and never larger than your hard despawn range / 16.

entity-activation-range

Good starting values:

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

You can set what distance from the player an entity should be for it to tick (do stuff). Reducing those values helps performance, but may result in irresponsive mobs until the player gets really close to them. Lowering this too far can break certain mob farms; iron farms being the most common victim.

entity-tracking-range

Good starting values:

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

This is distance in blocks from which entities will be visible. They just won't be sent to players. If set too low this can cause mobs to seem to appear out of nowhere near a player. In the majority of cases this should be higher than your entity-activation-range.

tick-inactive-villagers

Good starting value: false

This allows you to control whether villagers should be ticked outside of the activation range. This will make villagers proceed as normal and ignore the activation range. Disabling this will help performance, but might be confusing for players in certain situations. This may cause issues with iron farms and trade restocking.

nerf-spawner-mobs

Good starting value: true

You can make mobs spawned by a monster spawner have no AI. Nerfed mobs will do nothing. You can make them jump while in water by changing spawner-nerfed-mobs-should-jump to true in paper-world configuration.

despawn-ranges

Good starting values:

      ambient:
        hard: 72
        soft: 30
      axolotls:
        hard: 72
        soft: 30
      creature:
        hard: 72
        soft: 30
      misc:
        hard: 72
        soft: 30
      monster:
        hard: 72
        soft: 30
      underground_water_creature:
        hard: 72
        soft: 30
      water_ambient:
        hard: 72
        soft: 30
      water_creature:
        hard: 72
        soft: 30

Lets you adjust entity despawn ranges (in blocks). Lower those values to clear the mobs that are far away from the player faster. You should keep soft range around 30 and adjust hard range to a bit more than your actual simulation-distance, so mobs don't immediately despawn when the player goes just beyond the point of a chunk being loaded (this works well because of delay-chunk-unloads-by in paper-world configuration). When a mob is out of the hard range, it will be instantly despawned. When between the soft and hard range, it will have a random chance of despawning. Your hard range should be larger than your soft range. You should adjust this according to your view distance using (simulation-distance * 16) + 8. This partially accounts for chunks that haven't been unloaded yet after player visited them.

per-player-mob-spawns

Good starting value: true

This option decides if mob spawns should account for how many mobs are around target player already. You can bypass a lot of issues regarding mob spawns being inconsistent due to players creating farms that take up the entire mobcap. This will enable a more singleplayer-like spawning experience, allowing you to set lower spawn-limits. Enabling this does come with a very slight performance impact, however it's impact is overshadowed by the improvements in spawn-limits it allows.

max-entity-collisions

Good starting value: 2

Overwrites option with the same name in spigot.yml. It lets you decide how many collisions one entity can process at once. Value of 0 will cause inability to push other entities, including players. Value of 2 should be enough in most cases. It's worth noting that this will render maxEntityCramming gamerule useless if its value is over the value of this config option.

update-pathfinding-on-block-update

Good starting value: false

Disabling this will result in less pathfinding being done, increasing performance. In some cases this will cause mobs to appear more laggy; They will just passively update their path every 5 ticks (0.25 sec).

fix-climbing-bypassing-cramming-rule

Good starting value: true

Enabling this will fix entities not being affected by cramming while climbing. This will prevent absurd amounts of mobs being stacked in small spaces even if they're climbing (spiders).

armor-stands.tick

Good starting value: false

In most cases you can safely set this to false. If you're using armor stands or any plugins that modify their behavior and you experience issues, re-enable it. This will prevent armor stands from being pushed by water or being affected by gravity.

armor-stands.do-collision-entity-lookups

Good starting value: false

Here you can disable armor stand collisions. This will help if you have a lot of armor stands and don't need them colliding with anything.

tick-rates

Good starting values:

  behavior:
    villager:
      validatenearbypoi: 60
      acquirepoi: 120
  sensor:
    villager:
      secondarypoisensor: 80
      nearestbedsensor: 80
      villagerbabiessensor: 40
      playersensor: 40
      nearestlivingentitysensor: 40

It is not recommended to change these values from their defaults while Pufferfish's DAB is enabled!

This decides how often specified behaviors and sensors are being fired in ticks. acquirepoi for villagers seems to be the heaviest behavior, so it's been greately increased. Decrease it in case of issues with villagers finding their way around.

dab.enabled

Good starting value: true

DAB (dynamic activation of brain) reduces the amount an entity is ticked the further away it is from players. DAB works on a gradient instead of a hard cutoff like EAR. Instead of fully ticking close entities and barely ticking far entities, DAB will reduce the amount an entity is ticked based on the result of a calculation influenced by dab.activation-dist-mod.

dab.max-tick-freq

Good starting value: 20

Defines the slowest amount entities farthest from players will be ticked. Increasing this value may improve the performance of entities far from view but may break farms or greatly nerf mob behavior. If enabling DAB breaks mob farms, try decreasing this value.

dab.activation-dist-mod

Good starting value: 7

Controls the gradient in which mobs are ticked. Decreasing this will activate DAB closer to players, improving DAB's performance gains, but will affect how entities interact with their surroundings and may break mob farms. If enabling DAB breaks mob farms, try increasing this value.

enable-async-mob-spawning

Good starting value: true

If asynchronous mob spawning should be enabled. For this to work, the Paper's per-player-mob-spawns setting must be enabled. This option does not actually spawn mobs asynchronous, but does offload much of the computational effort involved with spawning new mobs to a different thread. Enabling this option should not be noticeable on vanilla gameplay.

enable-suffocation-optimization

Good starting value: true

This option optimises a suffocation check (the check to see if a mob is inside a block and if they should take suffocation damage), by rate limiting the check to the damage timeout. This optimisation should be impossible to notice unless you're an extremely technical player who's using tick-precise timing to kill an entity at exactly the right time by suffocation.

inactive-goal-selector-throttle

Good starting value: true

Throttles the AI goal selector in entity inactive ticks, causing the inactive entities to update their goal selector every 20 ticks instead of every tick. Can improve performance by a few percent, and has minor gameplay implications.

zombie.aggressive-towards-villager-when-lagging

Good starting value: false

Enabling this will cause zombies to stop targeting villagers if the server is below the tps threshold set with lagging-threshold in purpur.yml.

entities-can-use-portals

Good starting value: false

This option can disable portal usage of all entities besides the player. This prevents entities from loading chunks by changing worlds which is handled on the main thread. This has the side effect of entities not being able to go through portals.

villager.lobotomize.enabled

Good starting value: true

This should only be enabled if villagers are causing lag! Otherwise, the pathfinding checks may decrease performance.

Lobotomized villagers are stripped from their AI and only restock their offers every so often. Enabling this will lobotomize villagers that are unable to pathfind to their destination. Freeing them should unlobotomize them.

villager.search-radius

Good starting values:

          acquire-poi: 16
          nearest-bed-sensor: 16

Radius within which villagers will search for job site blocks and beds. This significantly boosts performance with large amount of villagers, but will prevent them from detecting job site blocks or beds that are further away than set value.


Misc

merge-radius

Good starting values:

      item: 3.5
      exp: 4.0

This decides the distance between the items and exp orbs to be merged, reducing the amount of items ticking on the ground. Setting this too high will lead to the illusion of items or exp orbs disappearing as they merge together. Setting this too high will break some farms, as well as allow items to teleport through blocks. There are no checks done to prevent items from merging through walls (unless Paper's fix-items-merging-through-walls setting is activated). Exp is only merged on creation.

hopper-transfer

Good starting value: 8

Time in ticks that hoppers will wait to move an item. Increasing this will help improve performance if there are a lot of hoppers on your server, but will break hopper-based clocks and possibly item sorting systems if set too high.

hopper-check

Good starting value: 8

Time in ticks between hoppers checking for an item above them or in the inventory above them. Increasing this will help performance if there are a lot of hoppers on your server, but will break hopper-based clocks and item sorting systems relying on water streams.

alt-item-despawn-rate

Good starting values:

      enabled: true
      items:
        cobblestone: 300
        netherrack: 300
        sand: 300
        red_sand: 300
        gravel: 300
        dirt: 300
        short_grass: 300
        pumpkin: 300
        melon_slice: 300
        kelp: 300
        bamboo: 300
        sugar_cane: 300
        twisting_vines: 300
        weeping_vines: 300
        oak_leaves: 300
        spruce_leaves: 300
        birch_leaves: 300
        jungle_leaves: 300
        acacia_leaves: 300
        dark_oak_leaves: 300
        mangrove_leaves: 300
        cactus: 300
        diorite: 300
        granite: 300
        andesite: 300
        scaffolding: 600

This list lets you set alternative time (in ticks) to despawn certain types of dropped items faster or slower than default. This option can be used instead of item clearing plugins along with merge-radius to improve performance.

redstone-implementation

Good starting value: ALTERNATE_CURRENT

Replaces the redstone system with faster and alternative versions that reduce redundant block updates, lowering the amount of logic your server has to calculate. Using a non-vanilla implementation may introduce minor inconsistencies with very technical redstone, but the performance gains far outweigh the possible niche issues. A non-vanilla implementation option may additionally fix other redstone inconsistencies caused by CraftBukkit.

The ALTERNATE_CURRENT implementation is based off of the Alternate Current mod. More information on this algorithm can be found on their resource page.

hopper.disable-move-event

Good starting value: false

InventoryMoveItemEvent doesn't fire unless there is a plugin actively listening to that event. This means that you only should set this to true if you have such plugin(s) and don't care about them not being able to act on this event. Do not set to true if you want to use plugins that listen to this event, e.g. protection plugins!

hopper.ignore-occluding-blocks

Good starting value: true

Determines if hoppers will ignore containers inside full blocks, for example hopper minecart inside sand or gravel block. Keeping this enabled will break some contraptions depending on that behavior.

tick-rates.mob-spawner

Good starting value: 2

This option lets you configure how often spawners should be ticked. Higher values mean less lag if you have a lot of spawners, although if set too high (relative to your spawners delay) mob spawn rates will decrease.

optimize-explosions

Good starting value: true

Setting this to true replaces the vanilla explosion algorithm with a faster one, at a cost of slight inaccuracy when calculating explosion damage. This is usually not noticeable.

treasure-maps.enabled

Good starting value: false

Generating treasure maps is extremely expensive and can hang a server if the structure it's trying to locate is in an ungenerated chunk. It's only safe to enable this if you pregenerated your world and set a vanilla world border.

treasure-maps.find-already-discovered

Good starting values:
      loot-tables: true
      villager-trade: true

Default value of this option forces the newly generated maps to look for unexplored structure, which are usually in not yet generated chunks. Setting this to true makes it so maps can lead to the structures that were discovered earlier. If you don't change this to true you may experience the server hanging or crashing when generating new treasure maps. villager-trade is for maps traded by villagers and loot-tables refers to anything that generates loot dynamically like treasure chests, dungeon chests, etc.

tick-rates.grass-spread

Good starting value: 4

Time in ticks between the server trying to spread grass or mycelium. This will make it so large areas of dirt will take a little longer to turn to grass or mycelium. Setting this to around 4 should work nicely if you want to decrease it without the decreased spread rate being noticeable.

tick-rates.container-update

Good starting value: 1

Time in ticks between container updates. Increasing this might help if container updates cause issues for you (it rarely happens), but makes it easier for players to experience desync when interacting with inventories (ghost items).

non-player-arrow-despawn-rate

Good starting value: 20

Time in ticks after which arrows shot by mobs should disappear after hitting something. Players can't pick these up anyway, so you may as well set this to something like 20 (1 second).

creative-arrow-despawn-rate

Good starting value: 20

Time in ticks after which arrows shot by players in creative mode should disappear after hitting something. Players can't pick these up anyway, so you may as well set this to something like 20 (1 second).

disable-method-profiler

Good starting value: true

This option will disable some additional profiling done by the game. This profiling is not necessary to run in production and can cause additional lag.

dolphin.disable-treasure-searching

Good starting value: true

Prevents dolphins from performing structure search similar to treasure maps

teleport-if-outside-border

Good starting value: true

Allows you to teleport the player to the world spawn if they happen to be outside of the world border. Helpful since the vanilla world border is bypassable and the damage it does to the player can be mitigated.


Helpers

anti-xray.enabled

Good starting value: true

Enable this to hide ores from x-rayers. For detailed configuration of this feature check out Configuring Anti-Xray. Enabling this will actually decrease performance, however it is much more efficient than any anti-xray plugin. In most cases the performance impact will be negligible.

nether-ceiling-void-damage-height

Good starting value: 127

If this option is greater that 0, players above the set y level will be damaged as if they were in the void. This will prevent players from using the nether roof. Vanilla nether is 128 blocks tall, so you should probably set it to 127. If you modify the height of the nether in any way you should set this to [your_nether_height] - 1.


Java startup flags

Vanilla Minecraft and Minecraft server software in version 1.19 requires Java 17 or higher. Oracle has changed their licensing, and there is no longer a compelling reason to get your java from them. Recommended vendors are Adoptium and Amazon Corretto. Alternative JVM implementations such as OpenJ9 or GraalVM can work, however they are not supported by Paper and have been known to cause issues, therefore they are not currently recommended.

Your garbage collector can be configured to reduce lag spikes caused by big garbage collector tasks. You can find startup flags optimized for Minecraft servers here SOG. Keep in mind that this recommendation will not work on alternative JVM implementations. It's recommended to use the flags.sh startup flags generator to get the correct startup flags for your server

In addition, adding the beta flag --add-modules=jdk.incubator.vector before -jar in your startup flags can improve performance. This flag enables Pufferfish to use SIMD instructions on your CPU, making some maths faster. Currently, it's only used for making rendering in game plugin maps (like imageonmaps) possibly 8 times faster.

"Too good to be true" plugins

Plugins removing ground items

Absolutely unnecessary since they can be replaced with merge-radius and alt-item-despawn-rate and frankly, they're less configurable than basic server configs. They tend to use more resources scanning and removing items than not removing the items at all.

Mob stacker plugins

It's really hard to justify using one. Stacking naturally spawned entities causes more lag than not stacking them at all due to the server constantly trying to spawn more mobs. The only "acceptable" use case is for spawners on servers with a large amount of spawners.

Plugins enabling/disabling other plugins

Anything that enables or disables plugins on runtime is extremely dangerous. Loading a plugin like that can cause fatal errors with tracking data and disabling a plugin can lead to errors due to removing dependency. The /reload command suffers from exact same issues and you can read more about them in me4502's blog post

What's lagging? - measuring performance

mspt

Paper offers a /mspt command that will tell you how much time the server took to calculate recent ticks. If the first and second value you see are lower than 50, then congratulations! Your server is not lagging! If the third value is over 50 then it means there was at least 1 tick that took longer. That's completely normal and happens from time to time, so don't panic.

Spark

Spark is a plugin that allows you to profile your server's CPU and memory usage. You can read on how to use it on its wiki. There's also a guide on how to find the cause of lag spikes here.

Timings

Way to see what might be going on when your server is lagging are Timings. Timings is a tool that lets you see exactly what tasks are taking the longest. It's the most basic troubleshooting tool and if you ask for help regarding lag you will most likely be asked for your Timings. Timings is known to have a serious performance impact on servers, it's recommended to use the Spark plugin over Timings and use Purpur or Pufferfish to disable Timings all together.

To get Timings of your server, you just need to execute the /timings paste command and click the link you're provided with. You can share this link with other people to let them help you. It's also easy to misread if you don't know what you're doing. There is a detailed video tutorial by Aikar on how to read them.


Minecraft exploits and how to fix them

To see how to fix exploits that can cause lag spikes or crashes on a Minecraft server, refer to here.

minecraft-optimization's People

Contributors

akdukaan avatar ben754444 avatar bumbletree avatar cubelius avatar e-im avatar emielderckx avatar encode42 avatar euphillya avatar fishyfissh avatar fredster33 avatar freemonoid avatar granny avatar heuerleon avatar kolakz avatar me4502 avatar notsatvrn avatar osfanbuff63 avatar pantera07 avatar phoenix616 avatar redstonefuture avatar sabinm1 avatar spongecade avatar sunxyw avatar toffikk avatar trevo525 avatar youhavetrouble avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

minecraft-optimization's Issues

1.20.4 grass renamed to short_grass

If you follow this guide you'll get this error:

[Server thread/ERROR]: [MapSerializer] Could not deserialize key grass into class net.minecraft.world.item.Item at [entities, spawning, alt-item-despawn-rate, items]

This is due to the renaming of grass to short_grass (why??) Just thought I'd give a heads up.

suggestion: add to the guide viewdistancetweaks

https://www.spigotmc.org/resources/view-distance-tweaks-1-14-1-17.75164/

Imagine for a moment that the server changed the simulation distance and the view distance (view-distance & no-tick-view-distance) depending on how many active players there are and if the tps go up and down it acts accordingly.

Imagine: 2 players on a 16gb ram machine with a modern i7? HELL YEAH BABY, YOU CAN WATCH 32 CHUNKS and the server ticks let's say a distance of 16

oh shit, suddenly pewdiepie joined and all his fans joined too! we have 200 people online! Well, time to optimize: you can see 8 chunks and the server is ticking like 4.

lag? minimum

now stop imagining all that. this plugin with the apropiate configuration can do it.

What i mean is that you might want to add this to the guide because its a great tool.

I hope I could do soemthing slightly useful for your guide.

Regards

impact

You can specify the degree of impact of the configuration on performance using tags.
For example:
view-distance | Impact: Heavy

Guide translations

If you want to translate the guide and put it up on your own site, you're free to do it.
However, please link to the original guide and do not remove credit/links from the guide's content.

Typo's in EntityType list of `entity-per-chunk-save-limit`

As you can see the default paper.yml has underscores in the entity names, I think the examples in README.md contains typo's because of this.

     entity-per-chunk-save-limit:
-      fireball: -1
-      small_fireball: -1
-      experience_orb: -1
-      snowball: -1
-      ender_pearl: -1
-      arrow: -1
+      arrow: 16
+      dragonfireball: 3
+      egg: 8
+      ender_pearl: 128
+      experience_orb: 16
+      fireball: 8
+      firework: 8
+      largefireball: 8
+      lingeringpotion: 8
+      llamaspit: 3
+      shulkerbullet: 8
+      sizedfireball: 8
+      snowball: 8
+      spectralarrow: 16
+      splashpotion: 3
+      thrownexpbottle: 3
+      trident: 16
+      witherskull: 4
+      wither_skull: 4

update alt-item-despawn-rate

  alt-item-despawn-rate:
    enabled: true
    items:
      COBBLESTONE: 300
      NETHERRACK: 300
      SAND: 300
      RED_SAND: 300
      GRAVEL: 300
      DIRT: 300
      GRASS: 300
      SEED: 300
      PUMPKIN: 300
      PUMPKIN_SEED: 300
      MELON_SLICE: 300
      MELON_SEED: 300
      KELP: 300
      BAMBOO: 300
      SUGAR_CANE: 300
      TWISTING_VINES: 300
      WEEPING_VINES: 300
      OAK_LEAVES: 300
      SPRUCE_LEAVES: 300
      BIRCH_LEAVES: 300
      JUNGLE_LEAVES: 300
      ACACIA_LEAVES: 300
      DARK_OAK_LEAVES: 300
      AZALEA_LEAVES: 300
      FLOWERING_AZALEA: 300
      CACTUS: 300
      DIORITE: 300
      GRANITE: 300
      ANDESITE: 300
      SCAFFOLDING: 300
      SAND_STONE: 300
      STONE: 300
      COBBLED_DEEPSLATE: 300
      TUFF: 300
      COAL: 300
      AMETHYST_SHARD: 300
      RAW_COPPER: 300
      CALCITE: 300
      DEEPSLATE: 300
      GLOW_INK_SAC: 300
      REDSTONE_DUST: 300
      EGG: 300
      BASALT: 300
      BLACKSTONE: 300
      GOLD_NUGGET: 300
      FEATHER: 300
      ROTTEN_FLESH: 300
      INK_SAC: 300
      STRING: 300
      SPIDER_EYE: 300
      BONE: 300
      ARROW: 300
      BOW: 300
      WHEAT: 300
      STICK: 300
      AZALEA: 300
      OAK_SAPLING: 300
      SPRUCE_SAPLING: 300
      ACACIA_SAPLING: 300
      DARK_OAK_SAPLING: 300

Needs chunk-loading optimization advices

Hello,

Paper recently merged some optimizations from Tuinity in build #232 , and it affects most of us. (PaperMC/Paper#6413)
Details of chunk-loading patch: (https://github.com/PaperMC/Paper/blob/20903fcf5e227a1a03e2afd89f01bfe951b2b328/patches/server/0771-Replace-player-chunk-loader-system.patch)
I hope someone could take a look into the chunk-loading settings and find the best way to optimize them.
I am currently having problems with a very delayed chunk loading after update to the new Paper build, on an online server with over 40 players.

Could I translate this to Chinese?

Hello,
I am a minecraft player and also a developer who come from China. I think compared with the traditional, your guide gives more detailed introduction to the configuration. It is flabbergasted to let the server owner make his own choice and gradually adjust the configuration,this is a great innovation and inspired me a lot!
So, could you allow me to translate this guide into Chinese and publish it on MCBBS,which is the most prestigious forum and I can also pull request to this repository at the same time?

entity-broadcast-range-percentage

On my server, due to the multitude of unique items, users have consistently experienced low FPS levels. While elsewhere they might have around 100-120 FPS, in my lobby, for example, it's around 50-60. You could try adjusting the "entity-broadcast-range-percentage" setting similarly to the "entity-tracking-range" setting. However, this setting affects everything that could cause lag and may also benefit those with poor internet connections. Here are a few visual examples with a value of 20:

image
image

entity-broadcast-range-percentage=100 (63-65 FPS):
image

entity-broadcast-range-percentage=20: (74-78 FPS):
image

Enhancement

A great thing to include in the guide: Server optimization and Minecraft limits

Question re: Suggested Optimizations for Fabric/Vanilla

Hello,

Thank you for putting together this excellent guide. I've run servers before, but I only found this last week; it's wonderful.

A friend asked me to put up a Fabric server for them, which I've never worked with before. I'm treating it like a vanilla server with an added mod pack API. To that end, I looked in the document here for adjustments specific to Vanilla and Fabric itself, and ignored the other server types. Is that the way to go?

I ended up adjusting sync chunk writes, network compression threshold, and the simulation and view distances, and otherwise leaving everything else alone for now. Everything else seemed to not apply, since I'm not running another server type. Am I missing anything?

Include default files with optimized values

It would be extremely helpful if there was included files which contained all of the 'good starting values', so you could simply drag & drop into new (or existing) server instances and have the optimizations done and ready to go once the server starts. Missing keys are automatically added to the files so this shouldn't cause any issues.

These recommendations forgoe vanilla features and gameplay.

A lot of these settings and recommendations will break a lot of redstone mechanics and contraptions, because some developers of them think that certain vanilla features are actually a bug or an exploit instead. Please put up disclaimers on settings that break things, or recommend using fabric or quilt instead, as those do not go out of their way to fix what did not need fixing, while having even better performance in some circumstances. I have seen this issue multiple times on different servers, and the people who manage those servers are tired of players complaining about their redstone contraptions breaking.

Wrong statements about Mohist

Please correct your sayings about mohist. Its completly open source and no maliscius software. If you believe such false rumors, please take this git down. Here is more about the rumors stated: https://discord.com/channels/311256119005937665/550911071188418571/912420621835731024

:emoji_2: Hello everyone, i see a lot of people saying Mohist is malicious because of the EssentialsX PSA published a few months ago about Mohist. Of couse, Mohist is not malicious, and i even wrote an article about it.

Please know that almost all (and maybe all) of the information of that PSA is false and outdated.

Of course, we do not replace plugins jar by malicious jars, since all of them are free and open source on GitHub since the begenning, and you can find the modified EssentialsX repository which contains all of the source code here https://github.com/KR33PY/Essentials. That's why I highly recommend everyone who read the PSA to read this https://github.com/Shawiizz/MohistEssentialsX/blob/main/README.md to understand why you shouldn't trust the content of the EssentialsX PSA.

By the way, know that the Mohist plugin checker always ask your permission before downloading a plugin, and you can even disable it in the mohist.yml confirguration file (disable_plugins_blacklist option) and it has always been the case since the creation of this plugin checker. It even gives you the url of the GitHub repository so that you can check the source code easily. We don't really understand the behavior of EssentialsX team, and we still don't know exactly why this PSA has been written.

To finish, please do not trust everyone! As you can see, a lot of false information can be wrote about something, and in this case, the EssentialsX team wrote a lot of false information about the Mohist project and about our team, while they do not know anything about it and the consequences that this could have on the Mohist project.

Thanks for reading, and I hope this announcement will make some people know the truth about this subject.
The Mohist Team

Here the full explanation https://github.com/Shawiizz/MohistEssentialsX/blob/main/README.md

New config add

bukkit.yml
https://github.com/YouHaveTrouble/minecraft-optimization#spawn-limits

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

Add 'water-underground-creature'

https://github.com/YouHaveTrouble/minecraft-optimization#ticks-per

ticks-per:
  animal-spawns: 400
  monster-spawns: 1
  water-spawns: 1
  water-ambient-spawns: 1
  water-underground-creature-spawns: 1
  ambient-spawns: 1
  autosave: 6000

Add 'water-underground-creature-spawns'

There is a new entry in the bukkit.yml config so you need to add optimizations.

Invalid entity-per-chunk-save-limit config

Paper writes this error.

[10:01:25 ERROR]: Invalid entity-per-chunk-save-limit config, 'ender_signal' is not a valid entity type. Correct this in paper.yml.
[10:01:25 ERROR]: Invalid entity-per-chunk-save-limit config, 'firework' is not a valid entity type. Correct this in paper.yml.
[10:01:25 ERROR]: Invalid entity-per-chunk-save-limit config, 'splash_potion' is not a valid entity type. Correct this in paper.yml.
[10:01:25 ERROR]: Invalid entity-per-chunk-save-limit config, 'thrown_exp_bottle' is not a valid entity type. Correct this in paper.yml.

Small Outdated Information Note

First of all, excellent guide. Thank you. Saves me time of having to write all this information when teaching people how to make an MC server. Instead I can just link them your guide.

Secondly, on this page I noticed it mentions using tuinity. That server software has been merged into Paper and thus should be removed as a suggestion.

Please Note: I do not check Github regularly and thus will likely not see replies.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.