Download presentation
Presentation is loading. Please wait.
Published byGeoffrey Jessie Burke Modified over 8 years ago
1
@Yuan Xue (yuan.xue@vanderbilt.edu) A special acknowledge goes to J.F Kurose and K.W. Ross Some of the slides used in this lecture are adapted from their original slides that accompany the book “Computer Networking, A Top-Down Approach” All material copyright 1996-2009 J.F Kurose and K.W. Ross, All Rights Reserved CS 283Computer Networks Spring 2013 Instructor: Yuan Xue
2
@Yuan Xue (yuan.xue@vanderbilt.edu) Transport Layer Outline Overview 3.1 Transport-layer services 3.2 Multiplexing and demultiplexing 3.3 UDP: Connectionless transport 3.4 Principles of reliable data transfer 3.5 Connection-oriented transport: TCP Demultiplexing segment structure reliable data transfer flow control connection management Congestion control 3.6 Principles of congestion control 3.7 TCP congestion control
3
@Yuan Xue (yuan.xue@vanderbilt.edu) Approaches towards congestion control end-end congestion control: no explicit feedback from network congestion inferred from end-system observed loss, delay approach taken by TCP network-assisted congestion control: routers provide feedback to end systems single bit indicating congestion (SNA, DECbit, TCP/IP ECN, ATM) explicit rate sender should send at two broad approaches towards congestion control:
4
@Yuan Xue (yuan.xue@vanderbilt.edu) TCP congestion control: r goal: TCP sender should transmit as fast as possible, but without congesting network m Q: how to find rate just below congestion level r decentralized: each TCP sender sets its own rate, based on implicit feedback: m ACK: segment received (a good thing!), network not congested, so increase sending rate m lost segment: assume loss due to congested network, so decrease sending rate
5
@Yuan Xue (yuan.xue@vanderbilt.edu) TCP congestion control: bandwidth probing r “probing for bandwidth”: increase transmission rate on receipt of ACK, until eventually loss occurs, then decrease transmission rate m continue to increase on ACK, decrease on loss (since available bandwidth is changing, depending on other connections in network) ACKs being received, so increase rate X X X X X loss, so decrease rate sending rate time r Q: how fast to increase/decrease? m details to follow TCP’s “sawtooth” behavior
6
@Yuan Xue (yuan.xue@vanderbilt.edu) TCP Congestion Control : Window-based sender limits rate by limiting number of unACKed bytes “in pipeline”: cwnd: differs from rwnd (how, why?) sender limited by min(cwnd,rwnd) roughly, cwnd is dynamic, function of perceived network congestion rate = cwnd RTT bytes/sec LastByteSent-LastByteAcked cwnd cwnd bytes RTT ACK(s)
7
@Yuan Xue (yuan.xue@vanderbilt.edu) TCP Congestion Control: Overview segment loss event: reducing cwnd timeout: no response from receiver cut cwnd to 1 3 duplicate ACKs: at least some segments getting through (recall fast retransmit) cut cwnd in half, less aggressively than on timeout ACK received: increase cwnd r slowstart phase: m increase exponentially fast (despite name) at connection start, or following timeout r congestion avoidance: m increase linearly
8
@Yuan Xue (yuan.xue@vanderbilt.edu) TCP Slow Start when connection begins, cwnd = 1 MSS example: MSS = 500 bytes & RTT = 200 msec initial rate = 20 kbps available bandwidth may be >> MSS/RTT desirable to quickly ramp up to respectable rate increase rate exponentially until first loss event or when threshold reached double cwnd every RTT done by incrementing cwnd by 1 for every ACK received Host A one segment RTT Host B two segments four segments
9
@Yuan Xue (yuan.xue@vanderbilt.edu) Transitioning into/out of slowstart ssthresh: cwnd threshold maintained by TCP on loss event: set ssthresh to cwnd/2 remember (half of) TCP rate when congestion last occurred when cwnd >= ssthresh : transition from slowstart to congestion avoidance phase
10
@Yuan Xue (yuan.xue@vanderbilt.edu) TCP: congestion avoidance when cwnd > ssthresh grow cwnd linearly increase cwnd by 1 MSS per RTT approach possible congestion slower than in slowstart implementation: cwnd = cwnd + MSS/cwnd for each ACK received r ACKs: increase cwnd by 1 MSS per RTT: additive increase r loss: cut cwnd in half (non-timeout-detected loss ): multiplicative decrease AIMD AIMD: Additive Increase Multiplicative Decrease
11
@Yuan Xue (yuan.xue@vanderbilt.edu) TCP congestion control FSM: overview slow start congestion avoidance fast recovery cwnd > ssthresh loss: timeout loss: timeout new ACK loss: 3dupACK loss: 3dupACK loss: timeout
12
@Yuan Xue (yuan.xue@vanderbilt.edu) TCP FSM: link congestion control with reliable delivery slow start congestion avoidance fast recovery timeout ssthresh = cwnd/2 cwnd = 1 MSS dupACKcount = 0 retransmit missing segment timeout ssthresh = cwnd/2 cwnd = 1 MSS dupACKcount = 0 retransmit missing segment cwnd > ssthresh cwnd = cwnd+MSS dupACKcount = 0 transmit new segment(s),as allowed new ACK cwnd = cwnd + MSS (MSS/cwnd) dupACKcount = 0 transmit new segment(s),as allowed new ACK. dupACKcount++ duplicate ACK ssthresh= cwnd/2 cwnd = ssthresh + 3 retransmit missing segment dupACKcount == 3 dupACKcount++ duplicate ACK ssthresh= cwnd/2 cwnd = ssthresh + 3 retransmit missing segment dupACKcount == 3 timeout ssthresh = cwnd/2 cwnd = 1 dupACKcount = 0 retransmit missing segment cwnd = cwnd + MSS transmit new segment(s), as allowed duplicate ACK cwnd = ssthresh dupACKcount = 0 New ACK cwnd = 1 MSS ssthresh = 64 KB dupACKcount = 0
13
@Yuan Xue (yuan.xue@vanderbilt.edu) Summary: TCP Congestion Control when cwnd < ssthresh, sender in slow-start phase, window grows exponentially. when cwnd >= ssthresh, sender is in congestion- avoidance phase, window grows linearly. when triple duplicate ACK occurs, ssthresh set to cwnd/2, cwnd set to ~ ssthresh when timeout occurs, ssthresh set to cwnd/2, cwnd set to 1 MSS.
14
@Yuan Xue (yuan.xue@vanderbilt.edu) More on TCP Congestion Control Q: Why AIMD? Can I come up with an alternative design for TCP? A: Yes. Actually TCP has different versions and different implementations. Reno, Tahoe, Vegas, etc A longer list at: http://en.wikipedia.org/wiki/TCP_congestion_avoidance_ algorithm http://en.wikipedia.org/wiki/TCP_congestion_avoidance_ algorithm http://en.wikipedia.org/wiki/Taxonomy_of_congestion_co ntrol http://en.wikipedia.org/wiki/Taxonomy_of_congestion_co ntrol
15
@Yuan Xue (yuan.xue@vanderbilt.edu) Popular “flavors” of TCP ssthresh TCP Tahoe TCP Reno Transmission round cwnd window size (in segments)
16
@Yuan Xue (yuan.xue@vanderbilt.edu) TCP throughput Q: what’s average throughout of TCP as function of window size, RTT? ignoring slow start let W be window size when loss occurs. when window is W, throughput is W/RTT just after loss, window drops to W/2, throughput to W/2RTT. average throughout:.75 W/RTT
17
@Yuan Xue (yuan.xue@vanderbilt.edu) TCP Futures: TCP over “long, fat pipes” example: 1500 byte segments, 100ms RTT, want 10 Gbps throughput requires window size W = 83,333 in-flight segments throughput in terms of loss rate: new versions of TCP for high-speed
18
@Yuan Xue (yuan.xue@vanderbilt.edu) fairness goal: if K TCP sessions share same bottleneck link of bandwidth R, each should have average rate of R/K TCP connection 1 bottleneck router capacity R TCP connection 2 TCP Fairness
19
@Yuan Xue (yuan.xue@vanderbilt.edu) More on TCP Congestion Control Q: Is TCP good (enough? optimal?) A: Well… this is a long story… but the answer is no.. New TCP proposals E.g. http://www.engadget.com/2012/01/24/google- suggests-tcp-tweaks-to-make-web-pages-load-faster/ Control Theoretical Design http://authors.library.caltech.edu/8580/1/LOWieeecsm02.pdf http://www.ifp.illinois.edu/~srikant/Papers/low_s.pdf
20
@Yuan Xue (yuan.xue@vanderbilt.edu) More on TCP Congestion Control Q: What aspect should I consider, if I am going to work on my “TCP” design? A: Throughput Can it exploit the link capacity? Being aggressive may not bring additional benefit Fairness Can it share the link capacity fairly among all flows? Friendliness What if it runs with TCP? Experiment for testing your “TCP“ design: one flow; multiple flows; With background traffic (TCP, UDP)
21
@Yuan Xue (yuan.xue@vanderbilt.edu) More on TCP Congestion Control Q: Can I change the TCP implementation on my computer to speed up my Internet experience?! A: Sure. But the first thing to consider: Do you have the control of both sender and receiver? If you only implement the sender, what can you do? What if you only control the receiver?
22
@Yuan Xue (yuan.xue@vanderbilt.edu) Chapter 3: Summary principles behind transport layer services: multiplexing, demultiplexing reliable data transfer flow control congestion control instantiation and implementation in the Internet UDP TCP Next: leaving the network “edge” (application, transport layers) into the network “core”
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.