Update variation before the mean
02After the first sample, TCP blends new timing with old estimates. Variation must use the old smoothed RTT before that mean is updated; reversing the order changes the timeout.
With SRTT 725 ms, RTTVAR 450 ms and G 10 ms, set RTO=725+max(10,1800)=2525 ms. The shorter sample increased disagreement, so the timeout can grow.
Source for this drawing: RFC 6298 · Read RFC section 2 ↗
New to this? Start hereA quick picture + helpful background
A message needs an address.
Think of a packet as a small addressed envelope. Devices pass it onward; transport protocols decide what delivery promises an application gets.
Helpful first, if these ideas are unfamiliar
These pictures are analogies to help you learn. The linked RFC explains the actual rules.
Terms in this drawing
Related RFCs and changes
“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.
Use old SRTT for the variation calculation, then update SRTT, then recompute RTO.
- For a later sample R′, the sender MUST update RTTVAR=(1−β)×oldRTTVAR+β×|oldSRTT−R′| before SRTT=(1−α)×oldSRTT+α×R′ (§2.3). The order is mandatory, not two freely interchangeable assignments.
- The recommended constants are α=1/8 and β=1/4: these values SHOULD be used (§2.3). The worked model follows them. The guide does not claim every legal implementation must use these exact coefficients.
- The example starts with SRTT 800 ms and RTTVAR 400 ms, then receives a valid sample R′=200 ms. The old-mean error is|800−200|=600 ms. Variation becomes 300+150=450 ms; the mean becomes 700+25=725 ms.
- After these assignments a host MUST compute RTO=SRTT+max(G,4×RTTVAR). With G=10 ms, the result is 725+1800=2525 ms, above the recommended 1000 ms floor.
- A lower new RTT does not guarantee a lower timeout: the large disagreement with the old estimate increases variation. If SRTT were incorrectly updated first, the error would be 525 ms, variation 431.25 ms and RTO 2450 ms; those are not this rule’s results.
- RTTVAR is an exponentially weighted variation estimate, not a claim of a Gaussian standard deviation. Multiple samples per RTT can change how much history the fixed coefficients retain (§3); no adaptive coefficient scheme is invented here.
One valid 200 ms sample updates the saved 800/400 ms estimates. The numbered stages are assignment order, not packets on the wire.
Read the RFC section ↗