BuiltByBit store

BetterMultiThreadedConfiguration

Configuration

Every BetterMultiThreaded option and its default.

BetterMultiThreaded is configured in config/canvas-server.yml. The file is created on first start and carries a comment above every option. This page covers the sections that control sharding, region merging and splitting, the scheduler and the per-core savings.

sharded-regions

The main switch and the options that apply to every sharded region.

sharded-regions:
   enabled: true
   shard-size-chunks: 8
   world-mode-all-regions: true
   worker-threads: 0
   zones-force: true
   parallel-tracker: true
   shard-connections: true
   shard-packets: true
   shard-entity-schedulers: true
   parallel-activation: true
   parallel-ticket-purge: true
   keep-shards-on-split: true
   debug-log: false
KeyDefaultMeaning
enabledtrueMaster switch for sharded ticking. Set to false and run /bmt reload to turn it off without a restart.
shard-size-chunks8Default edge length of a shard in chunks. Rounded up to a power of two, 8 to 64. Every world and zone can override it at runtime.
world-mode-all-regionstrueWhen a whole world is sharded, also shard its regions that have no player in them. false = only regions with at least one player.
worker-threads0Shard worker threads shared by all sharded regions. The region thread joins as an extra worker. 0 = CPU cores ÷ 4, between 2 and 8.
zones-forcetrueForce sharding for any region that has a player inside an enabled zone.
parallel-trackertrueRun the entity tracker (visibility and movement packets) of a sharded region in parallel.
shard-connectionstrueRun each player’s own movement and physics tick inside the shard tasks. false = on the region thread.
shard-packetstrueHandle the shard-safe head of every player’s packet queue inside the shard task that ticks the player.
shard-entity-schedulerstrueRun plugin entity schedulers inside the shard task that owns the entity.
parallel-activationtrueRun the entity-activation-range pass as parallel tasks.
parallel-ticket-purgetrueRun the chunk ticket expiry pass as a parallel task.
keep-shards-on-splittrueWhen a sharded region splits, hand its shards to the region that inherits most of the land instead of rebuilding them.
debug-logfalseLog activation, deactivation and per-tick phase timings. Spammy.

auto

When a region is sharded and un-sharded on its own.

sharded-regions:
   auto:
      enabled: true
      min-players: 40
      activate-mspt: 22.0
      force-players: 80
      deactivate-below-players: 30
      hysteresis-seconds: 20
KeyDefaultMeaning
enabledtrueAutomatically shard a region that grew too large and un-shard it when it shrinks again.
min-players40A region needs at least this many players before the MSPT rule is considered.
activate-mspt22.0Shard when the region’s 5-second average MSPT is at or above this while it has min-players players.
force-players80Shard regardless of MSPT once the region has this many players.
deactivate-below-players30Un-shard when the player count stays below this. MSPT is not used here: sharding lowers it by design.
hysteresis-seconds20A condition must hold this long before the mode flips.

scan

Thresholds for /bmt shard scan.

sharded-regions:
   scan:
      mspt: 20.0
      min-players: 20
      force-players: 80
      zone-prefix: "scan"
KeyDefaultMeaning
mspt20.0A region counts as lagging when its 5-second or 1-minute MSPT is at or above this, and it has min-players players.
min-players20Minimum players a region needs before its MSPT is considered.
force-players80A region with this many players is converted regardless of MSPT.
zone-prefix"scan"Name prefix of the zones the scan creates. A config file from an older build keeps its old value until you change it.

grouping

Hot and cold planning. A shard with a player, a measurable tick cost or many entities is a task of its own; the remaining cold shards are grouped into larger squares that one worker ticks together. The effect is small pieces in the crowd and big pieces in empty land.

sharded-regions:
   grouping:
      enabled: true
      cold-group-size-chunks: 32
      hot-shard-micros: 100
      hot-shard-entities: 24
KeyDefaultMeaning
enabledtrueGroup cold shards into larger tasks.
cold-group-size-chunks32Edge length of a cold group in chunks. Rounded to a power of two, at least the shard size.
hot-shard-micros100A shard whose last tick took at least this many microseconds is hot.
hot-shard-entities24A shard with at least this many ticking entities is hot.

regioniser

How regions merge and split. Both switches take effect at the next merge or split, without a restart.

regioniser:
   keep-largest-region-on-merge: true
   incremental-split: true
   slow-operation-log-millis: 10.0
KeyDefaultMeaning
keep-largest-region-on-mergetrueWhen regions merge, the largest one survives and the smaller ones are moved into it. false = Folia’s behaviour.
incremental-splittrueWhen a region falls apart, the largest connected part keeps the region and only the parts that broke off are moved. false = Folia’s full rebuild.
slow-operation-log-millis10.0Log every merge or split that held the regioniser lock for at least this long. 0 = log all of them, negative = never.

region-scheduler

The work-stealing options live under affinity-scheduler and are read at startup.

region-scheduler:
   affinity-scheduler:
      steal-threshold-millis: 3
      waiting-threads-steal: true
      foreign-tasks-min-slack-millis: 1.0
      foreign-tasks-budget-millis: 2.0
KeyDefaultMeaning
steal-threshold-millis3How long a thread may delay a scheduled task before other threads are allowed to steal it.
waiting-threads-stealtrueThreads that are idle, or parked until their own region’s next tick, take over a region another thread cannot start on time.
foreign-tasks-min-slack-millis1.0A waiting thread only runs other regions’ intermediate tasks while at least this much time is left before its own tick.
foreign-tasks-budget-millis2.0Longest uninterrupted run of another region’s intermediate tasks before the thread looks at the next region.

dab

Dynamic Activation of Brain. The further a mob is from the nearest player, the less often its AI runs.

dab:
   enabled: true
   start-distance: 12
   max-tick-freq: 20
   activation-dist-mod: 8
   blacklisted-entities: []
KeyDefaultMeaning
enabledtrueThrottle the AI of mobs that are far from every player.
start-distance12Blocks from the nearest player from which the AI is throttled.
max-tick-freq20Longest allowed interval between AI ticks. 20 = once per second.
activation-dist-mod8Shift applied to the squared distance to get the interval. With 8: 32 blocks → every 4 ticks, 64 blocks → every 16.
blacklisted-entities[]Entity type keys whose AI is never throttled, for example minecraft:villager.

async-mob-spawning

async-mob-spawning:
   enabled: true
   threads: 1
KeyDefaultMeaning
enabledtrueCount the region’s entities for natural spawning on a background thread. Only active when entities.spawning.per-player-mob-spawns is true in paper-world-defaults.yml.
threads1Background threads shared by all regions for the recount. One is enough for most servers.

tick-optimizations

tick-optimizations:
   random-tick-section-mask-refresh-ticks: 20
   equipment-change-cache: true
KeyDefaultMeaning
random-tick-section-mask-refresh-ticks20How often each chunk recomputes which sections hold a randomly ticking block. A newly planted crop gets its first random tick at most this many ticks late. 0 = recompute every tick (vanilla behaviour, no gain).
equipment-change-cachetrueRun the full equipment comparison only when a slot’s item, count or components changed.

Other files

FilePurpose
config/canvas-server.ymlEverything on this page.
config/canvas-bolge-zones.jsonThe zones and world levels you created. Managed by the commands; reload it with /bmt folia reload.
config/paper-global.ymlPaper and Folia settings, including threaded-regions.scheduler.

Next: FAQ.