|
Situation:
|
|
Assumption:
|
E[n] = average number of TD periods in one Reno cycle |
1 + 2 * (1-Q) + 3 * (1-Q)2 + 4 * (1-Q)3 + ... maple: sum( k* (1-Q)^(k-1), k=1..infinity); answer: 1 ---- 2 Q |
1 E[n] = Q * --- Q2 1 = --- . . . . . . . . . . . . . . . . . . . . . . (1) Q |
Before we discuss how to compute Q, we need to compute 2 probability values |
|
|
Definition:
|
A(W, k) = Prob [ first k packets not lossed | loss in W packets ] |
Definition:
|
|
|
means:
|
When m < n, C(n, m) is equal to:
C(n, m) = Prob [ (first m packets NOT lossed) AND (packet m+1 lost) ] = (1 - p)m * p |
|
means:
|
When m = n, C(n, m) is equal to:
C(n, m) = Prob [ (all m packets NOT lossed) ] |
Recall the definition of Q:
|
|
|
We will illustrate the cases in more detail....
Notes:
|
Notes:
|
It should be obvious now that Reno will receive < 3 duplicate ACKs in this case also...
|
|
Note:
|
to determine Q(W) .
Q(W) = the probability that a TD period with CWND = W ends in Timeout |
Case 1: W ≤ 3
Q(W) = 1 (if W <= 3) . . . . . . . . . . . . . . (4a) |
(Because Reno will certainly ends in timeout....)
Case 2: W ≥ 4
Q(W) = probability that a TD period with CWND = W ends in Timeout = Prob[ (packet 1 in window lost) OR (packet 2 in window lost) OR (packet 3 in window lost) OR (packet 4 in window lost AND (packet 1, 2 or 3 in retrans lost) OR (packet 5 in window lost AND (packet 1, 2 or 3 in retrans lost) OR ... OR (packet W in window lost AND (packet 1, 2 or 3 in retrans lost) ]
Therefore: Q(W) = Prob[ packet 1 in window lost ] + Prob[ packet 2 in window lost ] + Prob[ packet 3 in window lost ] + Prob[ packet 4 in window lost ] * Prob[ packet 1, 2 or 3 of 3 packets lost] + Prob[ packet 5 in window lost ] * Prob[ packet 1, 2 or 3 of 4 packets lost] + ... + Prob[ packet W in window lost ] * Prob[ packet 1, 2 or 3 of W-1 packets lost] ]
Hence: Q(W) = A(W, 0) + A(W, 1) + A(W, 2) + A(W, 3) * Prob[ packet 1, 2 or 3 of 3 packets lost] + A(W, 4) * Prob[ packet 1, 2 or 3 of 4 packets lost] + ... + A(W, W-1) * Prob[ packet 1, 2 or 3 of W-1 packets lost] ]
We have: Q(W) = A(W, 0) + A(W, 1) + A(W, 2) + A(W, 3) * ( C(3,0) + C(3,1) + C(3,2) ) + A(W, 4) * ( C(4,0) + C(4,1) + C(4,2) ) + ... + A(W, W-1) * ( C(W-1,0) + C(W-1,1) + C(W-1,2) ) In summary: Q(W) = A(W, 0) + A(W, 1) + A(W, 2) W-1 2 ---- +- ---- -+ \ | \ | + > | A(W, k) * > C(k, m) | . . . . . . . (4b) / | / | ---- +- ---- -+ k=3 m=0 |
We use Maple to obtain a simplified expression for Q(W) as follows:
Define A(W,k) (see: click here ) > A := (1-p)^k*p/ (1 - (1-p)^W); k (1 - p) p A := ------------ W 1 - (1 - p) |
> limit(Q, p=0, left); 3/W |
|
Q = Q(1) * Prob[ W = 1 ] + Q(2) * Prob[ W = 2 ] + Q(3) * Prob[ W = 3 ] + Q(4) * Prob[ W = 4 ] + .... (upto infinity) . . . . . . . . . . . (6) |
|
E[W] = 1 * Prob[ W = 1 ] + 2 * Prob[ W = 2 ] + 3 * Prob[ W = 3 ] + 4 * Prob[ W = 4 ] + .... (upto infinity) |
So luckily:
|
|
Approximation trick:
E[ f(W) ] ≅ f( E[W] ) . . . . . . . . . . . (7) |
Clarification:
|
(Prob[ W = w ]) ( Q(W) ) | Probability | Probability that | that TCP uses | TCP using CWND = w w | CWND = w | ends in Timeout -------------+------------------+--------------------- 1 | 0.1 | 0.1 2 | 0.4 | 0.3 3 | 0.3 | 0.6 4 | 0.2 | 0.9 |
Q = Q(1)*P[W=1] + Q(2)*P[W=2] + Q(3)*P[W=3] + Q(4)*P[W=4] Q = 0.1*0.1 + 0.3*0.4 + 0.6*0.3 + 0.9*0.2 Q = 0.01 + 0.12 + 0.18 + 0.18 Q = 0.49 |
(But we can't do it this way, because the value Prob[W=w] are too hard to obtain)
Q = E[Q(W)] ≅ Q( E[W] ) . . . . . . . . . . . (7) |
How to use the approximation trick:
1. Find the function Q(x) that has the following function values: Q(1) = 0.1 Q(2) = 0.3 Q(3) = 0.6 Q(4) = 0.9 The common way is to use polynomial interpolation With Maple: > f := interp([1,2,3,4], [0.1, 0.3, 0.6, 0.9], w); > Q := unapply(f, w); 3 2 -0.01666666667 w + 0.1500000000 w - 0.1333333333 w + 0.1 Double check: > Q(1); 0.1 > Q(2); 0.3000000000 > Q(3); 0.6000000000 > Q(4); 0.8999999998 |
|
2 W W 2 3 p (3 - 3 p + p ) ((1 - p) - (1 - p) p - 2 + 3 p - 3 p + p ) Q(W) = -------------------------------------------------------------- ....... (5) W -1 + (1 - p) |
-------------------------- / 2+b / 8(1-p) 2+b 2 E[W] = ----- + \ / -------- + ( ----- ) . . . . . . . . (13) 3b \/ 3bp 3b This was formula (13) in Padhye's paper |
It is very messy....
Even Padhye did not venture to write the result out, so I will skip it also :-)
(BTW, we are on page 6 of Padhye's paper: click here )
1 E[n] = --- . . . . . . . . . . . . . . . . . . . . . . (1) Q Q = E[Q(W)] ≅ Q( E[W] ) . . . . . . . . . . (7) |