Skip to content

Performance Tuning Guide

RunningArmy6 edited this page Nov 18, 2026 · 8 revisions

The Performance Tuning Guide explains how to configure and evaluate SecureAutoSmartLocks (SASL) under different server conditions.

SASL v2.8.2 — Event Horizon uses several independent processing systems. Their workload depends on more than the number of installed players or protected blocks. Chunk activity, automation traffic, persistent data, cache usage, migration tasks, and the server's available CPU and memory resources all influence the overall workload.

This guide focuses on practical configuration decisions rather than promising fixed performance results.

Important: The recommendations below are tuning guidance, not hardware benchmarks. SASL does not define a guaranteed number of locks or players per gigabyte of RAM. Actual performance must be evaluated on the target server.


Table of Contents


1. Understanding SASL Performance

SASL does not rely on a single background task to manage every protected block.

Its Core Engine distributes responsibilities across specialized components:

Component Main responsibility Performance consideration
Argus Lock integrity monitoring and ghost-data evaluation Scan frequency and segment size
Phoenix Chunk-load recovery and persistent lock-data reconstruction Chunk activity and recovery workload
Executioner Lock removal and purge processing Cleanup batch size and current TPS
Maximus Runtime cache and temporary-state maintenance Cache limits and cleanup workload
Dreadnought Legacy data migration Migration batch size and server TPS

The workload of these components is different.

For example:

  • A server with many protected blocks but little activity may have a different workload from a server with fewer locks and frequent chunk loading.
  • A server with many active hoppers may generate more ownership-check activity than a server with mostly inactive storage blocks.
  • A large migration can create a temporary workload that is not representative of normal SASL operation.

The Three Main Resources

When tuning SASL, consider three resource categories:

Resource What matters
CPU Available processing capacity, main-thread workload, and concurrent tasks
RAM Available Java heap, runtime caches, and temporary data
Storage YAML persistence, file-writing activity, and disk response time

These resources are related, but they are not interchangeable.

More RAM does not automatically solve a CPU bottleneck. Increasing CPU capacity does not automatically solve a storage bottleneck.


2. Identify Your Server's Bottleneck

Before changing config.yml, identify what is actually limiting the server.

Changing several unrelated settings without identifying the problem can make performance harder to evaluate.

Important Server Metrics

Metric What it indicates What to investigate
TPS Server tick stability Sustained drops below 20 TPS
MSPT Time required to process a server tick Sustained values above 50 ms
Java heap usage Memory currently occupied by the JVM Repeatedly low available heap
CPU utilization Processor workload Sustained high usage and overloaded main thread
Disk activity Storage workload Slow or delayed file operations
Chunk activity World-loading and recovery workload Frequent chunk loading and unloading
Cache growth Runtime data accumulation Repeatedly reaching configured cache limits

TPS and MSPT

A Minecraft server normally targets 20 ticks per second.

The ideal tick duration is:

1000 ms / 20 TPS = 50 ms per tick

A server consistently taking longer than 50 ms per tick cannot maintain the normal 20 TPS target.

Use both TPS and MSPT when evaluating performance.

TPS can remain temporarily high while individual ticks become slower. MSPT helps identify this behavior.

Do Not Attribute Every Lag Spike to SASL

A server's performance can also be affected by:

  • World generation
  • Entity AI
  • Redstone machines
  • Other plugins
  • Other server-side mods
  • Player activity
  • Storage latency
  • JVM garbage collection

A performance issue occurring while SASL is installed does not automatically mean SASL caused it.

Compare server behavior before and after a controlled configuration change.


3. CPU and Main-Thread Considerations

CPU performance is especially important for Minecraft servers because many world operations must be performed on the primary server thread.

SASL uses asynchronous processing for selected operations, including parts of persistent-data parsing, migration ingestion, and repository I/O.

However, asynchronous processing does not mean every operation can safely run outside the main thread.

Bukkit world and block operations still require appropriate server-thread execution.

performance.io-threads

Default:

io-threads: -1

The value -1 selects automatic thread-count detection.

This is the recommended starting point for most installations.

