Concepts / TCP performance

TCP performance

Packet loss

Also called loss rate, fast retransmit, duplicate acknowledgement, Mathis formula

Packets that never arrive: TCP resends them and halves its window, so a small loss rate caps its speed.

Three duplicate acks name the missing packet
Three duplicate acks name the missing packet

When packet 2 is lost, each later packet makes the receiver repeat ack 2. The third duplicate makes the sender resend 2 at once, without waiting for a timeout, and halve its window. Steady loss caps the rate: about 1.22 x packet size / (round trip x square root of the loss rate), 2.6 Mbit/s at 2% loss and 40 ms, even on a 20 Mbit/s link.

TCP sees a gap when the receiver keeps acknowledging the same byte: at the third duplicate acknowledgement it resends the missing segment (fast retransmit), or else its retransmission timer fires. Either way it reads the loss as congestion and halves its window. Under a steady loss rate p the window saws around √(8 / 3p) packets, so TCP moves about 1.22 × packet size ÷ (round trip × √p), whatever the link could do: the longer the round trip, the more a little loss costs. UDP resends nothing; what is lost is gone.

See it on real machines

Read next

Learn it on real machines.

Every lab is a small network of real Linux machines in your browser. Sign in with Google or email to start.

Start this lab