INSTITUT FÜR KOMMUNIKATIONSNETZE UND RECHNERSYSTEME Prof. Dr.-Ing. Dr. h. c. mult. P. J. Kühn The Impact of Delay Variations on TCP Performance Michael Scharf scharf@ikr.uni-stuttgart.de ITG FG 5.2.1 Workshop, Hamburg 20. Feb. 2004
Outline Characteristics of mobile networks Impact of delay variations on TCP Modeling the RTT estimation in TCP Model validation Optimization approaches Conclusions and future work
Characteristics of mobile networks Network architecture (simplified) TCP End to end connection TCP IP RLC MAC PHY Mobile terminal ARQ FEC Radio link PHY IP RLC MAC Layer 2 Base station IP Layer 2... Layer 1 Layer 1 Fixed terminal TCP... Transmission Control Protoco IP... Internet Protocol RLC... Radio Link Control MAC... Medium Access Control PHY... Physical Layer ARQ... Automatic Repeat Request FEC... Forward Error Correction Few packet losses due to highly persistent link layer Rather low bandwidth, but high latency Variable delays and significant jitter Retransmission of radio blocks (ARQ mechanism) Cell handovers and link outages Radio resource preemption by voice traffic Impact of delay variations on TCP performance?
Impact of delay variations on TCP (1) Transmission Control Protocol (TCP) Window-based, reliable transport protocol Receiver advertised window Congestion window Error recovery Fast retransmit/fast recovery mechanism Retransmission timeouts Different variants: TCP Reno, NewReno, SACK,... Congestion window Packet loss Multiple packet loss Slow start Congestion Slow start threshold avoidance exceeded Timeout Congestion Timeout ACK Slow start threshold avoidance Slow start Fast retransmit/ Fast recovery Time Fast retransmit/ Fast recovery 3 dupl. ACK
Impact of delay variations on TCP (2) Potential effects Spurious TCP timeouts = timeouts even though no packets are lost Go-back-N mechanism unnecessarily retransmits segments Needless reduction of congestion window TCP may waste bandwidth or underutilize the available resources
Impact of delay variations on TCP (2) Potential effects Spurious TCP timeouts = timeouts even though no packets are lost Go-back-N mechanism unnecessarily retransmits segments Needless reduction of congestion window TCP may waste bandwidth or underutilize the available resources Mis-estimation of available network capacity by TCP Buffer overflows if over-estimated Poor throughput if under-estimated High service rate µ ACK ACK ACK ACK Data Data Lower service rate µ 1 µ ACK ACK Data Data Data Data µ 2 <µ 1 TCP sender TCP recv.
Impact of delay variations on TCP (2) Potential effects Spurious TCP timeouts = timeouts even though no packets are lost Go-back-N mechanism unnecessarily retransmits segments Needless reduction of congestion window TCP may waste bandwidth or underutilize the available resources Mis-estimation of available network capacity by TCP Buffer overflows if over-estimated Poor throughput if under-estimated High service rate µ ACK ACK ACK ACK Data Data Lower service rate µ 1 Packet reordering May trigger spurious fast retransmits Usually prevented by reliable link layer µ ACK ACK Data Data Data Data µ 2 <µ 1 TCP sender TCP recv.
Impact of delay variations on TCP (3) Spurious timeouts - An example TCP Reno 4.5e+05 4e+05 Sequence no. 3.5e+05 Segments ACKs Needless retransmissions Fast retransmit (spurious) Timeout after 4 sec 5 sec off period Segments ACKs Fast retransmit Timeout 3e+05 55 60 65 70 75 Time [s]
Modeling the RTT estimation in TCP (1) RTT sampling by TCP Default method: t1 RTT= now t 1 t 2 RTT= now t 2 t3 sender recv. One measurement per RTT Low sampling rate No measurement on retransmitted segments (Karn s algorithm)
Modeling the RTT estimation in TCP (1) RTT sampling by TCP Default method: Timestamps (RFC 1323): t1 RTT= now t 1 t 2 RTT= now t 2 t3 RTT= now t 1 RTT= now t 2 RTT= now t 3 RTT= now t 4 RTT= now t 5 sender sender t 1 recv. recv. response: t1 t1 t2 t3 t4 t5 t6 One measurement per RTT Low sampling rate No measurement on retransmitted segments (Karn s algorithm) Additional 12 byte TCP header option Samples with every new ACK Measurements on retransmitted segments
Modeling the RTT estimation in TCP (2) RTO calculation Tradeoff necessary Frequent spurious timeouts if value too small (aggressive timer) Long idle times if value too large (conservative timer) Algorithm according to RFC 2988: RTTVAR: v( n) SRTT: s( n) RTO: R( n) = = = 3 1 -- v( n 1) + -- sn ( 1) x( n) 4 4 7 1 -- sn ( 1) + -- x( n) 8 8 max( sn ( ) + 4 v( n), m) Recommendation for minimum: m=1 sec Coarse timer granularity in many protocol stacks
Modeling the RTT estimation in TCP (3) Assumptions Single bottleneck: Radio link Main parameters Service rate µ Latency τ Buffer size B > µ τ TCP bulk data transfer Single TCP connection over radio link Greedy source Not limited by receiver advertised window Typical saw-tooth behavior with cycles RTT x TCP sender actual value buffer size B approximation service rate µ latency τ x max 0 Congestion Avoidance one cycle 0.5 x Fast Recovery max Time t
Modeling the RTT estimation in TCP (4) Modeling approach RTT x(n) x max RTO R(n) R max x min x(n) Non linear RTO calculation R(n) R min min x(n) 0 one cycle N 1 n 0 one cycle N 1 n RTO calculation is a non-linear filter Approximation: Linear input function x( n) Number of samples per cycle: N = f ( µ, τ, B, sampling method) RTO duration R( n) can be determined analytically
Modeling the RTT estimation in TCP (5) RTT sampling rate Path capacity: C = B + 1 + µ τ Delayed Acknowledgements mechanism: b segments per ACK Samples per cycle for default measurements N = b 1 2 -- ( C + 1 ) + 2 Samples per cycle for timestamps N = 3 -- ( C + 1) 2 + C 8 --- + b 1
Modeling the RTT estimation in TCP (6) Numerical results RTO duration R(n) normalized by x max 1.9 1.8 1.7 1.6 1.5 1.4 1.3 1.2 1.1 1 0.9 0.8 0.7 0.6 0.5 20 30 40 50 60 80 N 100 5 10 0.4 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 relative offset in cycle: n / (N - 1) x(n)
Modeling the RTT estimation in TCP (6) Numerical results 1.9 2 RTO duration R(n) normalized by x max 1.8 1.7 1.6 1.5 1.4 1.3 5 10 1.2 20 1.1 30 1 40 50 0.9 60 80 x(n) 0.8 N 100 0.7 0.6 0.5 0.4 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 RTO duration normalized by x max 1.5 1 0.5 0 10 100 R max R R min min relative offset in cycle: n / (N - 1) Number of samples per cycle N RTO characteristics highly depends on sampling rate Algorithm more aggressive if timestamps are used (N» 10) RFC 2988 and timestamps do not harmonize well
Model validation (1) Simulation setup TCP sender 10 ms 100 ms 100 ms ACKs 13.4-64 kbps Data 10 ms 100 ms Base station 3-24 kb Various network configurations (GPRS, UMTS) Parametrization of RTT estimator With and w/o timestamps Granularity 10 ms or 200 ms 13.4-384kbps 100 ms Mobile terminal 10 ms 10 ms TCP recv.
Model validation (2) Selected examples 5000 Without timestamps 5000 With timestamps 4000 R (model) R max (model) 4000 R (model) R max (model) [ms] 3000 R sim (t) R min (model) [ms] 3000 R sim (t) 2000 x sim (t) 2000 x sim (t) 1000 one cycle N = 8 r DL =53.6 kbps, r UL =13.4 kbps, B=8, τ ext =20 ms, G=10 ms 1000 one cycle N = 66 R min (model) r DL =53.6 kbps, r UL =13.4 kbps, B=8, τ ext =20 ms, G=10 ms 0 60 70 80 90 100 110 120 Time t [s] 0 60 70 80 90 100 110 120 Time t [s] Model matches quite well to simulation results
Model validation (3) Different GPRS and UMTS scenarios 2.5 Fine timer granularity RTO duration normalized by x max 2 1.5 1 0.5 model simulation R R max R min 0 10 100 Number of samples per cycle N min
Model validation (3) Different GPRS and UMTS scenarios Fine timer granularity Coarse timer granularity 2.5 2.5 RTO duration normalized by x max 2 1.5 1 0.5 model simulation R R max R min RTO duration normalized by x max 2 1.5 1 0.5 R max R R min 0 10 100 min 0 10 100 min Number of samples per cycle N Number of samples per cycle N Discrepancies for coarse timer granularity
Model validation (4) Performance degradation by spurious timeouts Number of RTOs Timeout probability 300 min R min R max 250 200 150 100 T on =30 s (mean on period duration) T on =60 s 50 T on =120 s 0 0 1 2 3 4 5 6 Off period duration T off [s] Spurious timeouts are triggered by off periods of duration T off > R max Data rate T off T on Time
Model validation (4) Performance degradation by spurious timeouts Number of RTOs 300 250 200 150 100 50 Timeout probability min R min R max 0 0 1 2 3 4 5 6 Off period duration T off [s] T on =30 s (mean on period duration) T on =60 s T on =120 s Goodput λ G [kbyte/s] 6.5 6 5.5 5 Impact on goodput Simulation Model R min 0 1 2 3 4 5 6 T off [s] R max T on =120 s T on =60 s T on =30 s Spurious timeouts are triggered by off periods of duration T off > R max Impact only significant in case of frequent delay variations Data rate T off T on Time
Optimization approaches Architectures Modification of TCP algorithms TCP IP TCP IP TCP IP Eifel Algorithm F RTO D SACK GPRS/UMTS GPRS/UMTS layer 2 Freeze TCP Protocol helper / protocol booster TCP IP TCP protocol helper IP TCP IP Spurious packet filter ACK Regulator ACK Buffering GPRS/UMTS GPRS/UMTS layer 2 M TCP Active queue management Split connection TCP? TCP? TCP? TCP TCP TCP IP? IP? IP IP numerous approaches example: WAP GPRS/UMTS mobile terminal GPRS/UMTS GGSN layer 2 fixed terminal
Conclusions and future work Conclusions Mobile networks are characterized by variable delays Spurious TCP timeouts degrade performance Sensitivity of TCP to delay variations depends on RTT estimator Model for RTT estimation of TCP RTO duration as a function of path parameters Significant impact of RTT sampling rate Timestamps and RFC 2988 do not harmonize well Quantification of risk of spurious timeouts Only delay variations of the order of seconds are critical Future work Simulations with more sophisticated UMTS radio link models Verification by measurements
INSTITUT FÜR KOMMUNIKATIONSNETZE UND RECHNERSYSTEME Prof. Dr.-Ing. Dr. h. c. mult. P. J. Kühn The Impact of Delay Variations on TCP Performance Michael Scharf scharf@ikr.uni-stuttgart.de ITG FG 5.2.1 Workshop, Hamburg 20. Feb. 2004
Optimization approaches (cont.) Modification of TCP algorithms Sender-based Eifel Algorithm (RFC 3522) F-RTO (P. Sarolahti et. al.) D-SACK (RFC 2883) Receiver-based Freeze TCP (Goff et. al.) Protocol helper / protocol booster Filtering of segments Spurious packet filter (Schüler et. al.) Active queue management (Sågfors et. al.) Manipulation of acknowledgments ACK Regularor (Chan&Ramjee) ACK Buffering (Huang&Chang) M-TCP (Brown&Singh) numerous split connection approaches
Optimization approaches (cont.) Eifel algorithm Eliminates retransmission ambiguity by timestamps Can detect spurious timeouts Improved reaction to spurious timeouts No go-back-n Congestion window restored RTT estimation reinitialized 4.5e+05 4e+05 Sequence no. 3.5e+05 Timeout after 3 sec Segments 5 sec off period ACKs Fast Retransmit Timeout 3e+05 55 60 65 70 75 Segments ACKs Eifel Algorithmus original ACK and Eifel algorithm detects resumes transmission Time [s]