Department of Informatics Networks and Distributed Systems (ND) group

Slides:



Advertisements
Similar presentations
TCP Variants.
Advertisements

Simulation-based Comparison of Tahoe, Reno, and SACK TCP Kevin Fall & Sally Floyd Presented: Heather Heiman September 10, 2002.
1 TCP Vegas: New Techniques for Congestion Detection and Avoidance Lawrence S. Brakmo Sean W. O’Malley Larry L. Peterson Department of Computer Science.
Different TCP Flavors CSCI 780, Fall TCP Congestion Control Slow-start Congestion Avoidance Congestion Recovery Tahoe, Reno, New-Reno SACK.
24-1 Chapter 24. Congestion Control and Quality of Service (part 1) 23.1 Data Traffic 23.2 Congestion 23.3 Congestion Control 23.4 Two Examples.
1 Transport Protocols & TCP CSE 3213 Fall April 2015.
Congestion Control Created by M Bateman, A Ruddle & C Allison As part of the TCP View project.
1 TCP - Part II. 2 What is Flow/Congestion/Error Control ? Flow Control: Algorithms to prevent that the sender overruns the receiver with information.
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.
TCP Variations Naveen Manicka CISC 856 – Fall 2005 Computer & Information Sciences University of Delaware Nov 10, 2005 Most slides are borrowed from J.
TDC365 Spring 2001John Kristoff - DePaul University1 Internetworking Technologies Transmission Control Protocol (TCP)
Transport Layer 3-1 Transport Layer r To learn about transport layer protocols in the Internet: m TCP: connection-oriented protocol m Reliability protocol.
CSCE 515: Computer Network Programming Chin-Tser Huang University of South Carolina.
1 Spring Semester 2007, Dept. of Computer Science, Technion Internet Networking recitation #7 TCP New Reno Vs. Reno.
1 Internet Networking Spring 2002 Tutorial 10 TCP NewReno.
CSCE 515: Computer Network Programming Chin-Tser Huang University of South Carolina.
1 Internet Networking Spring 2004 Tutorial 10 TCP NewReno.
Copyright © Lopamudra Roychoudhuri
3: Transport Layer3b-1 TCP: Overview RFCs: 793, 1122, 1323, 2018, 2581 r full duplex data: m bi-directional data flow in same connection m MSS: maximum.
1 Transport Protocols (continued) Relates to Lab 5. UDP and TCP.
CSE 461 University of Washington1 Topic How TCP implements AIMD, part 1 – “Slow start” is a component of the AI portion of AIMD Slow-start.
Chapter 12 Transmission Control Protocol (TCP)
EE 122: Congestion Control and Avoidance Kevin Lai October 23, 2002.
Copyright © Lopamudra Roychoudhuri
1 TCP - Part II Relates to Lab 5. This is an extended module that covers TCP data transport, and flow control, congestion control, and error control in.
Lecture 9 – More TCP & Congestion Control
What is TCP? Connection-oriented reliable transfer Stream paradigm
CS640: Introduction to Computer Networks Aditya Akella Lecture 15 TCP – III Reliability and Implementation Issues.
Computer Networking Lecture 18 – More TCP & Congestion Control.
Lab The network simulator ns The network simulator ns Allows us to watch evolution of parameters like cwnd and ssthresh Allows us to watch evolution of.
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:
1 TCP Timeout And Retransmission Chapter 21 TCP sets a timeout when it sends data and if data is not acknowledged before timeout expires it retransmits.
CS640: Introduction to Computer Networks Aditya Akella Lecture 15 TCP – III Reliability and Implementation Issues.
1 TCP - Part II. 2 What is Flow/Congestion/Error Control ? Flow Control: Algorithms to prevent that the sender overruns the receiver with information.
1 Computer Networks Congestion Avoidance. 2 Recall TCP Sliding Window Operation.
TCP OVER ADHOC NETWORK. TCP Basics TCP (Transmission Control Protocol) was designed to provide reliable end-to-end delivery of data over unreliable networks.
Internet Networking recitation #11
TCP Timeout and Retransmission
TCP Congestion Control 컴퓨터공학과 인공지능 연구실 서 영우. TCP congestion control2 Contents 1. Introduction 2. Slow-start 3. Congestion avoidance 4. Fast retransmit.
TCP continued. Discussion – TCP Throughput TCP will most likely generate the saw tooth type of traffic. – A rough estimate is that the congestion window.
Recap Slow start introduced cwnd Slow start introduced cwnd Can transmit up to Can transmit up to min( cwnd, offered window ) Flow control by the sender.
Congestion Control CS 168 Discussion Week 7. RECAP: How does TCP set rate? How much data can be outstanding? – min{RWND, CWND} RWND: do not overload the.
CSEN 404 Transport Layer II Amr El Mougy Lamia AlBadrawy.
TCP - Part II.
DMET 602: Networks and Media Lab
TCP - Part II Relates to Lab 5. This is an extended module that covers TCP flow control, congestion control, and error control in TCP.
Chapter 5 TCP Sequence Numbers & TCP Transmission Control
TCP: Overview RFCs: 793, 1122, 1323, 2018, 2581 full duplex data:
Topics discussed in this section:
Introduction to Networks
Introduction to Congestion Control
Hojun Lee TCP enhancements Hojun Lee 11/8/2018.
Chapter 5 TCP Transmission Control
TCP - Part II Relates to Lab 5. This is an extended module that covers TCP flow control, congestion control, and error control in TCP.
Lecture 19 – TCP Performance
TCP - Part II Suman Banerjee CS 640, UW-Madison
CS4470 Computer Networking Protocols
Other Methods of Dealing with Congestion
CS 268: Lecture 4 (TCP Congestion Control)
CS640: Introduction to Computer Networks
Lecture 18 – More TCP & Congestion Control
Department of Informatics Networks and Distributed Systems (ND) group
CS4470 Computer Networking Protocols
TCP Congestion Control
EE 122: Lecture 10 (Congestion Control)
Transport Layer: Congestion Control
Computer Networks: Transmission Control Protocol (TCP)
TCP flow and congestion control
TCP: Transmission Control Protocol Part II : Protocol Mechanisms
Presentation transcript:

