Presentation on theme: "3/2/2001Hanoch Levy, CS, TAU1 TCP Behavior and Performance Workshop on QoS Hanoch Levy April 2004."— Presentation transcript:
3/2/2001Hanoch Levy, CS, TAU1 TCP Behavior and Performance Workshop on QoS Hanoch Levy April 2004
3/2/2001Hanoch Levy, CS, TAU2 IP and TCP IP finds the way to send the packet sent from end to end. IP is UNRELIABLE (pkts lost + delayed) TCP: Transport Control Protocol –Above IP –Tasks: Guaranteed arrivals Flow control
3/2/2001Hanoch Levy, CS, TAU3 What / Why Flow Control Control the flow of packets out of source Purposes: –Don’t flood recipient –Don’t flood the network –Don’t send data no-body can take (“BW waste”).
3/2/2001Hanoch Levy, CS, TAU4 The General Philosophy Sender sends packets Receiver sends ACKS for packets received. ACKS serve kind of an indication regarding how much can send more. General notion: Receiver gives sender indication of how much more can be sent.
3/2/2001Hanoch Levy, CS, TAU5 TCP Sliding Window …. Offered window Sent & acked Sent not ackedCan send ASAP Cant send until W moves Advertised by receiver
3/2/2001Hanoch Levy, CS, TAU6 Window properties (fixed size) Closes when left side moves to right (packets sent by sender) Opens when right side move to right (acks by received by sender). Shrinks when right moves to left. RFC strongly opposes this – but must be able to cope with this.
3/2/2001Hanoch Levy, CS, TAU7 Window size Not “how open”. Rather – “how large”. Receiver can determine the size of the window. Measure can be by bytes/packets. TCP: bytes.
3/2/2001Hanoch Levy, CS, TAU8 Slow Start “normal start”: when starting, sender can send as much as the widow size right away. Slow Start (TCP): –Desire: rate of packets limited by rate of acks –Add a congestion window (cwnd) – to the control. –Sender can send up to the MIN of congestion window and advertised window.
3/2/2001Hanoch Levy, CS, TAU9 Congestion Window Starts at 1 (segment = about 500 bytes) Every time an ack received: Increase congestions window by 1 (segment). –Cwnd=1, pckt 1, Ack 1 –Cwnd=2, pckt 2, 3 Ack 2,3 –Cwnd = 4, pckt 4, 5, 6, 7 Ack “Exponential growth”
3/2/2001Hanoch Levy, CS, TAU10 How large should the window be Desire: fill up the pipe: That is: –Capacity (bits) = bandwidth (bit/sec) x round trip time (sec) Algorithm aim: reach that neighborhood –(by trial and error).
3/2/2001Hanoch Levy, CS, TAU11 Time out and Retransmission -A retransmission timer used when expecting an ack from receiver -How large: ‘roughly as round trip time” -Other timers: -Persist timer -Keepalive timer -2MSL timer
3/2/2001Hanoch Levy, CS, TAU12 Estimating RTT Measure for each packet sent / ack received: Record by the value M. Compute R via a smoothing factor as follows: – -Retransmission timeout (RTO)= -Where is an estimator of delay variance (recommended value =2)
3/2/2001Hanoch Levy, CS, TAU13 Variance -A more sophisticated algorithm is used -(rather than taking the fixed value) -Dynamically estimate the variance as well.
3/2/2001Hanoch Levy, CS, TAU14 Congestion avoidance: lost packets. -When sense congestion: reduce window. -Algorithm: 1.Init: cwnd 1 segment, ssthresh bytes. 2.Send: MIN of cwnd and receiver window 1.At congestion (timeout on packt, or duplicate ack): 1.Ssthresh ½ of current window 2.If duplicate ack: cwnd ssthresh 3.If timeout: cwnd 1(segment) 4.At ack reception: increase cwnd
3/2/2001Hanoch Levy, CS, TAU15 -If cwnd < ssthresh: do slow start -Increase cwnd exponentialy -Else : do congestion avoidance -Increase cwnd linearily: at most 1 segment for RTT
3/2/2001Hanoch Levy, CS, TAU16 How congestion is sensed: Duplicate acks. -At congestion loss or delayed packet. - receiver may receive out of order -TCP rule: -Sensing out of order: When receiver discovers out of order send DUPLICATE ACK -Duplicate ack == signal for sender about congestion.
3/2/2001Hanoch Levy, CS, TAU17 More sophistication -See Stevens -Papers.
3/2/2001Hanoch Levy, CS, TAU18 Questions -Is TCP behavior too noisy? -Will it be less noisy – if session interest is “selfish”?
3/2/2001Hanoch Levy, CS, TAU19 References -W. R. Stevens, “TCP/IP illustrated”, Vol I. -INFOCOM’01: 4 papers on TCP performance modeling -INFOCOM’02: 4 papers -Many others.