1 / 20

TCP Behavior and Performance

TCP Behavior and Performance. Workshop on QoS Hanoch Levy April 2003. IP and TCP. IP finds the way to send the packet is sent from end to end. IP is UNRELIABLE (pkts lost delayed) TCP: Transport Control Protocol Above IP Tasks: Guaranteed arrivals Flow control.

wesley
Télécharger la présentation

TCP Behavior and Performance

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. TCP Behavior and Performance Workshop on QoS Hanoch Levy April 2003 Hanoch Levy, CS, TAU

  2. IP and TCP • IP finds the way to send the packet is sent from end to end. • IP is UNRELIABLE (pkts lost delayed) • TCP: Transport Control Protocol • Above IP • Tasks: • Guaranteed arrivals • Flow control Hanoch Levy, CS, TAU

  3. 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”). Hanoch Levy, CS, TAU

  4. 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. Hanoch Levy, CS, TAU

  5. TCP Sliding Window Offered window Advertised by receiver 1 2 3 4 5 6 7 8 9 10 11 …. Sent & acked Sent not acked Can send ASAP Cant send until W moves Hanoch Levy, CS, TAU

  6. 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. Hanoch Levy, CS, TAU

  7. Window size • Not “how open”. Rather – “how large”. • Receiver can determine the size of the window. • Measure can be by bytes/packets. TCP: bytes. Hanoch Levy, CS, TAU

  8. 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. Hanoch Levy, CS, TAU

  9. Congestion Window • Starts at 1 (segment) • Every time an ack received: Increase congestions window by 1. • Cwnd=1, pckt 1, • Ack 1 • Cwnd=2, pckt 2, 3 • Ack 2 ,3 • Cwnd = 4, pckt 4, 5, 6, 7 • Ack 4 5 6 7 • “Exponential growth” Hanoch Levy, CS, TAU

  10. 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). Hanoch Levy, CS, TAU

  11. 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 Hanoch Levy, CS, TAU

  12. 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) Hanoch Levy, CS, TAU

  13. Variance • A more sophisticated algorithm is used • (rather than taking the fixed value) • Dynamically estimate the variance as well. Hanoch Levy, CS, TAU

  14. Congestion avoidance: lost packets. • When sense congestion: reduce window. • Algorithm: • Init: cwnd1 segment, ssthresh65536 bytes. • Send: MIN of cwnd and receiver window • At congestion (timeout on packt, or duplicate ack): • Ssthresh ½ of current window • If duplicate ack: cwnd  ssthresh • If timeout: cwnd  1 • At ack reception: increase cwnd Hanoch Levy, CS, TAU

  15. If cwnd < ssthresh: do slow start • Increase cwnd exponentialy • Else : do congestion avoidance • Increase cwnd linearily: at most 1 segment for RTT Hanoch Levy, CS, TAU

  16. 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. Hanoch Levy, CS, TAU

  17. More sophistication • See Stevens • Papers. Hanoch Levy, CS, TAU

  18. Questions • Is TCP behavior too noisy? • Will it be less noisy – if session interest is “selfish”? Hanoch Levy, CS, TAU

  19. References • W. R. Stevens, “TCP/IP illustrated”, Vol I. • INFOCOM’01: 4 papers on TCP performance modeling • INFOCOM’02: 4 papers • Many others. Hanoch Levy, CS, TAU

  20. References Hanoch Levy, CS, TAU

More Related