TCP in Asymmetric Environments KReSIT, IIT Bombay Vijay T. Raisinghani TCP in Asymmetric Environments 1
TCP Overview Four congestion control algorithms Slow start Congestion avoidance Fast retransmit Fast recovery Working based on receipt of ACKs; ACKclocked TCP in Asymmetric Environments 2
Asymmetry Overview Throughput achieved also dependent on reverse channel Bandwidth Lower bandwidth up-link (reverse) channel Dial-up line; bandwidth constrained lossy wireless channel Latency / Media access Low power mobile units TCP in Asymmetric Environments 3
Asymmetric Network Characteristics High forward bandwidth Low queuing delays on forward path Data packets experience almost no congestion Host A Host B Low reverse bandwidth Large queuing and propagation delays Acks suffer congestion Thus, Throughput achieved is also dependent on reverse channel TCP in Asymmetric Environments 4
TCP and Asymmetric Networks Delayed arrival or dropping of Acks Slower growth of congestion window Large RTT variations Cumulative acknowledgment hence sender burstiness No Acks dropped if: Effective Bandwidth in Forward direction Effective Bandwidth in Reverse direction For 2 Mbps 10 Kbps > 1600 bytes 40 bytes Data Packet size Ack size Reverse link saturated before forward link, if more than 1 Ack for 5 packets TCP in Asymmetric Environments 5
Typical (Asymmetric) Technologies Cable modem networks Direct broadcast satellite Asymmetric Digital Subscriber Loop TCP in Asymmetric Environments 6
Pain in the ACK Reverse channel problems impairs ACK flow ACKs come in slowly ACKs may be dropped due to congestion Packet radio network (half-duplex) Variable latencies ACK flowing opposite to data packets cause interference RTT estimate highly variable TCP in Asymmetric Environments 7
Pain in the ACK TCP relies on timely ACKS to utilize bandwidth Slow growth of window if low bandwidth reverse path Burstiness if delayed ACKs Variability in RTT Inflates TCP retransmission timeout Effects loss recovery TCP in Asymmetric Environments 8
Typical Topology 10 Mbps wireless 28.8Kbps dial-up TCP in Asymmetric Environments 9
Proposed Solutions Path MTU discovery J. Mogul, S. Deering (RFC 1191, 1990) TCP-Large Window (TCP-LW) V. Jacobson, R. Braden, D. Borman (RFC 1323, 1992) TCP for transactions (T/TCP) R. Braden (RFC 1644, 1994) TCP SACK M. Mathis, S. Flyod, A. Romanow (RFC 2018, 1996) Asymmetric TCP (TCP ASYM) H. Balakrishnan, V. Padmanabhan, R. Katz (1997) MONET98 TCP in Asymmetric Environments 10
Proposed Solutions Satellite Transport Protocol (STP) T. Henderson, R. Katz (1999) Space Comm. Protocol Spec (SCPS-TP) NASA (1999) Window Prediction Mechanism A. C. Auge, J.L. Magnet, J.P. Aspas Mild Aggression Vijay T. Raisinghani, Abhishek Patil, Sridhar Iyer (2000) TCP in Asymmetric Environments 11
Asymmetric TCP [H. Balakrishnan, V.N. Padmanabhan, R.H. Katz] Effect of networks asymmetry on end-toend TCP performance Bandwidth and latency asymmetries Techniques to improve end-to-end performance Decrease rate of ACKs Sender adaptation ACK scheduling at router TCP in Asymmetric Environments 12
Experiment Parameters Link bandwidth Latency Packet-radio turn around time TCP in Asymmetric Environments 13
Terminology Normalized bandwidth ratio k Bandwidth ratio over packet size ratio E.g.: 10 Mbps forward; 100 Kbps reverse 1000 byte data packet; 40 byte ack k = 100 / 25 i.e. 4 TCP in Asymmetric Environments 14
Effect of k High bandwidth forward link Sender k > 1 Receiver Cwnd growth slowed Burstiness Idle periods Low bandwidth reverse link Bottleneck router Could result in ACK (dup- ACK) dropping TCP in Asymmetric Environments 15
Experiments and Simulations Wireless cable modem networks Forward channel 10Mbps; 5ms latency Reverse dial-up; 14.4 / 28.8Kbps Packet radio network No explicit bandwidth asymmetry Data traffic affected by ACK traffic TCP in Asymmetric Environments 16
Cable Modem Topology 10 Mbps wireless 28.8Kbps dial-up TCP in Asymmetric Environments 17
Slide modified by C. Pham Measured Throughput (One way transfers) Assuming - 1K packet - 10Mbps forward - 28Kbps reverse SLIP Ack size:52 bytes K= 18.05 CSLIP Ack size:18 bytes K=6.25
Measured Throughput (Two way transfers) High bandwidth forward link Sender Cwnd growth slowed Burstiness Idle periods Web trf Email Assume reverse connection is initiated first: ACK for forward delayed at buffer/router Slide modified by C. Pham TCP in Asymmetric Environments 19
Measured Throughput (2-way) Web trf Email Slide modified by C. Pham TCP in Asymmetric Environments 20
Issues in Packet Radio Variable delay Radio turnaround time MAC protocol RTS/ CTS Back-off at sender Link layer ACKs TCP in Asymmetric Environments 21
Solutions ACK Congestion Control (ACC) ACK Filtering (AF) Sender Adaptation (SA) ACK reconstruction (AR) Scheduling data and ACKs TCP in Asymmetric Environments 22
ACK Congestion Control Buffers have packet(not byte) limits Random Early Detection (RED) algorithm at reverse link gateway Gateway senses incipient congestion Selects packet (in queue) at random for Explicit Congestion Notification (ECN) Notification reflected back to sender of packet(ack) Drop at random, if queue full TCP in Asymmetric Environments 23
ACK Congestion Control TCP receiver maintains delay factor d ACK for every d data packets Increase d multiplicatively on receipt of ECN Subsequently decrease d linearly per RTT if NO ECN d min = 1, max = Sender window TCP in Asymmetric Environments 24
ACK Filtering TCP ACKs cumulative Mechanism New ACK en-queued Check queue for smaller seq. number ACKs Drop some / all redundant ACKs TCP in Asymmetric Environments 25
Sender Adaptation AF and ACC decrease ACK frequency Problems at data sender Sender burstiness Slow window growth Reduced effectiveness of fast retransmission Decrease burst of data send (upper bound) cwnd / srtt data rate TCP in Asymmetric Environments 26
Sender Adaptation Byte count to increase window, not ACK count Retransmission solution ACC: After threshold out-of-order packets mark subsequent DUPACKs with fast retransmit bit AF: Similar action at router Sender fast retransmits even if one such ACK TCP in Asymmetric Environments 27
ACK Reconstruction To prevent reduced ACK frequency from affecting sender Reconstruct ACK stream after bottleneck link Fill in the gaps to smooth out ACK stream TCP in Asymmetric Environments 28
Scheduling Data and ACKs Problem Single FIFO queue in reverse direction ACKs first scheduling Prevents forward channel starving TCP in Asymmetric Environments 29
Solutions (Packet Radio) Minimize the effect of turn-around time by Piggybacking Link Layer ACKs. ACK Filtering and ACK Congestion Control. AF is better than ACC because it completely eliminates the redundant ACKs & reduces the amount of interfering traffic. TCP in Asymmetric Environments 30
Issues ACC/AF Routers need to be TCP Aware. If the connection uses encryption then the schemes won't work. Modifications required at router Overhead at router Can cause burstiness AF: mobile host - IP Address changes? TCP in Asymmetric Environments 31
Issues Lot of modifications required to TCP stack AR Ack Reconstruction topology dependent ECN Problems if high bandwidth not available later Checksum problem TCP in Asymmetric Environments 32
Satellite Transport Protocol [T.R. Henderson, R.H. Katz] Optimized for satellite environment TCP in Asymmetric Environments 33
STP Design Selective ACKs No retransmission timers No ACK for alternate packets Reduces ACK traffic Transmitter asks for ACKs Negative ACK for losses TCP in Asymmetric Environments 34
STP Design 4 basic packet types Sequenced Data, POLL, STAT, USTAT Sequenced Data (SD) User data; has sequence number and cheksum POLL Periodically sent to receiver Contains timestamp and next in-sequence SD number (indicates to receiver what it should have received so far) 2-3 per RTT TCP in Asymmetric Environments 35
STP Design STAT(us) message Similar to SACK Reports entire state of receiver buffer Hence robust to loss of POLLs or STATs U(nsolicited)STAT To immediately report gaps TCP in Asymmetric Environments 36
STP Example TCP in Asymmetric Environments 37
STP Flow Control Congestion Control Slow start (as in TCP); never re-entered since no timeout Window growth based on STAT Send packets over RTT RTT estimated from timestamp on STAT and current time Byte (not ACK) counting to increase window TCP in Asymmetric Environments 38
STP Design Reduced handshake similar to T/TCP BEGIN message contains data also Piggyback POLL messages TCP in Asymmetric Environments 39
Split STP v/s Split TCP Similar throughput Long RTT STP thruput slightly lower Smoothing Tx over RTT STP bandwidth overhead slightly lower STP reverse channel usage linearly decreases with RTT POLL frequency based on RTT Less sensitive to variations in RTT TCP in Asymmetric Environments 40
STP Deployment End host to implement STP Or Satellite interface change STP to TCP Internally in a satellite network TCP in Asymmetric Environments 41
Window Prediction Mechanism [A.C. Auge, J.L. Magnet, J.P. Aspas] Implemented at receiver Delayed ACKs with varying delay factor r Adapted dynamically based on expected no. of packets Reconstruct congestion control behavior of sender TCP in Asymmetric Environments 42
WPM Design Mimic sender behavior Receiver maintains predicted values pcwnd and pssthresh Helps decide r Initially pssthresh = max. cwnd When no. of packets recv = r, send new delayed ACK Dup ACKs not delayed Max. 6 dupacks in a row; to avoid congestion TCP in Asymmetric Environments 43
Mild Aggression (MA) [V.T. Raisinghani, A. Patil, Sridhar Iyer] Other approaches focus on reverse channel MA takes cognizance of healthy forward channel MA attempts to minimize impact of reverse channel characteristics by Mild Aggression Factors TCP in Asymmetric Environments 44
MA Basics Assumptions High bandwidth forward channel No packet loss on forward channel Network inspected to determine MAFs Large cwnd (= 4) Mild Aggression Factors (q and e) goodrtt(grtt) = q * RTT during slow start e to aid window growth Congestion Avoidance similar to TCP Normal retransmission suppressed during MA Receiver sends NACK for lost packet TCP in Asymmetric Environments 45
MA Algorithm ACK received? No start grtt timer grtt = q * RTT Std TCP Congestion Avoid & Slow-start cwnd_last = cwnd Yes Congestion avoid? Std TCP Congestion Avoid grtt timeout? Slow Start? Yes cwnd = min ( min(cwnd + e, cwnd_last*2), receiver_window) No Std TCP timeout behavior cwnd == 2*cwnd_last? TCP in Asymmetric Environments 46
MA Simulation N1 10 Mbps, 500ms N3 9.6 Kbps, 10ms 9.6 Kbps, 10ms N5 N2 14.4 Kbps, 10ms 5 Mbps, 5ms N4 1 Mbps, 2ms N6 TCP in Asymmetric Environments 47
Simulation Result TCP in Asymmetric Environments 48
Mild Aggression Summary Early ramp-up of cwnd Can work even if packets are encrypted Reduced ACK frequency Aggression factor needs to be decided and adapted High k may cause losses in forward direction TCP in Asymmetric Environments 49
MA Summary MAFs improve the congestion window growth during Slow Start No modifications required at routers We believe q typically to be around 0.8 in actual environments TCP in Asymmetric Environments 50
Further Reading Hari Balakrishnan, Venkata N. Padmanabhan, Randy H. Katz The Effects of Asymmetry on TCP Performance Thomas R. Henderson, Randy H. Katz Transport Protocols for Internet-Compatible Satellite Networks Enhancing TCP Over Satellite Channels (RFC 2488) Ongoing TCP Research Related to Satellites (RFC 2760) TCP Congestion Control (RFC 2581) TCP in Asymmetric Environments 51