Improving performance by changing values in Sponge's global.conf file

This is for Sponge Vanilla 7.4.0. I know there is https://docs.spongepowered.org/7.4.0/en-GB/server/getting-started/configuration/sponge-conf.html and that is good but despite the good documentation I still have some questions about how I can go about improving performance.

First point of confusion:

entity {
    # Number of colliding entities in one spot before logging a warning.
    # Set to '0' to disable.
    collision-warn-size=200
    # Number of ticks before a painting is respawned on clients when their art is changed.
    entity-painting-respawn-delay=2
    # Number of ticks before the fake player entry of a human is removed from the tab list
    # (ranges from '0' to '100' ticks).
    human-player-list-remove-delay=10
    # Controls the time in ticks for when an item despawns.
    item-despawn-rate=6000
    # The upper bounded range where living entities farther from a player will likely despawn.
    living-hard-despawn-range=128
    # The amount of seconds before a living entity between the soft and hard despawn ranges
    # from a player to be considered for despawning.
    living-soft-despawn-minimum-life=30
    # The lower bounded range where living entities near a player may potentially despawn.
    living-soft-despawn-range=32
    # Maximum size of an entity's bounding box before removing it.
    # Set to '0' to disable.
    max-bounding-box-size=1000
    # Square of the maximum speed of an entity before removing it.
    # Set to '0' to disable.
    max-speed=100
}

So let’s say living-hard-despawn-range and living-soft-despawn-minimum-life have their default values of 128 and 32 respectively. So that means after 30 seconds (from living-soft-despawn-minimum-life) entities will despawn 32-128 blocks away from a player?

But what if in server.properites, the view-distance is set to 6? So that’s six chunks? And chunks are 16 blocks by 16 blocks so 16 * 6 = 96 blocks. Should I lower living-hard-despawn-range to that or does it not matter? Also how does this relate to this part of the configuration later on in the file?:

        # This value is capped to the current view distance setting in server.properties
        mob-spawn-range=4

Also, in terms of improving performance, I suppose I need to decrease living-soft-despawn-minimum-life?

Can I get away with improving performance by tweaking anything else here? I am not sure what these are to be honest:

  • max-bounding-box-size
  • max-speed

Those don’t make much sense to me.

Another part I need to wrap my head around:

    entity-activation-range {
        # If 'true', newly discovered entities will be added to this config with a default value.
        auto-populate=false
        # Default activation ranges used for all entities unless overridden.
        defaults {
            ambient=32
            aquatic=32
            creature=32
            misc=16
            monster=32
        }
        # Per-mod overrides. Refer to the minecraft default mod for example.
        mods {}
    }

I don’t understand what entity-activation-range really means. I vaguely get the idea that the lower these numbers, the better the performance. I should likely set auto-populate to true so I get more customisation as new entities appear? Any downside to setting that to true or not really?

Now for this one:

    entity-collisions {
        # If 'true', newly discovered entities/blocks will be added to this config with a default value.
        auto-populate=false
        # Maximum amount of entities any given entity or block can collide with.
        # This improves performance when there are more than 8 entities on top of each other
        # such as a 1x1 spawn pen.Set to '0' to disable.
        max-entities-within-aabb=8
        # Per-mod overrides. Refer to the minecraft default mod for example.
        mods {
            minecraft {
                # Default maximum collisions used for all entities unless overridden.
                defaults {}
                # If 'false', entity collision rules for this mod will be ignored.
                enabled=true
                entities {}
            }
        }
    }

What happens when there are 8 entities in this case on top of each other? Do they die/break or something?

Next thing I don’t understand is something in the optimizations section:

        structure-saving {
            # If 'true', newly discovered structures will be added to this config with a default value of 'true'.
            # This is useful for finding out potentially what structures are being saved from various mods,
            # and allowing those structures to be selectively disabled.
            auto-populate=false
            # Global switch to enable sponge's changes to the structure saving mechansim.
            # By default, this option is disabled, i.e. saving structures is not affected.
            # If you want to prevent that a certain "named" structure is saved to the world's folder,
            # you have to enable this module/setting and disable the structure in the further settings.
            # An example of a structure that is costly and somewhat irrelevant is 'mineshaft',
            # as they build and save several structures even after the mine shafts have been completely generated.
            # However, this has the disadvantage that these structures may no longer be locatable by some mods.
            enabled=false
            # Per-mod overrides. Refer to the minecraft default mod for example.
            mods {
                minecraft {
                    # Global flag, whether this mod's structures will be saved.
                    # If 'false', this mod will never save its structures.
                    # If 'true', it will check the 'structureList' for disabled structures.
                    enabled=true
                    # The configuration for each struture.
                    # A value of 'false' prevents that struture from being saved.
                    # Entries that are either missing in this list or have the value 'true' will still be saved,
                    # unless the structure saving of the mod is globally disabled.
                    structures {
                        mineshaft=false
                    }
                }
            }
        }

Comments look really good but I don’t know enough about minecraft to really understand them. Should I set auto-populate=true though so I can disable other structures? For context my map has been fully generated if that makes a difference.

Next is the spawners section:

    # Used to control spawn limits around players.
    # Note: The radius uses the lower value of mob spawn range and server's view distance.
    spawner {
        # The number of ambients the spawner can potentially spawn around a player.
        spawn-limit-ambient=15
        # The number of animals the spawner can potentially spawn around a player.
        spawn-limit-animal=15
        # The number of aquatics the spawner can potentially spawn around a player.
        spawn-limit-aquatic=5
        # The number of monsters the spawner can potentially spawn around a player.
        spawn-limit-monster=70
        # The ambient spawning tick rate. Default: 400
        tick-rate-ambient=400
        # The animal spawning tick rate. Default: 400
        tick-rate-animal=400
        # The aquatic spawning tick rate. Default: 1
        tick-rate-aquatic=1
        # The monster spawning tick rate. Default: 1
        tick-rate-monster=1
    }

I’ve looked at my timings report and I think mobs are a BIG cause of lag. In fact “mobSpawner” was a high contender. Can I literally just set spawn-limit-monster to like 30, and even increase tick-rate-monster to 400 like normal animals are set to in order to boost performance? Not really sure how this part works and why the tick rate for monster spawning is really really low?

Next is tileentity-activation:

    # Configuration options related to activation ranges of tile entities.
    tileentity-activation {
        # If 'true', newly discovered tileentities will be added to this config with default settings.
        auto-populate=false
        # Default activation block range used for all tileentities unless overridden.
        default-block-range=64
        # Default tick rate used for all tileentities unless overridden.
        default-tick-rate=1
        # Per-mod overrides. Refer to the minecraft default mod for example.
        mods {}
    }

Like the entities one, I’m not sure what “tileentity-activation” really means here. Should I set auto-populate to true though? And I’m guessing to boost performance I decrease activation block range and increase(?) the tick rate for each tileentity that will appear? Any good figures to do this for “tile entities” without it becoming too noticeable for the player? I guess it depends on the tileentity?

Lastly:

        # If 'true', any neighbour notification for a chunk not currently loaded will be denied
        # Warning: As this is an experimental setting for performance gain,
        # if you encounter any issues then we recommend disabling it.
        deny-neighbor-notification-chunk-requests=false

Should I just set this to true to try and improve performance? I don’t have too many plugins and it’s just a survival server? Should get away with it? Not sure.