1 / 15

CS716 Advanced Computer Networks By Dr. Amir Qayyum

CS716 Advanced Computer Networks By Dr. Amir Qayyum. 1. Lecture No. 32. TCP Flow Control Issues. Problem: app. delivers tiny pieces of data to TCP e.g . telnet in character mode Each piece sent as segment, returned as ACK Very inefficient Solutions

addison
Download Presentation

CS716 Advanced Computer Networks By Dr. Amir Qayyum

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. CS716 Advanced Computer Networks By Dr. Amir Qayyum 1

  2. Lecture No. 32

  3. TCP Flow Control Issues • Problem: app. delivers tiny pieces of data to TCP • e.g. telnet in character mode • Each piece sent as segment, returned as ACK • Very inefficient • Solutions • Delay transmission to accumulate more data • Nagle’s algorithm • Send first piece • Accumulate data until first piece ACK’d • Send accumulated data and restart accumulation • Not ideal for some traffic, e.g. mouse motion

  4. TCP Flow Control Issues • Problem: slow application reads data in tiny pieces • Receiver advertises tiny window • Sender fills tiny window • Known as silly window syndrome • Solution: due to Clark • Advertise window opening only when MSS or ½ of buffer is available • Sender delays sending until window is MSS or ½ of receiver’s buffer (estimated) • Overridden by using PUSH

  5. TCP Flow Control Math • Send buffer size: MaxSendBuffer • Receive buffer size: MaxRcvBuffer • Receiving side • LastByteRcvd - LastByteRead < = MaxRcvBuffer • AdvertisedWindow = MaxRcvBuffer - (NextByteExpected - NextByteRead) • Sending side • LastByteSent - LastByteAcked < = AdvertisedWindow • EffectiveWindow = AdvertisedWindow - (LastByteSent - LastByteAcked) • LastByteWritten - LastByteAcked < = MaxSendBuffer • block sender if (LastByteWritten - LastByteAcked) + y > MaxSenderBuffer • Always send ACK in response to arriving data segment • Persist when AdvertisedWindow= 0

  6. TCP Bit Allocation Limitations • Sequence numbers vs packet lifetime • Assumed that IP packets live less than 60s • Can we send 232 (4G) bytes in 60 seconds ? • Only need a data rate of 573 Mbps! • Less than an STS-12 line... (less than Gigabit Ethernet) • Advertised window vs delay-bandwidth • Only 16 bits (64kB) for advertised window • For cross-country RTT of 100 milliseconds, adequate for a mere 5.24 Mbps!

  7. Protection Against Wrap Around • 32-bit SequenceNum Bandwidth Time Until Wrap Around T1 (1.5 Mbps) 6.4 hours Ethernet (10 Mbps) 57 minutes T3 (45 Mbps) 13 minutes FDDI (100 Mbps) 6 minutes STS-3 (155 Mbps) 4 minutes STS-12 (622 Mbps) 55 seconds STS-24 (1.2 Gbps) 28 seconds

  8. Keeping the Pipe Full • 16-bit AdvertisedWindow Bandwidth Delay x Bandwidth Product T1 (1.5 Mbps) 18KB Ethernet (10 Mbps) 122KB T3 (45 Mbps) 549KB FDDI (100 Mbps) 1.2MB STS-3 (155 Mbps) 1.8MB STS-12 (622 Mbps) 7.4MB STS-24 (1.2 Gbps) 14.8MB

  9. Adaptive Retransmission Algorithm • Original algorithm used only RTT estimate • Theory: measure RTT for each segment + its ACK • Estimate RTT • Timeout is 2 × RTT to allow for variations

  10. Adaptive Retransmission Algorithm • Practice • Use exponential moving average ( = 0.8 to 0.9) • Estimate = × estimate + (1 - ) measurement Measured RTT depends on  time

  11. Adaptive Retransmission Algorithm • Problem: it did not handle variations well • Ambiguity for retransmitted packets: was ACK in response to first, second, etc. transmission ? Measured RTT time transmission retransmission RTT ? ? ?

  12. Adaptive Retransmission (Original Algorithm) • Measure SampleRTT for each segment/ACK pair • Compute weighted average of RTT • EstRTT = a×EstRTT + b×SampleRTT • where a+b = 1 • a between 0.8 and 0.9 • b between 0.1 and 0.2 • Set timeout based on EstRTT • TimeOut=2×EstRTT

  13. Karn/Partridge Algorithm Sender Receiver Sender Receiver • Do not sample RTT when retransmitting • Double timeout (RTT estimate) after each retransmission • Still did not handle variations well • Did not solve network congestion problems as desired Original transmission Original transmission TT TT ACK Retransmission SampleR SampleR Retransmission ACK

  14. Jacobson/Karels Algorithm • Estimate variance of RTT • Calculate mean interpacket RTT deviation as an approximation of variance (Diff = RTT_estimate – measurement) • RTT_estimate = ax RTT_estimate + (1 - a )× measurement • Using another exponential moving average • Deviation = β x |RTT_estimate - measurement| + (1 - β) deviation • β = 0.25, α = 0.875 in RTT_estimate

  15. Jacobson/Karels Algorithm • Use variance estimate as component of RTT estimate • next_RTT (timeout) = RTT_estimate + 4 × deviation • Protects against high jitter • Algorithm only as good as clock granularity(500ms on Unix) • Accurate timeout mechanism important to congestion control

More Related