Professional Documents
Culture Documents
Introduction
To achieve the good performance for end system, the design and implementation of transport protocol takes the major part It provides the interface between applications and the network facility to get desired QoS Connection-oriented transport protocols like TCP, divide the total flow of application of data into disjoint logical streams
Introduction
It is must to allocate the resources differently among the streams Transport protocols also create rules for transmission and retransmission
Introduction
TCP Flow Control TCP Congestion Control Performance of TCP over ATM
Credit Allocation
Assume 200 octets of data are sent. A is grated an initial credit allocation of 1400 octet beginning with octet number 1001 After sending 600 octets in 3 segments, A has shrunk its window size to 800(1601 to 2400) Following the receipt of these segments, B acknowledges for all octets through 1600 and issues a credit of 1000 octets Now A can send octets through 1601 to 2600(5 seg)
Credit Policy
Receiver needs a policy for how much credit to be given to sender Conservative approach: Grant credit up to limit of available buffer space May limit throughput in long-delay situations Optimistic approach: Grant credit based on expectation of freeing space before data arrives
Normalized Throughput S
1 S =
if
W > RD / 4 W < RD / 4
4W/RD if
Complicating Factors
1. Multiple TCP connections are multiplexed over same network interface, reducing R and efficiency 2. For multi-hop connections, D is the sum of delays across each network plus delays at each router 3. If source data rate R exceeds data rate on one of the hops, that hop will be a bottleneck 4. Lost segments are retransmitted, reducing throughput. Impact depends on retransmission policy
Retransmission Strategy
TCP relies exclusively on positive ACK and retransmission on ACK timeout There is no explicit negative ACK Retransmission required when: 1. Segment arrives damaged, as indicated by checksum error, causing receiver to discard segment 2. Segment fails to Arrive To cope up with this situation there must be a timer.
Timers
A timer is associated with each segment as it is sent If timer expires before segment acknowledged, sender must retransmit Key Design Issue: Value of Retransmission Timer Too small: Many unnecessary retransmissions, wasting network bandwidth Too large: Delay in handling lost segment
Two Strategies
Timer should be longer than Round-Trip Delay (send segment, receive ack) Delay is variable
Conclusion
There will be always some uncertainty concerning the selection of best value for the retransmission timer
ARTT(K + 1) =
1
K+1 =
i=1
RTT(i)
RTT(i) Round-trip time observed for the ith transmitted segments ARTT(K) Average Round Trip Time for first K seg
Drawbacks ARTT
Each term is given equal weight, each is multiplied with the constant 1/(k+1) We have to give greater weights to more recent instants since they will reflect future behavior The method for predicting the next value on the basis of time series of past values is introduced to solve this is called exponential averaging
Exponential Averaging
Smoothed Round-Trip Time (SRTT) SRTT(K + 1) = SRTT(K) + (1 ) RTT(K + 1) takes the value of 0< <1 The expansion of previous equation
SRTT(K + 1) = (1 ) RTT(K + 1)+ (1- )RTT(K)+ 2(1- )RTT(K-1)+.. SRTT(K+1)=0.2 RTT(K+1)+0.16 RTT(K)+0.128 RTT(K-1) Where =0.8
UB, LB: pre-chosen fixed upper and lower bounds Example values for , : 0.8 < < 0.9 1.3 < < 2.0
Send Policy
If the transmissions are infrequent and large there is a low overhead in terms of segment generation and processing If the transmission are frequent and small, the system must provide quick response Danger is Silly Window Syndrome
Silly Window
Caused by poorly-implemented flow control. If a Receiver with this problem is unable to process all incoming data, it requests that its sender reduce the amount of data they send at a time (the window setting on a packet).
Silly Window
If the server continues to be unable to process all incoming data, the window size becomes smaller and smaller, sometimes to the point that the data transmitted is smaller than the packet header, making data transmission extremely inefficient. The name of this problem is due to the window size shrinking to a "silly" value.
Deliver Policy
If the deliveries are infrequent and large , the user is not receiving the data on time as may be desirable If the deliveries frequent and small, there is the unnecessary processing both in TCP,in user software and in operating system system
Accept Policy
When all data segments arrive in order over a TCP connection, TCP places the data in the receiver buffer for the delivery to the user It is also possible in out of order In-Order: Accept only segments that arrive in order, any segment that arrive out-order is discarded In-Window: Accept all segments that are within the receive window.
Retransmit Policy
TCP maintains a queue of segments which are sent but not yet acknowledged. First Only: Maintain one retransmission timer for the entire queue. If ACK is received, remove the particular segment from the queue and reset the timer If the timer expires, retransmit the segment at the front of queue and reset the timer
Retransmit Policy
Batch Maintain one retransmission timer for the entire queue. If ACK is received, remove the particular segment from the queue and reset the timer If the timer expires, retransmit all the segments in the queue and reset the timer
Retransmit Policy
Individual Maintain one retransmission timer for the entire queue. If ACK is received, remove the particular segment from the queue and destroy the corresponding timer If the timer expires, retransmit corresponding segment individually and reset its timer
Acknowledge Policy
When data segment arrives in sequence, the receiving TCP entity has two options concerning the timing of ACK Immediate: When the data is accepted, immediately transmit an empty segment(no data) containing the ack number Cumulative: When the data are accepted, record the need for ack, but wait for outbound segment with data on which to piggyback the ack. To avoid long delay set a window timer
Here the slowest link in the network is relatively wide about half the data rate of the source The pipe at the destination is narrow Here the ACK can be emitted at a rate equal to the absorption capacity Here the source has no knowledge of pacing (speeding) rate of the internet (congestion) or the status of the destination(flow control)
If the ACK arrive relatively slowly due to network congestion, it is advisable for the source to transmit more slowly than ACK pace The bottleneck along a round-trip path between source and destination can occur in variety of places and be either physical or logical
1. 2. 3. 4. 5. 6. 7.
RTT Variance Estimation Exponential RTO Backoff Karns Algorithm Slow Start Dynamic Window Sizing on Congestion Fast Transmit Fast Recovery
Jacobson s Algorithm
SRTT(K + 1) = (1 g) SRTT(K) + g RTT(K + 1) SERR(K + 1) = RTT(K + 1) SRTT(K) SDEV(K + 1) = (1 h) SDEV(K) + h |SERR(K + 1)| RTO(K + 1) = SRTT(K + 1) + f SDEV(K + 1) g = 0.125 h = 0.25 f = 2 or f = 4 (most current implementations use f = 4)
Karn s Algorithm
Do not use measured RTT to update SRTT & SDEV Calculate backoff RTO when a retransmission occurs Use backoff RTO for segments until an ACK arrives for a segment that has not been retransmitted Then use Jacobsons algorithm to calculate RTO
Window Management
Slow start Dynamic window sizing on congestion Fast retransmit Fast recovery Limited transmit
Slow Start
awnd = MIN[ credit, cwnd] where awnd = allowed window in segments cwnd = congestion window in segments credit = amount of unused credit granted in most recent ack cwnd = 1 for a new connection and increased by 1 for each ACK received, up to a maximum
Dynamic Window Sizing on Congestion A lost segment indicates congestion Prudent to reset cwsd = 1 and begin slow start process May not be conservative enough: easy to drive a network into saturation but hard for the net to recover (Jacobson) Instead, use slow start with linear growth in cwnd
Fast Retransmit
RTO is generally noticeably longer than actual RTT If a segment is lost, TCP may be slow to retransmit TCP rule: if a segment is received out of order, an ack must be issued immediately for the last in-order segment Fast Retransmit rule: if 4 acks received for same segment, highly likely it was lost, so retransmit immediately, rather than waiting for timeout
Fast Recovery
When TCP retransmits a segment using Fast Retransmit, a segment was assumed lost Congestion avoidance measures are appropriate at this point E.g., slow-start/congestion avoidance procedure This may be unnecessarily conservative since multiple acks indicate segments are getting through Fast Recovery: retransmit lost segment, cut cwnd in half, proceed with linear increase of cwnd This avoids initial exponential slow-start
Limited Transmit
If congestion window at sender is small, fast retransmit may not get triggered, e.g., cwnd =3
1. Under what circumstances does sender have small congestion window? 2. Is the problem common? 3. If the problem is common, why not reduce number of duplicate acks needed to trigger retransmit?
Observations
If a single cell is dropped, other cells in the same IP datagram are unusable, yet ATM network forwards these useless cells to destination Smaller buffer increase probability of dropped cells Larger segment size increases number of useless cells transmitted if a single cell dropped
Selective Drop
Ideally, N/V cells buffered for each of the V virtual circuits W(i) = N(i) = N(i) V N/V N If N > R and W(i) > Z then drop next new packet on VC i Z is a parameter to be chosen