Post on 21-Dec-2015
TCP Models
Objective
Given the loss probability, how fast does TCP send?
Deterministic model?
Simple Stationary modeldrops
cwnd
time
wmax
wmax/2
Wmax/2* RTTData rate = cwnd/RTT
Total packet sent=Total area wmax wm ax
212
wm ax
2 3
8wmax
2
so loss probability p 1
3/8wm ax2
or wmax 83
1p
Average window size wmax wm ax
212
34wmax
or average window size 34
83
1p
32
1p
Simple Stationary modeldrops
cwnd
time
wmax
wmax/2
Wmax/2* RTT
Total packets sent wm ax
2wm ax
2 1 2 3 . . . wm ax
2
wm ax
2wm ax
2 wm ax
2wm ax
2 1 1
2
wm ax2
4 wmax
2 18
wmax14
wmax2 3
8as previously shown
0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16 0.18 0.210
0
101
102
103
probability
log
(Me
an
Cw
nd
)
ObservedLeastSquares, rhat=-0.53, chat=1.05 LeastSquares, r=-0.5, chat=1.18 r=-0.5, c=(3/2) (̂0.5}r=-0.5, c=1.31
10-4
10-3
10-2
10-1
100
100
101
102
103
probability
log
(Me
an
Cw
nd
)ObservedLeastSquares, rhat=-0.53, chat=1.05 LeastSquares, r=-0.5, chat=1.18 r=-0.5, c=(3/2) (̂0.5}r=-0.5, c=1.31
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
x 10-3
101
102
103
probability
log
(Me
an
Cw
nd
)
ObservedLeastSquares, rhat=-0.51, chat=1.15 LeastSquares, r=-0.5, chat=1.27 r=-0.5, c=(3/2) (̂0.5}r=-0.5, c=1.31
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
x 10-3
0
0.5
1
1.5
2
2.5
probability
pe
rce
nt
err
or
LeastSquares, rhat=-0.51, chat=1.15 LeastSquares, r=-0.5, chat=1.27 r=-0.5, c=(3/2) (̂0.5}r=-0.5, c=1.31
0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16 0.18 0.210
0
101
102
probability
log
(Me
an
Cw
nd
)
ObservedLeastSquares, rhat=-0.54, chat=1.01 LeastSquares, r=-0.5, chat=1.14 r=-0.5, c=(3/2) (̂0.5}r=-0.5, c=1.31
0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16 0.18 0.20
5
10
15
20
25
probability
pe
rce
nt
err
or
LeastSquares, rhat=-0.54, chat=1.01 LeastSquares, r=-0.5, chat=1.14 r=-0.5, c=(3/2) (̂0.5}r=-0.5, c=1.31
More complicated model
dW t 1RTTdt 1
2W tdN t
pw,t t 1
RTT
pw,tw w t RTTpw, t 4p2w, t
pw,t t 0 dpw
dw w 4p2w pw .
wpwp 2/11
2/1
The mth moment around the origin scales like -m/2, i.e.,
2/mm
m
C
The median scales = 1.2/1/2
=1
=0.1
=0.05=0.01 =0.005
cwnd
p(cwnd)
wpwp 2/11
2/1
C1 =1.3, C2 = 2.0, C3 = 3.5, C4 = 7.1, …0 5 10 15 20 25 300
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
The PDF of the cwnd for a Simplified TCP
10-4
10-3
10-2
10-1
100
100
101
102
103
probability
log
(Me
an
Cw
nd
)ObservedLeastSquares, rhat=-0.53, chat=1.05 LeastSquares, r=-0.5, chat=1.18 r=-0.5, c=(3/2) (̂0.5}r=-0.5, c=1.31
varw 0. 31/
varw 0.285 0.18
Distribution of cwndCwnd is nearly distributed according to the negative binomial distribution
pw N w 1 Nw 1 !
1 qNqw 1
Gamma function is factorial if argument is an integer
q 1 Ew 1
Varwand N 1 q
q Ew 1
q 1
c 1
1 and N 1 q
qc 1
1
Where: Ewm cm
m/2
E(w²)-E(w)²=(γ/δ)
c1~sqrt(3/2)
γ≈0.3
0 50 100 150 200 250 300 3500
0.002
0.004
0.006
0.008
0.01
0.012
=0.00010
observedsqrt(3/2)/1.27/() or observed mean
0 5 10 15 20 25 30 35 400
0.02
0.04
0.06
0.08
0.1
=0.01000
observedsqrt(3/2)/1.27/() or observed mean
1%
0 2 4 6 8 10 12 14 16 180
0.05
0.1
0.15
0.2
0.25
=0.05000
observedsqrt(3/2)/1.27/() or observed mean 5%
0 2 4 6 8 10 12 140
0.05
0.1
0.15
0.2
0.25
0.3
0.35
=0.10000
observedsqrt(3/2)/1.27/() or observed mean
10%
Time-out model
w, wR k maxminw/2 ,w 3 ,0
w 1w 1k
k1 w 1 k
maxminw/2 ,w 3, 0 drops out of the next w 1 packets
Rate of going to time-out =
: E w, |not TO w, ga ,b w ,
I If a flow experiences so many losses that triple duplicate acknowledgements are not received, i.e., if more thanmaxw 2, 1 losses occur in one window.
II In the case of the ns-2 implementation of TCP-SACK, if more than w/2 packets are droppedIII If a retransmitted packet is dropped.
Timeout modelIf a retransmission is not dropped (only if 1 and 2 didn’t apply).
In particular, if less than maxminw/2 ,w 3, 0 packets are dropped out of the next w 1 packets.
w, : wR
1
k maxminw/2 ,w 3 ,0
w 1w 1k
k1 w 1 k .
: E w, 2 1 R
Total rate of entering timeout is: = ’ + ’’
Time-out. Let I₁(t), denote the rate that flows enter timeout at time t
denote the rate that flows enter timeout for this second time with I2 t
The fraction of flows in timeout are t RTO
tI1 d
t 2RTO
tI2 t d
I1 t t t
1 t RTO
tI1 d
t 2RTO
tI2 t d .
#
I2 t I1 t RTO.
In steady state, I1 t and I2 t are constant.
I1 1 I1 RTO 2I2 RTO
I2 I1 .
I1 1 RTO 1 2
I2 .
1 RTO 1 2
Time out prob
T c 1
R 1 PTO MSS.
Dynamics of cwndddtw t 1
R 1
21R t Rw t Rw t
ddtw t 1
R 1
21R t Rw 2 t .
ddtw t 1
R 1
R t REwt Rwt
if proper stochastic calculus is applied, the correct dynamics for the mean are
ddtw t 1
R 1
R t Rw 2 t .Approximately:
ddtw 2 t 2
Rw t 3
41R t REw 3 t .SDE gives
Ew 3 t 83
c 12 0.31
3/2w 2 3/2
Using:
ddtw 2 t 2
Rw t 3
483
c 12 0.31
3/2
1R t R w 2 3/2
.
P TO at time t t RTO
tI1 d
t 2RTO
tI2 d
Models of slow-start are in the works