250 likes | 383 Vues
This project focuses on implementing TCPW-BR in FreeBSD to address the challenges of high packet loss rates in wireless environments. By testing this implementation within dummyNet, we explore flaws in the initial design and investigate advanced loss discrimination algorithms (LDAs). Our findings highlight the substantial improvement in throughput for TCPW-BR compared to traditional methods like New Reno, especially under high error conditions. Ultimately, this research aims to optimize TCP performance through intelligent retransmission strategies and better window management.
E N D
TCP Bulk Repeat CS218 Fall 2003 Students: Ricardo Oliveira, Joshua Choi, William So Tutor: Guang Yang 11/24/2003
Goal of our project • Implement TCPW-BR in freeBSD • Test this implementation in dummyNet • Correct possible flaws of initial design • Explore new loss discrimination algorithms (LDAs)
Motivation • Bit error rate of wireless links (~ 10 -6 to 10 -5) is substantially higher than wire-line links (~10 -12) packet loss rate can be very high (2-10%) • Because errors occur in bursts, several packets can be affected in the same TCP window • Regular TCP (New Reno) retransmits one packet per RTT need multiple RTTs to recover from several losses • In pathological scenarios (i.e., all the pkts in a window are lost), TCP makes use of the Karn’s clamped retransmit backoff (doubling the RTO each time) • New Reno halves the congestion window when any loss occurs bandwidth underutilized
Bulk Repeat Scheme • Bulk retransmit • retransmit several packets instead of one (Go-Back-N) • Fixed retransmit timeout • Avoid exponential backoff in presence of random losses • Intelligent window adjustment • avoid reducing cwnd in random loss events • Loss discrimination algorithm (LDA) • End-to-end scheme to differentiate random losses from congestion losses
Bulk Retransmit • When a lost is detected: • New Reno Retransmits one packet per RTT • Bulk Repeat retransmits the whole window
Bulk Retransmit Algorithm • When sender receives 3 dup ACKs or times out, it just retransmit the lost packet (like NewReno) • Bulk retransmit is only triggered by partial ACKs: • only if the LDA tells us the loss was random; otherwise retransmit as NewReno • Bulk retransmission means retransmitting all outstanding unacknowledged packets in the current window
Bulk Retransmit Issue • Compensate for inflated pipe - wait until effects of burst die down before transmitting new packets: • Transmit only after k ACKs have been received ( 0 ≤k≤ number of bulk retransmitted packets) • Maintain maximum of one bulk retransmission per RTT
Fixed Retransmit Timeout • Karn’s clamped retransmit backoff • Consecutive timeouts trigger doubling of RTO (up to a maximum of 64X) • Under high error rate, if packet or ACK is lost, bandwidth and time are wasted before timeout
Fixed Retransmit Timeout • Solution: • Use a fixed retransmit timeout • For error-induced losses (LDA), do not double retransmit timeout value
Intelligent Window Adjustment • High error rates keep ssthresh low • ssthresh should represent estimate of the pipe size • High error keeps ssthresh too conservative • TCP behavior • Sets cwnd to ssthresh on 3DUPACKs • Sets cwnd to 1 on timeout • Underutilization in non-congestion
Intelligent Window Adjustment (cont’d) • Solution: • If loss is due to random error, leave cwnd unchanged
Loss Discrimination Algorithm • High impact on Bulk Repeat performance: • Congestion do TCP loss recovery • Random Error Bulk Repeat • LDA inaccuracy can lead to aggravation of congestion or underutilization
LDA – Background • Two major types: • Network-layer assisted: ECN/RED, ELN, … • End-to-end: • Spike: uses ROTT (Relative one-way trip time) combined with hysteresis scheme; • ZigZag: uses the mean and standard deviation of ROTT; • Biaz scheme: assumes last hop bottleneck wireless link; uses pkt inter-arrival times; if (n+1)Tmin≤Ti<(n+2)Tmin then n missing pkts were lost due to wireless tx errors; • Rate Gap Threshold (RGT): uses TCPW ERE and compare to current rate to infer network congestion; Bulk Repeat uses end-to-end, namely Spike + RGT
LDA - Spike • Based on RTT measurement: • Bspikestart = RTTmin + α∙ (RTTmax - RTTmin) • Bspikeend = RTTmin + β∙ (RTTmax - RTTmin) • α>β; we use 0.4 and 0.05 respectively • If RTT goes above Bspikestart, TCP enters congestion mode • If RTT goes below Bspikeend, TCP exits congestion mode
LDA – RGT • Rate Gap Threshold: • Bulk Repeat uses TCPW ERE (Eligible Rate Estimate) • The sending rate is computed as cwnd/RTTmin • If the sending rate >> ERE then most likely the network is congested; otherwise loss is a random loss • Because Spike and RGT work well under different error rates, Bulk Repeat uses a combination of the two: • RGT is accurate under low error rate; but RGT can’t tell the difference between a heavy loss scenario and a congestion scenario (because it is based on rate estimation) • Spike is good under high error rate (because it’s based on RTT)
Simulations in ns-2 • 45Mbps wired + 11Mbps wireless; 70msec RTT; wireless link as shared bottleneck
Simulation Results • Throughput for different pkt error rates (NewReno, TCPW and TCPW-BR) • TCPW-BR performs better than the other TCP flavors in high error rate scenarios
Simulation Results - Fairness • Two TCPW-BR sharing the same bottleneck @ 5% error rate
Simulation Results - Friendliness • TCPW-BR and New Reno sharing the same bottleneck @ 5% error rate • New Reno gets its fair share as it was running alone
Experimental Setup • Last-hop wireless link with low delay • Took measures for several packet error loss rates in the wireless link • Sender was running freeBSD5.1 w/ TCPW-BR kernel • Receiver was running FreeBSD4.5 w/ New Reno kernel
Emulation/measurement tools • We used dummyNet to emulate the desire scenario • better than ns-2 (simulation) • not as perfect as a real testbed (like a satellite Internet link) • advantages: control over the bwd/delay/pkt error loss/queues • Iperf to generate TCP traffic from sender to receiver • simulates a client/server application • control the running time • generates CBR UDP traffic
Experimental Details • TCP socket size(advertised window) must be large enough both in receiver and sender; good heuristic: let it be twice the pipe size= 2*Bwd*RTT • We measured the throughput for each flavor of TCP • Each connection lasted about 1 minute
Future Work • Test friendliness/fairness of our implementation • Test stability of protocol (check for deadlocks) • Change network scenario: wireless last-hop vs. wireless backbone • Different propagation delays • Tune the “inflated pipe” compensation scheme • Source code tweaking
References • Guang Yang, Ren Wang, Mario Gerla, M. Y. Sanadidi, “TCP with Bulk Repeat” • S. Cen, P. C. Cosman and G. M. Voelker, “End-to-end Differentiation of Congestion and Wireless losses”