Department of Informatics Networks and Distributed Systems (ND) group TCP "TEB" (Timer-based Exponential Backoff): Code and Rationale Michael Welzl Net Group, University of Rome Tor Vergata 28. 11. 2017

From my last talk: what I envision SS CA Only at the beginning! Simple rules for increase/decrease events (magnitude determined by CC like before) Increase: upon ACK Decrease: upon ECN or loss Loss determined via (aggressive, not RTO!) per-packet timeout; reduce every time! Undo if we got it wrong (ACKs that shouldn't have arrived – spurious loss det.), adjust timers Avoid over-reacting: look at ACK rate + RTT No need for RTO with SS because we back-off exponentially (instead of: cwnd*=factor, then cwnd=1) Already done today with ECN !

Overview: goals Simplify, but perform no worse than TCP SACK Scoreboard logic unnecessarily complex (related to SACK processing) Using timers, implement the simplest thing that will "do the job" Maybe not "overdo" it: e.g., don't always pace Key aspects: Ignore DupACKs If SACK is enabled, SACKs are parsed; this only avoids unnecessary retransmissions) No RTO All logic based on timers Also need to pace (a little bit)

When sending a data packet... SendDataPacket_HOOK Remember the transmission time (for pacing) Remember the highest sent seqno ("highestSentSeqno") (to correctly end recovery) Insert an entry in a "TimerEntry" timer data structure (push into a FIFO queue) seqno retransCount (= global round+1, initially 0+1=1) scheduledTime: to be able to check if this is even still relevant when we see it again (needed in sim., maybe unnecessary when associated with a real timer) schedule a timeout at now+timeout (timeout value known from SYN handshake RTT estimation) Actually, linked list – for SACK only

When any ACK arrives (also SYN/ACK)... EstimateRtt_HOOK Init 0 Check: ackNo > highestAckNo ? Else it's a DupACK and we want to ignore it => exit (Can't even estimate the RTT with it) Update highestAckNo Using timestamps option, update RTT estimate For now: only let it grow (simple max) Timeout value = 2 * RTT estimate. Rationale: at worst, in slow start, the RTT doubles (but not from one packet to the next, so this should be safe) Need to allow overhead based on most recent RTT value (max lags) In the long run, max becomes the correct value (until rerouting happens: code needs to be updated for this) If SACK enabled, parse SACK: remove SACKed entries from the TimerEntry data structure Check if this ACK ends recovery: discussed later

Side note: pacing Goal avoid bursts Don't "think in slots"... Note: not so necessary when every ACK clocks out a new packet: bottleneck-based gap TEB code: (only!) after slow start, this is the time gap between timeouts Don't "think in slots"... unnecessarily complex Don't wait for "next free time slot": just ensure minimum gap TEB implementation: Calc: Input: # packets, time; Output: gap ("pacingDelay") Apply: when sending, ensure pacingDelay after previous sending or scheduling time (scheduled packet may not have yet been sent) Careful: don't re-schedule the scheduled transmission itself! Then, update previous sending and scheduling times