Do not assume that manually increasing the thread count will improve performance. Additional worker threads can increase concurrency, but they also compete for CPU time and may increase memory usage.

Keep automatic detection unless there is a specific, measured reason to change it.

CPU-Related Tuning Priorities

If the server has limited CPU capacity:

  1. Keep the default automatic I/O thread selection.
  2. Avoid unnecessarily increasing processing batch sizes.
  3. Observe TPS and MSPT during chunk-heavy activity.
  4. Reduce expensive maintenance workloads only when their configuration supports a safe adjustment.
  5. Avoid running large migrations during peak player activity.

Main-Thread Warning

Increasing a batch limit can increase the amount of work performed during a processing cycle.

A larger batch is not automatically faster from the player's perspective.

If a larger batch causes longer server ticks, the overall experience may become worse even if the task finishes sooner.


4. RAM and Cache Management

RAM is important for SASL because the plugin maintains runtime data, ownership information, temporary entries, and processing queues.

The performance section contains several cache limits controlled by Maximus.

Maximus Cache Configuration

Option Default What it controls
maximus-name-cache-limit 2000 Resolved player-name cache
maximus-hopper-cache-limit 250000 Combined hopper ownership cache
maximus-minecart-cache-limit 50000 Hopper-minecart ownership cache
maximus-locks-cache-limit 10000 Configured lock-cache soft-cap
maximus-purge-batch-limit 300 Synchronous cleanup batch limit

Should Cache Limits Be Increased?

Only when there is evidence that the current limits are unsuitable.

Increasing a cache limit allows more entries to remain in memory. This can reduce the frequency of limit handling, but it also allows more memory to be occupied.

A larger cache is not inherently more efficient.

For servers with limited heap availability, keeping the default limits is a sensible starting point.

Pending PDC Data

The following option controls the lifetime of pending PDC write payloads:

maximus-pending-pdc-ttl-seconds: 3600

Default: 3600 seconds.

This is a temporary-data lifetime setting, not a general instruction to retain every lock for one hour.

Do not reduce it simply because the server has limited RAM. Pending data has a role in the persistence workflow.

Scheduled Flush Entries

maximus-scheduled-ttl-seconds: 30

Default: 30 seconds.

This controls the TTL of scheduled chunk-flush entries.

It should not be confused with the actual save delay or the lifetime of a protected block.

Maximus Maintenance

Maximus includes a Rapid Sweeper that runs asynchronously every 100 ticks, approximately every 5 seconds.

Its maintenance responsibilities include expired denied-transfer cache entries and over-cap recovery handling.

Maximus also performs other cleanup operations for temporary and runtime state.

These systems are maintenance mechanisms, not substitutes for adequate Java heap allocation.

Heap Pressure and Adaptive Processing

SASL contains runtime checks that use available JVM heap information.

For example:

  • Phoenix reduces its dynamic tile-processing limit when available heap becomes critically low.
  • Executioner reduces its calculated batch size to 1 when its detected free-heap percentage falls below 15%.

These mechanisms help reduce processing pressure under certain conditions.

They do not guarantee that the server cannot run out of memory.


5. Player Count and Lock Density

Player count is useful when estimating server activity, but it is not enough to determine the correct SASL configuration.

Two servers with the same number of online players can generate very different workloads.

Player Activity

Consider these situations:

Server activity Likely SASL workload
Players remain in one established area Relatively stable chunk activity
Players frequently explore new terrain Increased chunk loading and recovery opportunities
Players use many automated storage systems More ownership-aware transfer checks
Players frequently place and remove protected blocks More lock creation and removal activity
Players move between several worlds More distributed chunk and cache activity

Lock Density

Lock density describes how concentrated protected blocks are within the world.

A server with 10,000 locks distributed across many regions does not necessarily have the same workload as a server with 10,000 locks concentrated in a heavily active base.

Consider these factors:

  • Total number of protected blocks
  • Number of protected blocks in frequently loaded chunks
  • Frequency of chunk loading and unloading
  • Hopper and hopper-minecart activity
  • Lock creation and removal frequency
  • Amount of legacy data waiting for migration

