PDA

View Full Version : EWMA for calculating Estimated RTT


alman9898
Oct29-09, 09:06 PM
1. The problem statement, all variables and given/known data

For a given TCP connection, suppose 4 acknowledgments have been returned with RTTs: SampleRTT(4), SampleRTT(3), SampleRTT(2), SampleRTT(1). SampleRTT(1) is the most recent, SampleRTT(2) is the second most recent, etc.

Calculate EstimatedRTT...

2. Relevant equations

Initialize EstimatedRTT to SampleRTT(4), the first sample.

EstimatedRTT = (1-\alpha)\times EstimatedRTT + \alpha\times SampleRTT

3. The attempt at a solution

Plugging in I get...

(1-\alpha)^{3}\times SampleRTT(4) + \alpha\times(1-\alpha)^{2}\times SampleRTT(3) + \alpha\times(1-\alpha)\times SampleRTT(2) + \alpha\times SampleRTT(1)

But, EWMA is supposed to put less emphasis on older values...this seems to work for SampleRTT(3) and SampleRTT(2) but SampleRTT(4) will have a larger coefficient. I believe it's supposed to be multiplied by a factor of alpha as well, but I can't seem to find any arithmetic error and it's very annoying...am I doing it wrong or what?

For reference, alpha = .1 in this problem, but that's not exactly important, the calculations should be the same.