Good Ideas So Far Computer Networking. Outline. Sequence Numbers (reminder) TCP flow control. Congestion sources and collapse

Similar documents
Principles of congestion control

CE693 Advanced Computer Networks

15-744: Computer Networking TCP

Outline Computer Networking. Transport Protocols. Functionality Split. Review 2 Transport Protocols

Chapter 3 outline. 3.5 Connection-oriented transport: TCP. 3.6 Principles of congestion control 3.7 TCP congestion control

This Lecture: Congestion Control : Computer Networking. Introduction to TCP. Key Things You Should Know Already. Congestion Control

Detecting half-open connections. Observed TCP problems

Computer Networking. Queue Management and Quality of Service (QOS)

Computer Networking Introduction

Chapter 3 Transport Layer

Chapter III: Transport Layer

Announcements Computer Networking. Outline. Transport Protocols. Transport introduction. Error recovery & flow control. Mid-semester grades

Lecture 8. TCP/IP Transport Layer (2)

Chapter 3 outline. 3.5 Connection-oriented transport: TCP. 3.6 Principles of congestion control 3.7 TCP congestion control

Chapter 3 Transport Layer

CSCI Topics: Internet Programming Fall 2008

Transport layer. UDP: User Datagram Protocol [RFC 768] Review principles: Instantiation in the Internet UDP TCP

Transport layer. Review principles: Instantiation in the Internet UDP TCP. Reliable data transfer Flow control Congestion control

CNT 6885 Network Review on Transport Layer

CC451 Computer Networks

Chapter 3 Transport Layer

Announcements Computer Networking. What was hard. Midterm. Lecture 16 Transport Protocols. Avg: 62 Med: 67 STD: 13.

Transmission Control Protocol. ITS 413 Internet Technologies and Applications

CMPE 150/L : Introduction to Computer Networks. Chen Qian Computer Engineering UCSC Baskin Engineering Lecture 10

Congestion Control in TCP

CSC 4900 Computer Networks: TCP

CS4700/CS5700 Fundamentals of Computer Networks

Flow and Congestion Control (Hosts)

TCP: Overview RFCs: 793, 1122, 1323, 2018, 2581

Bandwidth Allocation & TCP

Chapter 3- parte B outline

Lecture 11. Transport Layer (cont d) Transport Layer 1

CSC 8560 Computer Networks: TCP

Functionality Split Computer Networking. Transport Protocols. Overview. Multiplexing & Demultiplexing

Lecture 21: Congestion Control" CSE 123: Computer Networks Alex C. Snoeren

Reliable Transport II: TCP and Congestion Control

Transport protocols. Transport Layer 3-1

Outline Computer Networking. TCP slow start. TCP modeling. TCP details AIMD. Congestion Avoidance. Lecture 18 TCP Performance Peter Steenkiste

TCP Congestion Control

Congestion Control. Daniel Zappala. CS 460 Computer Networking Brigham Young University

Application. Transport. Network. Link. Physical

TCP. CSU CS557, Spring 2018 Instructor: Lorenzo De Carli (Slides by Christos Papadopoulos, remixed by Lorenzo De Carli)

Mid Term Exam Results

Congestion Control. Principles of Congestion Control. Network-assisted Congestion Control: ATM. Congestion Control. Computer Networks 10/21/2009

Lecture 14: Congestion Control"

CS 43: Computer Networks. 19: TCP Flow and Congestion Control October 31, Nov 2, 2018

Outline. TCP: Overview RFCs: 793, 1122, 1323, 2018, steam: r Development of reliable protocol r Sliding window protocols

Chapter 3 Transport Layer

The Transport Layer Congestion control in TCP

Overview. TCP & router queuing Computer Networking. TCP details. Workloads. TCP Performance. TCP Performance. Lecture 10 TCP & Routers

Outline. TCP: Overview RFCs: 793, 1122, 1323, 2018, Development of reliable protocol Sliding window protocols

