한국어English日本語简体中文繁體中文DeutschไทยTiếng ViệtРусскийPortuguês (Brasil)EspañolBahasa Indonesia

Game Lag White Paper › L9 Server game process

Broadcast fan-out overload Broadcast fan-out (N×N)

Cause ID sp-broadcast · Primary owner Game team (Server development) · Also Infra team (Server infrastructure)

Open the interactive card with figures and simulations →

Sending one player’s movement to everyone who can see them creates updates on the order of the square of the crowd size.

Why Each player’s changes are sent to everyone who can see them → Effect 1,000 players who all see each other means 1 million updates per tick → On screen The send queue and bandwidth saturate, causing delay and loss (input lag, fast-forward, teleporting)

Symptoms
Input lag, Teleporting, Fast-forward
Factors
Latency, Packet loss
Who’s affected
Specific zone/channel, Whole server
When
When crowds gather
Owner
Primary owner Game team (Server development) · Also Infra team (Server infrastructure)
Game team action items
Lower the update rate by distance and importance (nearby enemies every tick, distant players a few times a second), cap how much is sent to each player and fill it with the most important updates first, pack several updates into one packet, cap the number of players displayed.
Infra team action items
Alert on each server’s outbound bandwidth and packets per second against the NIC and instance network limits, check headroom before large events.
Ballpark numbers
1,000 players × 1,000 players × 20 ticks = 20 million updates per second. At 40 bytes each, that’s about 6.4 Gbps for the whole server and about 6.4 Mbps per receiving player. Capping the visible player count at 150 brings it down to about 1 Gbps total and about 1 Mbps per player.
On the graph
Rises with load · Server outbound packets and bytes, players gathered in one place
Where to look
txpck/s and txkB/s (packets and KB sent per second by the server NIC) from sar -n DEV 1 alongside the player count graph. On cloud instances, the allowance-exceeded counters in ethtool -S (bw_out_allowance_exceeded and pps_allowance_exceeded on AWS ENA)
Confirmed if
As the crowd grows, outbound packets and bytes rise faster than the player count (close to its square), and from the moment they hit the limit, the allowance-exceeded counters or transmit drops increase
Ruled out if
Outbound volume unchanged while only tick time grows: points to AOI calculation or game logic
Check with
Infra tools (no game code needed)
Real incidents
CCP Games 2014: Server overload in EVE Online’s massive HED-GP fleet battle

Sources

  1. HED-GP Technical Retrospective: What a HED-ache CCP Games
    O(n²) traffic, where the actions of n players must be seen by n players, is the unavoidable limiting factor in large fleet battles
  2. Actor Priority in Unreal Engine Epic Games
    When a connection’s bandwidth is saturated, each actor gets a priority (distance, line of sight, time since last sent) and bandwidth goes to the most important first
  3. Detailed Actor Replication Flow in Unreal Engine Epic Games
    NetUpdateFrequency sets the update rate per actor; actors are sent in priority order, and once the connection is saturated, the rest wait for the next tick
  4. sar(1) — Linux manual page sysstat
    rxpck/s and txpck/s (packets received and sent per second), rxkB/s and txkB/s (KB received and sent per second) in sar -n DEV
  5. Monitor network performance for ENA settings on your EC2 instance AWS
    bw_out_allowance_exceeded (outbound bandwidth allowance exceeded) and pps_allowance_exceeded (PPS allowance exceeded): number of packets queued or dropped

See also

Same layer: L9 Server game process

Same symptom (Input lag), other layers

View the interactive card with figures and simulations