What does is determine the rate at which the

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: the frequency response is at Ω = 0. What does α do? Clearly, large values of α mean that we are weighing the current sample much more than the existing s estimate, so there’s little memory in the system, and we’re therefore letting higher frequencies through more than a smaller value of α. What α does is determine the rate at which the frequency response of the LPF tapers: small α makes lets fewer high-frequency components through, but at the same time, it takes more time to react to persistent changes in the RTT of the network. As α increases, we let more higher frequencies through. Figure 20-4 illustrates this point. Figure 20-5 shows how different values of α react to a sudden non-persistent change in the RTT, while Figure 20-6 shows how they react to a sudden, but persistent, change in the RTT. Empirically, on networks prone to RTT variations due to congestion, researchers have found that α between 0.1 and 0.25 works well. In practice, TCP uses α = 1/8. The specific form of Equation 20.1 is very popular in many networks and computer systems, and has a special name: exponential weighted moving average (EWMA). It is 9 SECTION 20.3. ADAPTIVE RTT ESTIMATION AND SETTING TIMEOUTS Figure 20-5: Reaction of the exponential weighted moving average filter to a non-persistent spike in the RTT (the spike is double the other samples). The smaller α (0.1, shown on the left) doesn’t get swayed by it, whereas the bigger value (0.5, right) does. The output of the filter is shown in green, the input in blue. Figure 20-6: Reaction of the exponential weighted moving average filter to a persistent change (doubling) in the RTT. The smaller α (0.1, shown on the left) takes much longer to track the change, whereas the bigger value (0.5, right) responds much quicker. The output of the filter is shown in green, the input in blue. a “moving average” because the LPF produces a smoothed estimate of the average behavior. It is “exponentially weighted” because the weight given to older samples decays geometrically: one can rewrite Eq. 20.1 as sn = αrn + α(1 − α)rn−1 + α(1 − α)2 rn−2 + . . . + α(1 − α)n−1 r1 + (1 − α)n r0 , (20.3) observing that each successive older sample’s weight is a factor of (1 − α) “less important” than the previous one’s. With this approach, one can compute the smoothed RTT estimate, srtt, quite easily using the pseudocode shown below, which runs each time an ACK arrives with an RTT estimate, r. srtt ← αr + (1 − α)srtt What about the deviation? Ideally, we want the sample standard deviation, but it turns out to be a bit easier to compute the mean linear deviation instead.4 The following elegant 4 The mean linear deviation is always at least as big as the sample standard deviation, so picking a timeout equal to the mean plus k times the linear deviation has a tail probability no larger than picking a timeout equal to the mean plus k times the sample standard deviation. 10 CHAPTER 20. RELIABLE DATA TRANSPORT PROTOCOLS method performs this task: dev ← |r − srtt| rttdev ← β · dev + (1 − β ) · rttdev Here, 0 < β < 1, and we apply an EWMA to estimate the linear deviation as well. TCP uses β = 0.25; again, values between 0.1 and 0.25 have been found to work well. Finally, the timeout is calculated very easily as follows: timeout ← srtt + 4 · rttdev This procedure to calculate the timeout runs every time an ACK arrives. It does a great deal of useful work essential to the correct functioning of any reliable transport protocol, and it can be implemented in less than 10 lines of code in most programming languages! The reader should note that this procedure does not depend on whether the transport protocol is stop-and-wait or sliding window; the same method works for both. ￿ 20.4 Throughput of Stop-and-Wait We now show how to calculate the maximum throughput of the stop-and-wait protocol. Clearly, the maximum throughput occurs when there are no packet losses. The sender sends one packet every RTT, so the maximum throughput is exactly that. We can also calculate the throughput of stop-and-wait when the network has a packet loss rate of ￿. For convenience, we will treat ￿ as the bi-directional loss rate; i.e., the probability of any given packet or its ACK getting lost is ￿. We will assume that the packet loss distribution is independent and identically distributed. What is the throughput of the stop-and-wait protocol in this case? The answer clearly depends on the timeout that’s used. Let’s assume that the timeout is RTO, which we will assume to be a constant for simplicity. To calculate the throughput, first observe that with probability 1 − ￿, the packet reaches the receiver and its ACK reaches the sender. On the other hand, with probability ￿, the sender needs to time out and retransmit a packet. We can use this property to write an expression for T , the expected time taken to send a packet and get an ACK for it: T = (1 − ￿) ...
View Full Document

This document was uploaded on 02/26/2014 for the course CS 6.02 at MIT.

Ask a homework question - tutors are online