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

Game Lag White Paper › L9 Server game process

Message queue backlog Mailbox / job queue backlog

Cause ID sp-queue · Primary owner Game team (Server development)

Open the interactive card with figures and simulations →

When requests arrive faster than they’re processed and pile up in the queue, the ones at the back get processed only seconds later or are dropped.

Why Requests arrive faster than they can be processed → Effect The queue grows, and messages are dropped once it passes its limit → On screen Skills and trades respond late or are dropped

Symptoms
Input lag, Dropped action / rollback
Factors
Latency, Packet loss
Who’s affected
Specific zone/channel, One feature only
When
When crowds gather
Owner
Primary owner Game team (Server development)
Game team action items
Monitor queue length, adopt a policy that drops the oldest requests first, parallelize processing.
On the graph
Hits a ceiling · Queue length and age of the oldest message, messages processed per second
Where to look
Per-queue length, age of the oldest message, and messages received, processed, and dropped per second, as logged by the server. Without code metrics, the Recv-Q of the game socket from ss (or netstat): data the kernel has received but the process hasn’t read yet
Confirmed if
While arrivals exceed processing, the processing rate stays flat at one value, and queue length, message age, and drops keep growing
Ruled out if
Queue short and messages young, yet responses are slow: points to connection latency or delay in the tick itself
Check with
Game server or client logs and metrics
Real incidents
CCP Games 2014: Server overload in EVE Online’s massive HED-GP fleet battle

Sources

  1. Avoiding insurmountable queue backlogs AWS
    Amazon Builders’ Library. Monitor backlog by the age of waiting messages; real-time systems process the newest data first (closer to LIFO) and may drop old messages
  2. Site Reliability Engineering, Chapter 22: Addressing Cascading Failures Google
    When requests arrive faster than they’re processed, the queue fills and latency grows; LIFO or CoDel in place of FIFO sheds old requests that are already useless
  3. ss(8) — Linux manual page iproute2
    A tool that shows socket statistics (similar information to netstat); -p shows the process using each socket
  4. netstat(8) — Linux manual page net-tools
    Recv-Q: bytes on a connected socket not yet picked up by the user program

See also

Same layer: L9 Server game process

Same symptom (Input lag), other layers

View the interactive card with figures and simulations