entity-activation-range

The entity-activation-[Range](/range) is the radius (in blocks) around each player that mobs will start to ‘tick’ (become active).

See wake-up-inactive for more information on that specific setting.

You can change it in [spigot](/spigot).yml, under world-settings -> default. Its default value is:

entity-activation-range:
    animals: 32
    monsters: 32
    raiders: 64
    misc: 16
    water: 16
    villagers: 32
    flying-monsters: 32
    wake-up-inactive:
        ...

Recommended starting value

For a small SMP server with just some friends, these values should be fine and provide a slightly better range at which entities become active:

entity-activation-range:
    animals: 44
    monsters: 36
    raiders: 64
    misc: 20
    water: 20
    villagers: 24
    flying-monsters: 40
    wake-up-inactive:
        ...

If you have a larger server or run into some lag issues, you can lower the activation ranges to:

entity-activation-range:
    animals: 18
    monsters: 20
    raiders: 48
    misc: 12
    water: 12
    villagers: 12
    flying-monsters: 28
    wake-up-inactive:
        ...

If you really have lag issues caused by entities ticking:

entity-activation-range:
    animals: 12
    monsters: 16
    raiders: 28
    misc: 8
    water: 8
    villagers: 3
    flying-monsters: 20
    wake-up-inactive:
        ...

What does entity-activation-range do?

It’s the distance in blocks from each player at which entities will start to tick (become active). For example, if the entity-activation-[Range](/range) for monsters is set to 32, monsters within 32 blocks of a player will become active and start doing their AI tasks, such as moving, attacking, etc.

If it’s set to 16, monsters will only become active when they are within 16 blocks of a player.

Lower values

Lower activation ranges will:

Higher values

Higher activation ranges will:

Should you change this or the spawn limits?

The spawn-limits tells the server how many mobs to spawn.

YOu can compromsise either by:

Generally, it’s better to lower the spawn limits and have a higher activation Range. Your players will complain less about mobs ‘freezing’ when they are not nearby.

However, lowering the activation range is one of the best ways to reduce server lag caused by entities. I’d recommend trying lowering the activation ranges significantly if you are having lag issues, and wait and see if your players complain about it - they may not even notice, or they may threaten to leave your Server unless you change it back…

This is a common theme in server optimisation - optimising just enough so that the server runs smoothly, but not so much that it negatively impacts the player experience.
If you’re running at 2 MSPT because you have a very optimised server, but no vanilla mechanics work, your server won’t be that much fun to play on. But if you provide completely vanilla mechanics at 80 MSPT, no one will want to play on your server because of the lag. There is a balance.

A special note on villagers

Villagers… so laggy in fact there’s an entire page dedicated to them:

Villagers, oh villagers, oh villagers

They’re extremely laggy mobs. If you lower their activation range, you can cut down on a tonne of server lag.

Personally, I think the trade-off is worth it. There are some issues with lowering it though: