L13: Sharing in network systems Dina Katabi 6.033 Spring 2007 Some slides are from lectures by Nick Mckeown, Ion Stoica, Frans.

Slides:



Advertisements
Similar presentations
Congestion Control and Fairness Models Nick Feamster CS 4251 Computer Networking II Spring 2008.
Advertisements

Winter 2008CS244a Handout #61 CS244a: An Introduction to Computer Networks Handout 6: The Transport Layer, Transmission Control Protocol (TCP), and User.
Congestion Control Created by M Bateman, A Ruddle & C Allison As part of the TCP View project.
TCP Congestion Control Dina Katabi & Sam Madden nms.csail.mit.edu/~dina 6.033, Spring 2014.
Congestion Control: TCP & DC-TCP Swarun Kumar With Slides From: Prof. Katabi, Alizadeh et al.
School of Information Technologies TCP Congestion Control NETS3303/3603 Week 9.
Chapter 3 Transport Layer slides are modified from J. Kurose & K. Ross CPE 400 / 600 Computer Communication Networks Lecture 12.
Transport Layer 3-1 Fast Retransmit r time-out period often relatively long: m long delay before resending lost packet r detect lost segments via duplicate.
Transport Layer3-1 Congestion Control. Transport Layer3-2 Principles of Congestion Control Congestion: r informally: “too many sources sending too much.
Congestion Control Reading: Sections COS 461: Computer Networks Spring 2011 Mike Freedman
CSEE W4140 Networking Laboratory Lecture 7: TCP flow control and congestion control Jong Yul Kim
1 TCP Transport Control Protocol Reliable In-order delivery Flow control Responds to congestion “Nice” Protocol.
Computer Networking Lecture 16 – TCP & Congestion Control Copyright ©, Carnegie Mellon University.
CSEE W4140 Networking Laboratory Lecture 7: TCP congestion control Jong Yul Kim
1 Chapter 3 Transport Layer. 2 Chapter 3 outline 3.1 Transport-layer services 3.2 Multiplexing and demultiplexing 3.3 Connectionless transport: UDP 3.4.
1 An Introduction to Computer Networks Some slides are from lectures by Nick Mckeown, Ion Stoica, Frans Kaashoek, Hari Balakrishnan, and Sam Madden Prof.
Data Communication and Networks
EEC-484/584 Computer Networks Lecture 14 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
1 Reliability & Flow Control Some slides are from lectures by Nick Mckeown, Ion Stoica, Frans Kaashoek, Hari Balakrishnan, and Sam Madden Prof. Dina Katabi.
1 K. Salah Module 6.1: TCP Flow and Congestion Control Connection establishment & Termination Flow Control Congestion Control QoS.
TCP Congestion Control
Courtesy: Nick McKeown, Stanford 1 TCP Congestion Control Tahir Azim.
3: Transport Layer3b-1 Principles of Congestion Control Congestion: r informally: “too many sources sending too much data too fast for network to handle”
Transport Layer 4 2: Transport Layer 4.
Transport Layer3-1 Chapter 3 outline r 3.1 Transport-layer services r 3.2 Multiplexing and demultiplexing r 3.3 Connectionless transport: UDP r 3.4 Principles.
Transport Layer1 Flow and Congestion Control Ram Dantu (compiled from various text books)
Principles of Congestion Control Congestion: informally: “too many sources sending too much data too fast for network to handle” different from flow control!
TCOM 509 – Internet Protocols (TCP/IP) Lecture 04_b Transport Protocols - TCP Instructor: Dr. Li-Chuan Chen Date: 09/22/2003 Based in part upon slides.
TCP CS 168 Discussion Week 6 Many thanks to past EE 122 GSIs.
EE 122: Congestion Control and Avoidance Kevin Lai October 23, 2002.
Copyright 2008 Kenneth M. Chipps Ph.D. Controlling Flow Last Update
Copyright © Lopamudra Roychoudhuri
Lecture 9 – More TCP & Congestion Control
What is TCP? Connection-oriented reliable transfer Stream paradigm
Transport Layer 3-1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March
CS640: Introduction to Computer Networks Aditya Akella Lecture 15 TCP – III Reliability and Implementation Issues.
Computer Networking Lecture 18 – More TCP & Congestion Control.
TCP: Transmission Control Protocol Part II : Protocol Mechanisms Computer Network System Sirak Kaewjamnong Semester 1st, 2004.
1 CS 4396 Computer Networks Lab TCP – Part II. 2 Flow Control Congestion Control Retransmission Timeout TCP:
CS640: Introduction to Computer Networks Aditya Akella Lecture 15 TCP – III Reliability and Implementation Issues.
Transport Layer3-1 Chapter 3 outline r 3.1 Transport-layer services r 3.2 Multiplexing and demultiplexing r 3.3 Connectionless transport: UDP r 3.4 Principles.
T. S. Eugene Ngeugeneng at cs.rice.edu Rice University1 COMP/ELEC 429/556 Introduction to Computer Networks Principles of Congestion Control Some slides.
Winter 2008CS244a Handout 71 CS244a: An Introduction to Computer Networks Handout 7: Congestion Control Nick McKeown Professor of Electrical Engineering.
Winter 2003CS244a Handout 71 CS492B Project #2 TCP Tutorial # Jin Hyun Ju.
Advance Computer Networks Lecture#09 & 10 Instructor: Engr. Muhammad Mateen Yaqoob.
XCP: eXplicit Control Protocol Dina Katabi MIT Lab for Computer Science
Transport Layer3-1 Chapter 3 outline r 3.1 Transport-layer services r 3.2 Multiplexing and demultiplexing r 3.3 Connectionless transport: UDP r 3.4 Principles.
© Janice Regan, CMPT 128, CMPT 371 Data Communications and Networking Congestion Control 0.
Peer-to-Peer Networks 13 Internet – The Underlay Network
@Yuan Xue A special acknowledge goes to J.F Kurose and K.W. Ross Some of the slides used in this lecture are adapted from their.
Computer Networking Lecture 16 – Reliable Transport.
1 Flow & Congestion Control Some slides are from lectures by Nick Mckeown, Ion Stoica, Frans Kaashoek, Hari Balakrishnan, and Sam Madden Prof. Dina Katabi.
TCP - Part II Relates to Lab 5. This is an extended module that covers TCP flow control, congestion control, and error control in TCP.
Transport Layer CS 381 3/7/2017.
Chapter 3 outline 3.1 transport-layer services
Chapter 6 TCP Congestion Control
Chapter 3 outline 3.1 Transport-layer services
TCP - Part II Relates to Lab 5. This is an extended module that covers TCP flow control, congestion control, and error control in TCP.
Flow and Congestion Control
Lecture 19 – TCP Performance
So far, On the networking side, we looked at mechanisms to links hosts using direct linked networks and then forming a network of these networks. We introduced.
Chapter 6 TCP Congestion Control
CS640: Introduction to Computer Networks
CS4470 Computer Networking Protocols
TCP Congestion Control
EE 122: Lecture 10 (Congestion Control)
Transport Layer: Congestion Control
Chapter 3 outline 3.1 Transport-layer services
TCP flow and congestion control
Congestion Michael Freedman COS 461: Computer Networks
Presentation transcript:

L13: Sharing in network systems Dina Katabi Spring Some slides are from lectures by Nick Mckeown, Ion Stoica, Frans Kaashoek, Hari Balakrishnan, Sam Madden, and Robert Morris

Where is sharing happening? stub Network Layer Link Layer presentation Layer End-to-end layer RPC HD HD HD HDHD HD HeaderDataHeaderData clientserver

This Lecture Problems: Sharing server Sharing network Solution: Set the window size carefully Sharing server: flow control Sharing the network: congestin control

Sliding Window The window advances/slides upon the arrival of an ack The sender sends only packets in the window Receiver usually sends cumulative acks i.e., receiver acks the next expected in-order packet Window Size Outstanding Un-ack’d pkts Packets OK to send Packets not OK to send yet Packets ACK’d

Src Rcvr window = p1 x

Src Rcvr window = p1 a2 x 6

Src window = p1 a2 x 6 p3 Rcvr

Src window = p1 a2 x 6 p3 a2 p4 a2 p6 a2 p5 Timeout 2 a7 p2 Rcvr

Src window = p1 a2 x 6 p3 a2 p4 a2 p6 a2 p5 Timeout 2 a7 p Rcvr In this example, the receiver sent cumulative acks, but the same behavior happens if the receiver acks the received sequence number

What is the right window size? The window limits how fast the sender sends Two mechanisms control the window: Flow control Congestion control

Flow Control The receiver may be slow in processing the packets  receiver is a bottleneck To prevent the sender form overwhelming the receiver, the receiver tells the sender the maximum number of packets it can buffer fwnd Sender sets W ≤ fwnd

How to set fwnd? App B1B1 B2B2 TCP Multiple applications run on the same machine but use different ports P1DP2D D H P1D H network Fwnd = B x RTT Size of queue substitute for B Adapts to RTT changes B changes “self-pacing”

Sharing the network How do you manage the resources in a huge system like the Internet, where users with different interests share the same resources? Difficult because of: Size Millions of users, links, routers Heterogeneity bandwidth: 9.6Kb/s (then modem, now cellular), 10 Tb/s latency: 50us (LAN), 133ms (wired), 1s (satellite), 260s (Mars)

Congestion S1S1 S2S2 R1 D 10Mb/s 2Mb/s 100Mb/s S1S1 S2S2  Sources share links, and buffer space  Why 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)  Long delays may lead to retransmissions, which lead to more packets….

Danger: Congestion Collapse Increase in input traffic leads to decrease in useful work Input traffic Throughput cliff Congestion Collapse knee Latency  Causes of Congestion Collapse  Retransmissions introduce duplicate packets  Duplicate packets consume resources wasting link capacity

Example: old TCP implementations Fwnd 2 Fwnd 1  Long haul network (i.e., large RTT)  Router drops some of TCP 2’s fwnd packets  Each discard packet will result in timeout  At timeout TCP 2 resends complete window  Cumulative ACK, timeouts fire off at “same” time  Blizzard of retransmissions can result in congestion collapse  Insufficiently adaptive timeout algorithm made things worse

What can be done in general? Avoid congestion: Increase network resources But demands will increase too! Admission Control & Scheduling Used in telephone networks Hard in the Internet because can’t model traffic well Perhaps combined with Pricing senders pay more in times of congestion Congestion control: Ask the sources to slow down; But how? How do the sources learn of congestion? What is the correct window? How to adapt the window as the level of congestion changes?

How do senders learn of congestion? Potential options: Router sends a Source Quench to the sender Router flags the packets indicating congestion Router drops packets when congestion occurs Sender learns about the drop because it notices the lack of ack Sender adjusts window

Define a congestion control window cwnd Sender’s window is set to W = min ( fwnd, cwnd) Simple heuristic to find cwnd: Sender increases its cwnd slowly until it sees a drop Upon a drop, sender decreases its cwnd quickly to react to congestion Sender increases again slowly No changes to protocol necessary! Case study: current TCP

TCP Increase/decrease algorithm AIMD: Additive Increase Multiplicative Decrease Every RTT: No drop: cwnd = cwnd + 1 drop: cwnd = cwnd /2

Additive Increase D A Src Rcvr cwnd = 1 cwnd += 1 cwnd = 2 DDAA cwnd = 3 DDAADA cwnd = 4

TCP AIMD Time Cwnd Grab capacity again Halve Cwnd Timeout because of a packet loss desired cwnd Need the queue to absorb these saw-tooth oscillations

TCP “Slow Start” D A DDAADD AA D A Src Rcvr D A AAAA  How to set the initial cwnd?  At the beginning of a connection, increase exponentially  Every RTT, double cwnd

Slow Start + AIMD Time Cwnd Slow start Additive increase Multiplicative decrease Timeout

Fairness? No! Applications don’t have to use TCP Use multiple TCP connections

Summary Controlling complexity in network systems Layering Interesting division of labors based on E2E principle Case study: Internet Interesting problems and techniques Packets Protocols … Client-server implementation Next: Application-level reliability and security