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

Game Lag White Paper › L8 Sockets and protocols

TCP head-of-line blocking Head-of-line blocking

Cause ID sk-hol · Primary owner Game team (Server development) · Also Game team (Client development)

Open the interactive card with figures and simulations →

To keep data in order, TCP holds back every packet that arrived after a lost one until the lost packet is received again.

Why One packet goes missing → Effect The packets behind it have arrived but wait in the receive buffer → On screen Everything stops, then releases all at once: fast-forward

Symptoms
Freeze, Fast-forward
Factors
Packet loss, Stall
Who’s affected
Just me
When
Randomly
Owner
Primary owner Game team (Server development) · Also Game team (Client development)
Game team action items
Server: send real-time positions over UDP, use reliable delivery only for what truly needs it, split traffic into multiple streams. Client: change network handling to match the server (UDP, separate channels).
Ballpark numbers
Losing one packet stalls things for at least one round-trip time plus a little more; if the retransmission is lost too, the stall lasts hundreds of ms to several seconds.
On the graph
Gap then burst · Bytes received per connection, retransmissions
Where to look
Retransmitted packets and the gaps around them on that player’s connection in a server-side packet capture (tcpdump, Wireshark); for the whole server, the increase in TcpRetransSegs from nstat -az
Confirmed if
Each stall starts with the retransmission of a single packet, and right after the retransmitted packet arrives, the backlog is processed all at once (bytes received sit at 0, then surge)
Ruled out if
Games that talk over UDP: not applicable. Stalls with no retransmissions: look at the server tick (“Tick overrun”)
Check with
Infra tools (no game code needed)

Sources

  1. RFC 9293: Transmission Control Protocol (TCP) IETF
    TCP is a reliable, in-order byte stream service
  2. RFC 5681: TCP Congestion Control IETF
    Loss detected by 3 duplicate ACKs triggers a fast retransmit; otherwise TCP waits for the retransmission timer
  3. RFC 6298: Computing TCP's Retransmission Timer IETF
    Backoff that doubles the timeout each time the retransmission timer expires
  4. net/ipv4/proc.c (Linux v6.12) Linux kernel
    Counter name shown by nstat: RetransSegs (segments retransmitted) in the Tcp group

See also

Same layer: L8 Sockets and protocols

Same symptom (Freeze), other layers

View the interactive card with figures and simulations