Why There Is No Fixed RAM-to-Lock Formula

SASL does not provide a verified formula such as:

1 GB RAM = 10,000 protected blocks

Such a formula would be misleading.

Memory consumption depends on the complete server environment, JVM configuration, other plugins, world activity, runtime caches, and the actual structure of the stored data.

Use real measurements instead of estimating capacity from a single number.


6. Engine-Specific Tuning

This section explains which configuration values matter most for each SASL engine and how to approach them safely.

Phoenix

Phoenix handles chunk-load recovery and reconstruction of persistent lock data.

Its workload is influenced by chunk activity, the amount of persistent data found in chunks, and the recovery operations required.

Relevant Settings

Option Default Purpose
phoenix-debounce-ms 10000 Prevents repeated processing of the same chunk during the debounce period
phoenix-tile-limit 5000 Configured TileEntity processing threshold
phoenix-pdc-parse-limit 2000 PDC entries parsed during an asynchronous loading phase
phoenix-player-radar-enabled true Enables player-proximity verification

Recommended Approach

For servers with frequent chunk activity:

  • Keep the debounce period at its default initially.
  • Avoid increasing the tile limit without observing recovery behavior.
  • Keep the player radar enabled unless there is a specific operational reason to disable it.

For servers with limited CPU or memory:

  • Consider a lower phoenix-tile-limit if recovery processing contributes to measured resource pressure.
  • Avoid increasing phoenix-pdc-parse-limit simply to make recovery finish sooner.
  • Observe chunk-loading behavior after every change.

Dynamic Tile Limit

Phoenix does not always process at the full configured tile limit.

Its implementation calculates a dynamic limit using TPS and available JVM heap information.

The configured value acts as the base limit. The effective limit can be reduced when server conditions deteriorate.

This means that increasing phoenix-tile-limit does not guarantee that Phoenix will process that many entries during every cycle.

Important

Phoenix recovery is not a general-purpose mechanism for restoring every block removed externally.

Its purpose is to reconcile supported persistent lock data during chunk-load recovery.


Argus

Argus monitors lock integrity and evaluates potentially invalid or ghost lock records.

Its configuration determines how much work is assigned to each scan segment and how frequently those segments are scheduled.

Relevant Settings

Option Default Purpose
days-to-expire 30 Lock vulnerability threshold
argus-keys-per-segment 200 Number of keys in a scan segment
argus-period-ticks 2 Interval between scan segments
argus-snapshot-period-ticks 200 Online-player and ban-list snapshot refresh interval

Segment Size

argus-keys-per-segment: 200

A larger segment processes more keys in an individual scan segment.

A smaller segment distributes the work into smaller portions.

Practical guidance:

  • Keep 200 as the initial value.
  • Consider reducing it if scan activity contributes to measured tick pressure.
  • Increase it only when there is a demonstrated need and the server has sufficient processing headroom.

Scan Interval

argus-period-ticks: 2

The default is 2 ticks, approximately 0.1 seconds.

Increasing the interval spreads scan work across a longer period.

Reducing the interval makes scan segments run more frequently and can increase processing pressure.

The implementation validates this setting and falls back to its default if the value is outside the supported range.

Snapshot Interval

argus-snapshot-period-ticks: 200

The default is 200 ticks, approximately 10 seconds.

This controls the refresh interval for online-player and ban-list snapshots.

It is not the same as the lock scan interval.

Lock Expiration

days-to-expire: 30

This setting controls when a lock becomes eligible to be marked VULNERABLE by Argus.

It should not be treated as a direct performance control or an unconditional deletion timer.

Changing it changes lock-management behavior, not simply server speed.


Executioner

Executioner handles lock-removal and purge workflows.

Its most important performance controls are the adaptive batch limits.

Relevant Settings

Option Default TPS condition
executioner-batch-high 64 TPS >= 19.5
executioner-batch-med 32 TPS 18.5–19.5
executioner-batch-low 16 TPS 16.0–18.5
executioner-batch-critical 2 TPS < 16.0

How Adaptive Batches Work

Executioner checks the current TPS and selects a batch size from the configured values.