CS 268: Computer Networking. This Lecture: Congestion Control

Reliable Transport II: TCP and Congestion Control

Chapter III: Transport Layer

TCP Congestion Control : Computer Networking. Introduction to TCP. Key Things You Should Know Already. Congestion Control RED

CSCD 330 Network Programming Winter 2015

CS 356: Introduction to Computer Networks. Lecture 16: Transmission Control Protocol (TCP) Chap. 5.2, 6.3. Xiaowei Yang

Outline. Internet. Router. Network Model. Internet Protocol (IP) Design Principles

COMP/ELEC 429/556 Introduction to Computer Networks

CMSC 417. Computer Networks Prof. Ashok K Agrawala Ashok Agrawala. October 11, 2018

Department of Computer and IT Engineering University of Kurdistan. Transport Layer. By: Dr. Alireza Abdollahpouri

Transport Layer. Application / Transport Interface. Transport Layer Services. Transport Layer Connections

Congestion Control. Principles of Congestion Control. Network assisted congestion. Asynchronous Transfer Mode. Computer Networks 10/23/2013

Lecture 14: Congestion Control"

Flow and Congestion Control

TCP reliable data transfer. Chapter 3 outline. TCP sender events: TCP sender (simplified) TCP: retransmission scenarios. TCP: retransmission scenarios

TCP so far Computer Networking Outline. How Was TCP Able to Evolve

Transport Layer (Congestion Control)

Congestion control in TCP

Computer Networks. Course Reference Model. Topic. Congestion What s the hold up? Nature of Congestion. Nature of Congestion 1/5/2015.

CS321: Computer Networks Congestion Control in TCP

EECS 122, Lecture 19. Reliable Delivery. An Example. Improving over Stop & Wait. Picture of Go-back-n/Sliding Window. Send Window Maintenance

6.033 Computer System Engineering

Correcting mistakes. TCP: Overview RFCs: 793, 1122, 1323, 2018, TCP seq. # s and ACKs. GBN in action. TCP segment structure

Fall 2012: FCM 708 Bridge Foundation I

Page 1. Review: Internet Protocol Stack. Transport Layer Services. Design Issue EEC173B/ECS152C. Review: TCP

Lecture 4: Congestion Control

Page 1. Review: Internet Protocol Stack. Transport Layer Services EEC173B/ECS152C. Review: TCP. Transport Layer: Connectionless Service

NWEN 243. Networked Applications. Transport layer and application layer

Operating Systems and Networks. Network Lecture 10: Congestion Control. Adrian Perrig Network Security Group ETH Zürich

Where we are in the Course. Topic. Nature of Congestion. Nature of Congestion (3) Nature of Congestion (2) Operating Systems and Networks

UNIT IV -- TRANSPORT LAYER

Multiple unconnected networks

Flow and Congestion Control Marcos Vieira

CSE 123A Computer Networks

CS457 Transport Protocols. CS 457 Fall 2014

Overview. TCP congestion control Computer Networking. TCP modern loss recovery. TCP modeling. TCP Congestion Control AIMD

CS519: Computer Networks. Lecture 5, Part 1: Mar 3, 2004 Transport: UDP/TCP demux and flow control / sequencing

MIDTERM EXAMINATION #2 OPERATING SYSTEM CONCEPTS U N I V E R S I T Y O F W I N D S O R S C H O O L O F C O M P U T E R S C I E N C E

CSE 461. TCP and network congestion

Chapter 3 outline. 3.5 Connection-oriented transport: TCP. 3.6 Principles of congestion control 3.7 TCP congestion control

TCP: Overview RFCs: 793,1122,1323, 2018, 2581

Congestion Control In The Internet Part 2: How it is implemented in TCP. JY Le Boudec 2014

CS 5520/ECE 5590NA: Network Architecture I Spring Lecture 13: UDP and TCP

