TCP: Karn’s algorithm
RTT estimation and RTO calculation:
- sampleRTT: updated for each packet
- smoothed RTT:
sRTT = (1 – g) * sRTT + g * sampleRTT
- smoothed RTT standard deviation:
D = (1 – h) * D – h * | sampleRTT – sRTT |
- recommended values for g and h:
g = 0.125 (average over last 8 packets)
h = 0.25 (average over last 4 packets)
- RTO = sRTT + 4 D
The larger RTT and RTT deviation, the larger RTO