The default configuration uses progressively smaller batches as TPS decreases.

This helps avoid processing the same amount of cleanup work under both healthy and heavily loaded server conditions.

Executioner also considers available JVM heap when calculating its effective batch size. Under its critical free-heap condition, the calculated batch is reduced to 1.

Recommended Approach

For most servers:

  • Keep the default adaptive values.
  • Do not increase all four batch limits together.
  • If cleanup activity causes noticeable tick pressure, consider reducing the relevant batch values.
  • Do not make the critical batch large simply to finish cleanup faster.

Important

Executioner is a cleanup component.

Its batch settings do not control normal block interaction, automatic locking, or ordinary hopper transfers.


Maximus

Maximus maintains runtime caches and temporary state.

Its performance configuration is primarily about controlling memory retention and cleanup behavior.

Relevant Settings

Option Default Recommended starting approach
maximus-scheduled-ttl-seconds 30 Keep default
maximus-pending-pdc-ttl-seconds 3600 Keep default
maximus-name-cache-limit 2000 Keep default
maximus-hopper-cache-limit 250000 Adjust only with cache evidence
maximus-minecart-cache-limit 50000 Adjust only with cache evidence
maximus-locks-cache-limit 10000 Adjust only with cache evidence
maximus-purge-batch-limit 300 Keep default initially

What to Avoid

Do not increase every cache limit because the server has more RAM available.

Cache capacity should be based on actual workload and observed memory behavior.

A server that does not generate substantial hopper traffic does not automatically benefit from a larger hopper cache.

Likewise, increasing the minecart cache limit is not useful if the server rarely uses hopper minecarts.

Cleanup Batch Size

maximus-purge-batch-limit controls the configured number of keys handled per synchronous cleanup cycle.

Increasing it can make a cleanup operation process more entries at once, but can also increase the amount of work performed during that cycle.

For a server experiencing tick pressure, a smaller cleanup batch may be more appropriate.


Dreadnought

Dreadnought handles legacy data migration.

Migration is a special workload and should not be confused with normal SASL operation.

Its performance depends on the amount of imported data, validation work, available CPU capacity, storage performance, and current server TPS.

Relevant Settings

Option Default Purpose
dreadnought-boot-delay-ticks 100 Delay before migration initialization
dreadnought-batch-limit 10000 Maximum configured ingestion batch size
dreadnought-task-timeout-seconds 600 Migration batch timeout
dreadnought-batch-high 60 Processing limit at high TPS
dreadnought-batch-med 25 Processing limit at moderate TPS
dreadnought-batch-low 10 Processing limit under heavier load
dreadnought-batch-critical 2 Processing limit under critical load

Adaptive Migration Batches

Option Default TPS condition
dreadnought-batch-high 60 TPS >= 19.5
dreadnought-batch-med 25 TPS 18.5–19.5
dreadnought-batch-low 10 TPS 17.0–18.5
dreadnought-batch-critical 2 TPS < 17.0

Dreadnought uses the current TPS to select its processing batch.

This allows migration processing to slow down when server conditions deteriorate.

Ingestion Batch Limit

dreadnought-batch-limit: 10000

The configuration comments document a recommended range of 5000–15000.

This is a migration ingestion limit, not a permanent runtime cache limit.

Increasing it can allow more data to enter the migration pipeline in one ingestion operation. It should not be treated as a guaranteed reduction in total migration time.

Task Timeout

dreadnought-task-timeout-seconds: 600

The default timeout is 600 seconds.

The configuration comments document a recommended range of 180–1200 seconds.

A timeout increase does not make migration processing faster. It changes how long the task may wait before timing out.

Recommended Migration Practice

  1. Back up the server and relevant migration data.
  2. Run migration during a low-activity period.
  3. Keep the default adaptive batch values initially.
  4. Monitor TPS and migration status.
  5. Avoid running unrelated heavy maintenance tasks at the same time.
  6. Verify the migration results before considering the operation complete.

Migration is a one-time or occasional administrative workload, not a routine performance optimization.


7. Storage and I/O Tuning