CSC 401 Data and Computer Communications Networks

Communication Networks

ADVANCED COMPUTER NETWORKS

CS519: Computer Networks. Lecture 5, Part 4: Mar 29, 2004 Transport: TCP congestion control

Congestion Control In The Internet Part 2: How it is implemented in TCP. JY Le Boudec 2014

Lecture 15: Transport Layer Congestion Control

Transcription:

Good Ideas So Far 15-441 Computer Networking Lecture 17 TCP & Congestion Control Flow control Stop & wait Parallel stop & wait Sliding window Loss recovery Timeouts Acknowledgement-driven recovery (selective repeat or cumulative acknowledgement) Copyright, 2007-11 Carnegie Mellon University 2 Outline Sequence Numbers (reminder) TCP flow control Congestion sources and collapse Congestion control basics How large do sequence numbers need to be? Must be able to detect wrap-around Depends on sender/receiver window size E.g. Max seq = 7, send win=recv win=7 If pkts 0..6 are sent succesfully and all acks lost Receiver expects 7,0..5, sender retransmits old 0..6!!! Max sequence must be send window + recv window 3 5 1

Sequence Numbers TCP Flow Control 32 Bits, Unsigned à for bytes not packets! Circular Comparison b! Max! 0! b < a! a! Max! 0! Why So Big? For sliding window, must have Sequence Space > Sending Window + Receiving Window No problem Also, want to guard against stray packets With IP, packets have maximum lifetime of 120s Sequence number would wrap around in this time at 286MB/s b! a < b! a! TCP is a sliding window protocol For window size n, can send up to n bytes without receiving an acknowledgement When the data is acknowledged then the window slides forward Each packet advertises a window size Indicates number of bytes the receiver has space for Original TCP always sent entire window Congestion control now limits this 6 7 Window Flow Control: Send Side Window Flow Control: Send Side Packet Sent Packet Received Sent and acked window Sent but not acked Not yet sent Source Port Dest. Port Sequence Number Acknowledgment HL/Flags Window D. Checksum Urgent Pointer Options Source Port Dest. Port Sequence Number Acknowledgment HL/Flags Window D. Checksum Urgent Pointer Options... Next to be sent App write acknowledged sent to be sent outside window 8 9 2

Window Flow Control: Receive Side TCP Persist Receive buffer Acked but not delivered to user Not yet acked What should receiver do?! New What happens if window is 0? Receiver updates window when application reads data What if this update is lost? TCP Persist state Sender periodically sends 1 byte packets Receiver responds with ACK even if it can t store the packet window 10 11 Performance Considerations Outline The window size can be controlled by receiving application Can change the socket buffer size from a default (e.g. 8Kbytes) to a maximum value (e.g. 64 Kbytes) The window size field in the TCP header limits the window that the receiver can advertise 16 bits à 64 KBytes 10 msec RTT à 51 Mbit/second 100 msec RTT à 5 Mbit/second TCP options to get around 64KB limit à increases above limit TCP flow control Congestion sources and collapse Congestion control basics 12 13 3

Internet Pipes? Internet Pipes? How should you control the faucet? How should you control the faucet? Too fast sink overflows! 14 15 Internet Pipes? Internet Pipes? How should you control the faucet? Too fast sink overflows! Too slow what happens? How should you control the faucet? Too fast sink overflows Too slow what happens? Goals Fill the bucket as quickly as possible Avoid overflowing the sink Solution watch the sink 16 17 4

Plumbers Gone Wild! Plumbers Gone Wild 2! How do we prevent water loss? Know the size of the pipes? Now what? Feedback from the bucket or the funnels? 18 19 Congestion Causes & Costs of Congestion 10 Mbps 1.5 Mbps Four senders multihop paths Timeout/retransmit Q: What happens as rate increases? 100 Mbps Different sources compete for resources inside network Why is it a problem? Sources are unaware of current state of resource Sources are unaware of each other Manifestations: Lost packets (buffer overflow at routers) Long delays (queuing in router buffers) Can result in throughput less than bottleneck link (1.5Mbps for the above topology) à a.k.a. congestion collapse 20 21 5

Causes & Costs of Congestion Congestion Collapse When packet dropped, any upstream transmission capacity used for that packet was wasted! Definition: Increase in network load results in decrease of useful work done Many possible causes Spurious retransmissions of packets still in flight Classical congestion collapse How can this happen with packet conservation Solution: better timers and TCP congestion control Undelivered packets Packets consume resources and are dropped elsewhere in network Solution: congestion control for ALL traffic 22 23 Congestion Control and Avoidance A mechanism which: Uses network resources efficiently Preserves fair network resource allocation Prevents or avoids collapse Congestion collapse is not just a theory Has been frequently observed in many networks Approaches Towards Congestion Control Two broad 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 Problem: makes routers complicated 24 25 6

Example: TCP Congestion Control Outline Very simple mechanisms in network FIFO scheduling with shared buffer pool Feedback through packet drops TCP interprets packet drops as signs of congestion and slows down This is an assumption: packet drops are not a sign of congestion in all networks E.g. wireless networks Periodically probes the network to check whether more bandwidth has become available. TCP flow control Congestion sources and collapse Congestion control basics 26 27 Objectives Basic Control Model Simple router behavior Distributedness Efficiency: X = Σx i (t) Fairness: (Σx i ) 2 /n(σx i2 ) What are the important properties of this function? Convergence: control system must be stable Reduce speed when congestion is perceived How is congestion signaled? Either mark or drop packets How much to reduce? Increase speed otherwise Probe for available bandwidth how? 28 29 7

Linear Control Phase Plots Many different possibilities for reaction to congestion and probing Examine simple linear controls Window(t + 1) = a + b Window(t) Different a i /b i for increase and a d /b d for decrease Supports various reaction to signals Increase/decrease additively Increased/decrease multiplicatively Which of the four combinations is optimal? Simple way to visualize behavior of competing connections over time 30 31 Phase Plots Additive Increase/Decrease What are desirable properties? What if flows are not equal? Underutilization Overload Optimal point Both X 1 and X 2 increase/ decrease by the same amount over time Additive increase improves fairness and additive decrease reduces fairness T 0 T 1 32 33 8

Muliplicative Increase/Decrease Convergence to Efficiency Both X 1 and X 2 increase by the same factor over time Extension from origin constant fairness T 0 T 1 x H 34 35 Distributed Convergence to Efficiency Convergence to Fairness a>0 & b>1 a=0 b=1 a<0 & b>1 x H a>0 & b<1 x H a<0 & b<1 x H 36 37 9

Convergence to Efficiency & Fairness What is the Right Choice? Intersection of valid regions For decrease: a=0 & b < 1 x H x H Constraints limit us to AIMD Can have multiplicative term in increase (MAIMD) AIMD moves towards optimal point x 0 x 1 38 39 Important Lessons Important Lessons Transport service UDP à mostly just IP service TCP à congestion controlled, reliable, byte stream Types of ARQ protocols Stop-and-wait à slow, simple Go-back-n à can keep link utilized (except w/ losses) Selective repeat à efficient loss recovery Sliding window flow control TCP flow control Sliding window à mapping to packet headers 32bit sequence numbers (bytes) Why is congestion control needed? How to evaluate congestion control algorithms? Why is AIMD the right choice for congestion control? TCP flow control Sliding window à mapping to packet headers 32bit sequence numbers (bytes) 40 41 10

Good Ideas So Far Flow control Stop & wait Parallel stop & wait Sliding window (e.g., advertised windows) Loss recovery Timeouts Acknowledgement-driven recovery (selective repeat or cumulative acknowledgement) Congestion control AIMD à fairness and efficiency Next Lecture: How does TCP actually implement these? 42 11