When a timeout happens... TebTimeout Check if anything needs to be done (check seqno stored in front queue element, remove if ACKed) ... go on if there's something left and the timer is due All of this is maybe only simulation specific Enter "recovery state": some new state name to make sure we don't, e.g., increase cwnd upon ACKs If front queue element's retransCount > global currentRetransRound (i.e., only once per RTT) reduce ssthresh (ask congestion control), set prev_ssthresh=ssthresh and cwnd=ssthresh update global round ("currentRetransRound") remember current RTT for pacing (global "pacingTimePeriod") and packetsToPace (#packets / RTT) : ssthresh/segment size Retransmit (with pacing), and remember highestRetransSeqno Else return! "&& currentRetransRound == 0" to only react once We'll need this later! To correctly end recovery

An example of pacing trouble It's t=1, we decide to pace every second remember prev. send time, prev. scheduled time when called, check: re-schedule or transmit? Is it a scheduled sending time? Is it before the next pacing time? After? If decision = schedule: next timeout: t=1.25 => we schedule this for t=2 next timeout: t=1.5 => we schedule this for t=3 next timeout: t=1.75 => we schedule this for t=4 next timeout: t=2.0 => but the packet's scheduledTime in the queue says that it isn't due for transmission yet... At least in simulations, easy to get into a re-scheduling loop Fix here: when "isn't due yet", remember "delayedTransmissionTime"; later check before deciding: re-schedule or transmit?

Checking if an ACK ends recovery EstimateRtt_HOOK End upon Condition 1: ackNo > highestSentSeqno This ACK acknowledges everything that was ever sent OR Condition 2: highestRetransSeqno >= highestSentSeqno We have retransmitted everything and only wait for an ACK now Reset some things (currentRetransRound, highestRetransSeqno, ...) and tell the simulator we're done (state = "OPEN" (CA), etc.)

What this gives us....

This is "correct": ACK tells us: no more packets in flight Available window is 9 packets Being able to handle double drops doesn't help us: our recovery has ended, this happens afterwards, and then we enter recovery again Fix: either clock out via DupACKs (ensure packets are in flight) => we didn't want this... ... or: pace after recovery

The fix in action

Almost parallel because, before loss, RTT was almost the same, and that rate was fine (so we keep it); only cwnd was too large The cwnd that we want, but not the rate that we want forever: this is cwnd after congestion / RTT (Reno: ½ the rate) Different angles here because RTT changed very fast

In comparison: normal SACK TCP Fantastic scoreboard magic 

normal SACK TCP's cwnd

How? Pacing after recovery: init EstimateRtt_HOOK – when ending recovery packetsToPace = prev_cwnd / segment size Important! Else we end up pacing forever (you'll see) Logic: keep prev (bottleneck-clocked) rate, despite reducing cwnd prevPacingTime = prevTransmissionTime Correctly initializes the next sending time doPostRecoveryPacing = true: well yes, do turn it on  postRecoveryPrevAvailWin = AvailableWindow () (special trick, explained later) ns-3's AvailableWindow – we use the case without SACK: unack = UnAckDataCount (); // Number of outstanding bytes (highest trans. seq no – highest ack no) win = min(cwnd, rwnd); return win-unack

Pacing after recovery SendPendingData_HOOK Only continue with our special code if AvailableWindow() > 0 and doPostRecoveryPacing ( and: doPostRecoveryPacing=false if AvailableWindow() = 0 ) At first, tried fixed # packets (1 window) instead of AvailableWindow()>0 => but this gives us yet another burst, AFTER our post-recovery-pacing phase Check: if state = loss recovery, end this! We may actually never really get here (which is good) Pace! ...and do a trick: if we're not fast enough, AvailableWindow() may never become 0, and we'll pace forever! so: if availableWindow has increased, increase sending rate a little (packetsToPace++)

Un-doing spurious loss recovery Same sim as before, but: timeout = 1*RTTestimate

Spurious loss recovery: how? When retransmitting a data packet, remember the latest timestamp ("retransmitTS") We're sending retransmits if currentRetransRound > 0 When detecting congestion, remember the previous state ("prev_..") before reducing cwnd and ssthresh When getting an ack (conservative: full ack only!) if(time_in_ack < retransmitTS): restore cwnd, ssthresh values, currentRetransRound - - (we can only undo one spurious event anyway, else we'd have to store a list of ssthresh/cwnd values)

Conclusion A little complex already... still, nothing compared to scoreboard magic (Possible?) future work: RTT estimation a bit too simple (won't work well with re-routing)