SASL v2.8.2 currently uses the LockRepository abstraction with YamlLockRepository as its configured storage implementation.

The repository is responsible for lock records and persistence operations.

Relevant Settings

Option Default Purpose
io-threads -1 Automatic I/O thread-count detection
save-delay 500 ms Bulk-save delay

Save Delay

save-delay: 500

This setting controls the configured bulk-save delay.

A shorter delay can cause save operations to be scheduled more frequently.

A longer delay can group changes over a longer period before saving.

Neither value is universally better.

Practical approach:

  • Keep 500 ms as the initial value.
  • Do not reduce it just because a server has a fast SSD.
  • Do not increase it to hide persistent storage problems.
  • Evaluate disk activity and save behavior before changing it.

YAML Storage Considerations

The current repository implementation uses YAML-backed lock records.

As the amount of stored data grows, persistence operations can become more significant.

The repository uses asynchronous I/O infrastructure and save coordination, but this does not make storage operations free.

For servers with large lock collections:

  • Monitor disk activity during bulk changes.
  • Avoid unnecessary repeated configuration reloads.
  • Keep regular backups.
  • Avoid editing persistent data files while the server is running.

Storage Architecture

For more information about repository responsibilities and persistence, see:

Storage Architecture


8. Recommended Configuration Approaches

There is no single configuration profile that is optimal for every Minecraft server.

The following approaches are starting points based on observed server conditions.

They are not official hardware certification profiles or guaranteed resource limits.

A. Small or Resource-Constrained Server

Typical characteristics:

  • Limited CPU capacity
  • Limited Java heap headroom
  • Small player population
  • Relatively low lock density
  • Occasional automation activity

Recommended approach:

Setting Starting approach
io-threads Keep -1
save-delay Keep 500
Phoenix limits Keep defaults; reduce tile limit only if recovery pressure is measured
Argus segment size Consider a smaller value if scanning contributes to tick pressure
Executioner batches Keep defaults initially
Maximus cache limits Avoid unnecessary increases
Dreadnought Run migration during low activity

The main priority is preserving server stability rather than maximizing processing throughput.

B. General-Purpose SMP

Typical characteristics:

  • Regular player activity
  • Several protected storage areas
  • Moderate automation usage
  • Multiple active chunks
  • Normal lock creation and removal

Recommended approach:

Keep the default SASL configuration initially.

The default values provide a sensible baseline for evaluating real server behavior.

Only change individual settings when monitoring identifies a specific bottleneck.

C. Large or Highly Active Server

Typical characteristics:

  • Many active players
  • High lock density
  • Frequent chunk loading
  • Extensive hopper networks
  • Frequent lock-management activity

Recommended approach:

Area What to evaluate
CPU Main-thread MSPT and concurrent processing load
RAM Heap headroom and cache growth
Phoenix Chunk recovery frequency and PDC parsing workload
Argus Scan segment duration and scan frequency
Executioner Cleanup batch duration and TPS response
Maximus Cache growth and cleanup behavior
Storage YAML save activity and disk response time
Dreadnought Migration workload during scheduled maintenance

Large servers should be tuned using actual measurements.

Do not assume that a high-player-count server should automatically use larger batches or cache limits.

D. Automation-Heavy Server

Typical characteristics:

  • Many hoppers
  • Frequent item transfers
  • Hopper minecart usage
  • Large automated storage systems

Recommended approach:

  • Keep prevent-hopper-transfer enabled if ownership-aware transfer protection is required.
  • Monitor the server while automation systems are active.
  • Observe hopper and minecart cache growth.
  • Avoid increasing cache limits without evidence that the current limits are insufficient.
  • Test transfer behavior after changing protection settings.

Automation-heavy servers should evaluate the Automation Chain separately from general lock-management performance.

See Automation Chain for its ownership-resolution and transfer-check workflow.


9. Safe Performance Testing

A reliable tuning process changes one variable at a time.

Changing several settings simultaneously makes it difficult to determine which adjustment helped or caused a regression.

Recommended Testing Procedure

Step 1 — Create a Backup

Back up:

  • config.yml
  • locks.yml
  • Relevant persistent-data files
  • Migration data when migration is involved

