Replication and bandwidth tuning
All server settings and their defaults are listed in the configuration reference.
Establish a baseline
Section titled “Establish a baseline”Start with a fixed sync interval so repeated runs have the same target frequency. This fragment uses the timing, worker and send settings from the 300-player load test:
tick_interval = 10sync_interval = 25stream_distance = 200
[workers]replication = 3
[transport]send_rate = 1048576Merge these values into the existing config.toml. Place the top-level values
before any section header and edit existing [workers] and [transport] sections.
Restart the server to apply file changes.
Three workers provide a measured comparison point. Choose the final count using
your host and mod’s workload. The default is replication = 0.
Choose the sync interval
Section titled “Choose the sync interval”sync_interval sets the interval for regular client synchronization, in
milliseconds. It accepts an integer from 25 to 45, or "auto". The server
communicates the selected interval to clients when they connect and when automatic
adjustment changes it.
| Interval | Target sync cadence |
|---|---|
| 25 ms | 40 Hz |
| 30 ms | About 33.3 Hz |
| 35 ms | About 28.6 Hz |
| 40 ms | 25 Hz |
| 45 ms | About 22.2 Hz |
Actual delivery also depends on entity activity, client frame rate and queue pressure. Measure it while players move and interact.
Changing from 25 to 40 ms reduces the target sync frequency by 37.5%. Metadata, script events and voice have their own traffic patterns, so the total bandwidth saving depends on the workload. Check movement, steering and combat from another client when evaluating a longer interval.
Use a fixed value while comparing configurations. With "auto", the interval
starts at 25 ms and adjusts within 25–45 ms under sustained load and recovery.
Record how long the server spends at each interval when evaluating that mode.
Choose the server tick interval
Section titled “Choose the server tick interval”tick_interval is the wait in milliseconds after a server-loop iteration. Its
default is 10. The time between iterations includes both processing time and
that wait.
A smaller value lets the next iteration start sooner when CPU time is available. It also increases how often loop work runs. Start at 10 ms and change it only when measurements show that the wait contributes to the delay you are investigating.
sync_interval separately controls the regular client sync cadence. Check both
loop timing and delivered updates when comparing changes to either setting.
Choose replication workers
Section titled “Choose replication workers”replication under [workers] controls outgoing replication work:
| Value | Behavior |
|---|---|
0 |
Runs replication on the main thread. This is the default. |
1 to 8 |
Uses the specified number of worker threads. |
"auto" |
At startup, uses half the logical processors allowed by process affinity, rounded down, up to eight workers. Uses zero when fewer than three processors are available or affinity cannot be read. |
The startup log shows the resolved worker count. Automatic selection counts logical processors. CPU-time quotas, differences between core types and other services on the host still need to be considered when choosing an explicit count.
For a workload comparable to the recorded test, start with three workers. If the host has spare CPU capacity, compare two and four workers under the same load. Keep the count that improves delivery and queue behavior while leaving room for gameplay and scripts. More workers also add scheduling overhead.
Gameplay, JavaScript and incoming packet processing remain on the main thread. Use per-thread observations to decide whether outgoing replication is the part that needs more CPU time.
Set a streaming distance
Section titled “Set a streaming distance”stream_distance sets the server’s streaming radius in metres. Its default is
200 and the value must be positive.
A larger radius can put more entities in each player’s stream. Those entities add replication work, traffic and client-side work. Choose the distance needed for your gameplay and test crowded areas as well as travel across the streaming boundary. A smaller radius can make entities appear later or disappear sooner.
The groups of 128 players in the load test describe its layout. The configured radius determines which entities are nearby. See Streaming and readiness for loading behavior.
The configured distance is also the default for server-created audio. Individual
audio sources can use their own streamDistance.
Set send limits and a bandwidth budget
Section titled “Set send limits and a bandwidth budget”Per-connection send rate
Section titled “Per-connection send rate”send_rate under [transport] is the server’s send limit for each game connection,
in bytes per second. The default is 1048576, or 1 MiB/s. The allowed range is
65536–16777216 bytes per second.
Sync, metadata and server-to-client script traffic share that connection. If its
send demand exceeds the configured rate, data waits in queues. Check
queue_us, pending data and outgoing rates
when players experience delayed updates.
Raise the limit only when the current rate is restricting delivery and the host and affected connections have bandwidth available. Lowering it to reduce total host traffic can instead increase queue delays. Reduce the generated workload or adjust sync and streaming settings when traffic itself is the problem.
Aggregate bandwidth budget
Section titled “Aggregate bandwidth budget”bandwidth_budget under [transport] gives automatic sync adjustment and the
admission guard an outgoing game-traffic target in bytes per second. Its default
is 0, which disables bandwidth-based feedback.
Choose it from the sustained bandwidth available to game connections, leaving
room for voice, downloads and other traffic. For example, 100000000 represents
100 MB/s, or 800 Mbit/s. Use the actual available uplink when choosing your value.
sync_interval = "auto" can reduce sync frequency under sustained pressure.
overload_guard = true can pause new admissions if pressure persists. These
controls and their log messages are covered in
Monitoring and logs.
Compare changes
Section titled “Compare changes”Change one setting at a time while keeping player count, streamed entities, activity, metadata and script-event traffic comparable. Record:
- Delivered update frequency and update age.
- Server-loop timing and busy-thread activity.
- Queue growth and per-connection outgoing rates.
- Total host bandwidth, including voice and other services.
- Disconnects, script failures and what players observe in GTA.
Repeat promising results before applying them to production. Use the monitoring guide for the available reports and keep settings that improve the workload you actually need to support.