/
Katz, StoicaF04EECS 122:Introduction to Computer Networks TCPComputer Katz, StoicaF04EECS 122:Introduction to Computer Networks TCPComputer

Katz, StoicaF04EECS 122:Introduction to Computer Networks TCPComputer - PDF document

tatyana-admore
tatyana-admore . @tatyana-admore
Follow
381 views
Uploaded On 2015-10-12

Katz, StoicaF04EECS 122:Introduction to Computer Networks TCPComputer - PPT Presentation

Katz StoicaF04TCP Congestion Control SummaryMeasure available bandwidthSlow start fast hard on networkAIMD slow gentle on networkDetecting congestionTimeout based on RTT ID: 158117

Katz StoicaF04TCP Congestion Control SummaryMeasure

Share:

Link:

Embed:

Download Presentation from below link

Download Pdf The PPT/PDF document "Katz, StoicaF04EECS 122:Introduction to ..." is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

Katz, StoicaF04EECS 122:Introduction to Computer Networks TCPComputer Science DivisionDepartment of Electrical Engineering and Computer SciencesUniversity of California, BerkeleyBerkeley, CA 94720-1776Katz, StoicaF04The big picture (with timeouts)TimecwndTimeoutSlowStartAIMDssthreshTimeoutSlowStartSlowStartAIMDKatz, StoicaF04Congestion Detection RevisitedWait for Retransmission Time Out (RTO)RTO kills throughputIn BSD TCP implementations, RTO is usually more than 500ms-The granularity of RTT estimate is 500 ms-Retransmission timeout is RTT + 4 * mean_deviationSolution: Don’t wait for RTO to expire Katz, StoicaF04Fast RetransmitsResend a segment after 3 duplicate ACKs-Duplicate ACK means that an out-of sequence segment was receivedNotes:-ACKs are for next expected packet -Packet reordering can cause duplicate ACKs-Window may be too small to get enough duplicate ACKs21cwnd = 1cwnd = 2234cwnd = 4456733 duplicateACKs444Katz, StoicaF04Fast Recovery: After a Fast Retransmitssthresh= cwnd/ 2cwnd= ssthresh -instead of setting cwndto 1, cut cwnd in half (multiplicative decrease)For each dup ack arrivaldupack++-MaxWindow = min(cwnd+ dupack, AdvWin) -indicates packet left network, so we may be able to send moreReceive ack for new data (beyond initial dup ack)dupack= 0-exit fast recoveryBut when RTO expires still do cwnd= 1Katz, StoicaF04Fast Retransmit and Fast RecoveryRetransmit after 3 duplicated acks-Prevent expensive timeoutsReduce slow startsAt steady state, cwndoscillates around the optimal window sizeTimecwndSlow StartAI/MDFast retransmit Katz, StoicaF04TCP Congestion Control SummaryMeasure available bandwidth-Slow start: fast, hard on network-AIMD: slow, gentle on networkDetecting congestion-Timeout based on RTT•Robust, causes low throughput-Fast Retransmit: avoids timeouts when few packets lost•Can be fooled, maintains high throughputRecovering from loss-Fast recovery: don’t set cwnd=1 with fast retransmitsKatz, StoicaF04TCP Flavors TCP-Tahoe-cwnd =1 whenever drop is detectedTCP-Reno-cwnd =1 on timeout-cwnd = cwnd/2 on dupackTCP-newReno-TCP-Reno + improved fast recoveryTCP-Vegas, TCP-SACKKatz, StoicaF04TCP-SACKSACK = Selective AcknowledgementsACK packets identify exactly which packets have arrivedMakes recovery from multiple losses much easier10Katz, StoicaF04TCP VegasImproved timeout mechanismDecrease cwnd only for losses sent at current rate-avoids reducing rate twiceCongestion avoidance phase:-compare Actual rate (A) to Expected rate (E)-if E-A � , decrease cwnd linearly-if E-A , increase cwnd linearly-rate measurements ~ delay measurements-see textbook for details!11Katz, StoicaF04Standards?How can all these algorithms coexist?Don’t we need a single, uniform standard?What happens if I’m using Reno and you are using Tahoe, and we try to communicate?12Katz, StoicaF04Equation-Based CCSimple scenario-Assume a drop every k’th RTT (for some large k)-w, w+1, w+2, ...w+k-1 DROP (w+k-1)/2, (w+k-1)/2+1,... Observations:-In steady state: w= (w+k-1)/2 so w=k-1-Average window: 1.5(k-1)-Total packets between drops: 1.5k(k-1)-Drop probability: p = 1/[1.5k(k-1)]Throughput: T ~ (1/RTT)*sqrt(3/2p) 13Katz, StoicaF04Equation-Based CCIdea:-Forget complicated increase/decrease algorithms-Use this equation T(p) directly!Approach:-Measure drop rate (don’t need ACKs for this)-Send drop rate p to source-Source sends at rate T(p)Good for streaming audio/video that can’t tolerate the high variability of TCP’s sending rate14Katz, StoicaF04Question!Why use the TCP equation?Why not use any equation for T(p)?15Katz, StoicaF04CheatingThree main ways to cheat:-Increasing cwnd faster than 1 per RTT-Using large initial cwnd-Opening many connections16Katz, StoicaF04Increasing cwnd Faster Cxy&#x/Pre; ict;&#xor 1; /C;&#xolum;&#xns 9;刀&#x/Pre; ict;&#xor 1; /C;&#xolum;&#xns 9;刀17Katz, StoicaF04Increasing cwnd Faster10203040506028558210913616319021724427129832535237940643346048718Katz, StoicaF04Larger Initial cwnd     19Katz, StoicaF04Open Many ConnectionsAssume •A starts 10 connections to B•D starts 1 connection to E•Each connection gets about the same throughputThen A gets 10 times more throughput than D20Katz, StoicaF04Cheating and Game Theory15, 1535, 1010, 3522, 22 \n\r \n\rD Increases by 1 Increases by 5Individual incentives: cheating paysSocial incentives: better off without cheatingClassic Prisoner Dilemma: resolution depends on accountability !!21Katz, StoicaF04Lossy LinksTCP assumes that all losses are due to congestionWhat happens when the link is lossy?Recall that Tput ~ 1/sqrt(p) where p is loss prob.This applies even for non-congestion losses22Katz, StoicaF04Example1020304050601265176101126151176201226251276301326351376401426451476