Step 2 — Establish a Baseline

Before changing anything, record:

  • Average TPS
  • MSPT
  • Java heap usage
  • CPU utilization
  • Disk activity
  • Online player count
  • Approximate number of protected locks
  • Whether automation systems are active

Step 3 — Identify the Problem

Determine whether the issue is related to:

  • CPU processing
  • Available heap
  • Chunk recovery
  • Lock scanning
  • Cleanup operations
  • Storage activity
  • Migration processing

Step 4 — Change One Setting

Choose the configuration value most directly related to the observed problem.

Do not change unrelated values at the same time.

Step 5 — Repeat the Same Workload

Compare the server under similar conditions.

For example, do not compare an idle server before the change with a fully populated server after the change.

Step 6 — Record the Result

Measurement Before After
TPS Record value Record value
MSPT Record value Record value
Heap usage Record value Record value
CPU usage Record value Record value
Disk activity Record value Record value
Observed behavior Record notes Record notes

Step 7 — Keep or Revert

If the change improves the measured behavior without introducing other problems, keep it.

If the result is worse or inconclusive, restore the previous value.

Testing During Peak Activity

Do not perform every tuning experiment during peak player activity.

Use a controlled maintenance window whenever possible, especially when testing:

  • Large cleanup operations
  • Migration workloads
  • Significant cache-limit changes
  • Chunk-recovery behavior

10. Common Tuning Mistakes

Increasing Every Batch Limit

A larger batch can process more work per cycle, but it can also increase the duration of that cycle.

Better approach: Adjust the batch belonging to the component that is actually causing the measured workload.

Increasing Every Cache Limit

Larger cache limits allow more data to remain in memory.

Better approach: Adjust only the cache associated with a demonstrated capacity problem.

Reducing Every Interval

Shorter intervals can make maintenance happen more frequently.

They can also increase the frequency of processing work.

Better approach: Change scan and debounce intervals only when their behavior is understood.

Treating More RAM as a Complete Solution

More heap can provide additional memory headroom, but it does not solve an overloaded main thread or slow storage.

Better approach: Identify whether the problem is memory, CPU, or I/O related.

Tuning Based Only on Player Count

Player count does not describe automation activity, lock density, or chunk-loading patterns.

Better approach: Evaluate the actual workload generated by the server.

Running Migration During Peak Activity

Migration introduces a separate workload involving ingestion, validation, processing, and persistence.

Better approach: Schedule migration during a low-activity maintenance window.

Changing Multiple Settings at Once

When several values change together, the result becomes difficult to interpret.

Better approach: Make controlled, measurable adjustments.


11. Final Recommendations

For most installations, the best starting point is the default SASL v2.8.2 configuration.

The plugin already contains several mechanisms intended to distribute or limit work:

  • Phoenix uses chunk-processing limits and dynamic tile-limit calculation.
  • Argus processes lock data in scan segments.
  • Executioner selects cleanup batches according to TPS and available heap conditions.
  • Maximus maintains runtime caches and performs temporary-state cleanup.
  • Dreadnought uses TPS-based adaptive migration batches.
  • YamlLockRepository provides asynchronous persistence infrastructure.

These mechanisms help manage workload, but they do not eliminate the need for adequate server resources or correct configuration.

Recommended Starting Values

Configuration area Default
I/O threads -1
Save delay 500 ms
Phoenix debounce 10000 ms
Phoenix tile limit 5000
Phoenix PDC parse limit 2000
Argus keys per segment 200
Argus scan interval 2 ticks
Executioner high batch 64
Executioner medium batch 32
Executioner low batch 16
Executioner critical batch 2
Maximus purge batch 300
Dreadnought ingestion limit 10000
Dreadnought task timeout 600 seconds

The central principle:

Tune SASL according to measured workload, not assumptions. A stable configuration is more valuable than an aggressive configuration that cannot maintain consistent server performance.


Related Documentation


SecureAutoSmartLocks — Performance Tuning Guide

Protocol-S Development · RunningArmy6 · SASL v2.8.2 [Event Horizon]

Clone this wiki locally