View
219
Download
4
Tags:
Embed Size (px)
Citation preview
Estimating Congestion in TCP Traffic
Stephan Bohacek and Boris Rozovskii University of Southern California
Objective: Develop stochastic model of TCPNecessary ingredients: Models of the network. Specifically packet drop probability and roundtrip time. The model parameters are indicators of congestion.
Outline
• A very brief introduction to TCP
• Modeling packet drop probability– Modeling roundtrip time– Dynamics of drop probability parameters
• A diffusion model of roundtrip time– Estimating the model parameters
• Stochastic models of TCP
• Results and insights
An Introduction to TCP
• TCP is acknowledgment based. The sender sends a packet of data. When the receiver receives the packet, it responds by sending an acknowledgment packet to the sender.
• If the sender fails to receive an acknowledgment, it assumes that the packet has been dropped and decreases the sending rate.
• If the sender receives an acknowledgment, it assumes that the network is not congested and increases the sending rate.
• The congestion window, X, defines the maximum number unacknowledged packets.
• When the sender receives an acknowledgment it increases the congestion window by 1/[Xt].
• When a packet drop is detected, the sender divides the congestion window in half.
Some TCP Details
Note: the congestion window is not the sending rate. sending rate = congestion window / roundtrip time.
Number of unacknowledgedpackets equals Cwnd. Send no more packets.
How the Congestion Window Increases
send pkt Asend pkt Bsend pkt Csend pkt D
X=4
ack A
ack B
ack C
ack Dsend pkt Esend pkt Fsend pkt Gsend pkt Hsend pkt F
X=4.25X=4.5X=4.75X=5
time
Packet arrives at receiver.Receiver sends an acknowledgment.
roundtriptime
Time Series of the Congestion Window(simulation)
50 55 60 65 70 75 80 850
5
10
15
20
25
30
35
40
45
50
Seconds
Con
gest
ion
Win
dow
linear increasewhen no drops occur
divide by two when a drop is detected
Time Series of the Congestion Window (simulation)
50 100 150 200 250 300 350 400 450 5000
5
10
15
20
25
30
35
40
45
50
Seconds
Con
gest
ion
Win
dow
Stochastic model of TCP•Stochastic model of packet drops.•Stochastic model of the roundtrip time.
Drop Models
• Ott (1997) considered deterministic drops.• Padhye (1998) assumed drops to be highly correlated over short
time scales, but independent over longer time scales.• Altman (2000) assumes drops are bursty.• Altman (2000) drop events are modeled as renewal processes with
particular examples, deterministic, Poisson, i.i.d., and Markovian.• Savari (1999) drop events are modeled as Poisson where the
intensity depends on the window size of the TCP protocol.
Models for Packet Drop Probability
0 ,,,,, dRSKRSg tttt
ttt
tt
tt
ttt
ttt RScRbSaSaaRSg 112
210,,
Let St be the sending rate at time t.Let Rt be the roundtrip time experienced by a packet sent at time t.Let t be the congestion level at time t.Let g be the probability that a packet is dropped
general model
memoryless
2210, t
tt
tttt RaRaaRg
depends on roundtrip time only
Preliminary work indicates that, for reasonable sending rates, the drop probability mostly depends on roundtrip time.
Since drops are rare, it is difficult to collect data for slow sending rates.
* *
Determining the Conditional Drop Probability
1
111
||
|,||,
ktktktk
ktktktktkktktk
RRpRdP
RRpRRdPRRdp
ktktkt
ikt
n
ii
ktktktikt
n
ii
ktktktkt
ktktktktkktktktkktk
dRRRpRa
dRRRpRa
dRRRpRg
dRRRpRdPdRRRdpRdp
10
10
1
111
|
|
|
|||,|
system of linear equations
time.roundtrip for the iesprobabilitn transitio the- |
timeroundtrip a experiencepacket past given the
dropped ispacket next y that theprobabilit the- |
1
1
1
ktkt
kt
ktk
RRp
R
Rdp
observable
assume the congestion level, , is constant
We assume that given Rtk, dk is independent of Rtk-1
End-to-end model with many queues
q1t q2
t qn-1t qn
tsource destination
queues
queuing delay at time t = D1
t
queuing delay at time t = Dn-1
t
kTk DTD 1
2th is queue second in thepacket k by the dexpereincedelay The
kTD1th is queuefirst in thepacket k by the dexpereincedelay The
prop
kTn D kT
n
kTD kT
D kTD kT kT
D kT kTkT D D D D RTT
...
1 ... 12 1
31
2 1...
The kth is sent at time Tk
propagation delay
Modified Diffusion Approximation for a Single Queue
oo dtdDPdtdF ,|,,
otherwise 0
for ,,2
2
,tdd
t
mtdde
t
mtdddtdF o
o
md
o
om
t
mtdd
xo
o
dxet
mtdd
2
2
2
1
Histogram of Observed RTT Increments (real data)
Gaussian (RTT0=28)Queue empties slowly
Queue empties quickly
Agrees with queuing theory(Diffusion Approximation)
Observed and Smoothed Conditional Drop Probabilities
16 18 20 22 24 26 28 30-0.005
0
0.005
0.01
0.015
0.02
0.025
Roundtrip Time
16 18 20 22 24 26 28 300
0.005
0.01
0.015
0.02
0.025
Roundtrip Time
observed conditional drop probability
smoothed conditional drop probability
night
12 noon
3pm6pm
P(D
rop
| Rou
ndtr
ip T
ime
)P(D
rop
| Rou
ndtr
ip T
ime
)
9am
Drop Model Parameter Variation
1
5
10
15
x 10-3 Drop Model Parameter Variation
X 1
1
0
10
20x 10
-3
X 2
1-20
-10
0
x 10-3
X 3
1-10
-50
5
x 10-3
Monday Tuesday Wednesday Thursday Friday Saturday Sunday
X 4
g(Rt, t) = 0(t) + 1( ) T1(R) + 2( ) T2(R) + …
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5-1
0
1
2x 10
-7
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5-2
0
2
4x 10
-7
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5-1
0
1
2x 10
-7
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5-5
0
5x 10
-7
Time (hours)
Autocorrelation of the Increments of the Drop Probability Parameters
Iit := i(t+1) - i(t) - increments
E(I0t I0t+)
E(I1t I1t+)
E(I2t I2t+)
E(I3t I3t+)
It appears that the increments are uncorrelated.
Transition Probability for Drop Model Parameter
1
1
Transition Probabilities for X10.000
0.0000.007
0.007
0.014
0.014
0.020
0.020
0.027
0.027
0.034
0.034
0.041
0.041
0.047
0.047
0.054
0.054
0.061
0.061
0.068
0.068
It appears that the transition probability is spatially homogenous.
controls the rate at which the transition probability converges to the stationary distribution.
trrpr
trprr
trpt
,,2
,2
22
A Simple Stochastic Model of the Roundtrip Time
tttt dBRdtRdR
2
2
CIR Model (short-term interest rates)
0for on Distributi Stationary 1
xexxp x
Note that the stationary distribution does not depend on .
forward equation
Define Rt to be the queuing delay. Roundtrip time – propagation delay
mean reverting mean = /
similar to gamma
distribution
Estimation of , , and (many approaches)
tttt dBRdtRdR
td
X
XdX
X
X
dP
dP T
t
tTt
t
t 0 2
2
0 2,0,0
,,
2
1
Tt
T
t
Tt
t
T
tT
T
t
Tt
t
dtXdtX
T
dXX
TdtX
X
dtX
dXX
T
002
00
0
0
1
11
1
1
likelihoodratio
maximum likelihoodestimates
note the change in representation
Estimation of , , and
tttt dBRdtRdR 2
2
tt
n
kkt
RR
Rpn
log1loglog
log 1
likelihood logn
1
1
Select a set of observations {Rtk} where tk << tk+1 Hence, {Rtk} are approximately i.i.d.
tt RR loglog'
log
tR
the maximum likelihood estimates
satisfy
mean of Rt
mean of log( Rt )
under the independence assumption
Estimating Diffusion
tttt dBRdtRdR
tttt dBRdtRdR 2
2
2
2
Estimation of , , and
qorder of kindfirst theoffunction Bessel modified
1/2: , ,: ,1/2:
2,,;|
2
2/12/
q
tt
ot
q
qvu
ot
I
qcRvecRuec
uvIu
vceRRp
The transition probability is known
Computationally difficult
n
kktkt
RRp0
1* ,,;|logminarg:
and are found as before and
0 2 4 6 80
0.05
0.1
0.15
0.2
0.25
0.3
0.35
0.4
0.45
0.5Fitted Measured
0 2 4 6 8 10 12 140
0.05
0.1
0.15
0.2
0.25Fitted Measured
Roundtrip Time Quasi-stationary DistributionNight Midday
50 55 60 65 70 75 80 85 90 95 1000
0.01
0.02
0.03
0.04
0.05
0.06
0.07
0.08
ns-2 simulation
RTT
P(R
TT
)
Observed RTT Dist Fitted RTT Dist
RTTRTT
P(R
TT
)
P(R
TT
)
Basic Stochastic Model of TCP
tt
proptt dN
Xdt
TRdX
2
1
Nt is a Cox process with intensity n(Rt, Xt, t)
tttt dBRdtRdR 2
2
n(Rt, Xt, t) = Xt / Rt · g(Rt, Xt, t)
Sending Rate = Xt / Rt = Packets per RTT / Seconds per RTT = Packets / Second
Drop Probability = g(Rt, Xt, t)
Xt – congestion windowRt + Tprop – roundtrip time
drop probability
Stochastic Model of TCPwith fast recovery
tttt
tpropttWtWt
tt
propttWt
dBRdtRdR
dNTRdtdW
dNX
dtTR
dX
2
11
2
11
2
00
0
After a drop is detected, the congestion window, X, is halved and remains constant until the dropped packet is resent and acknowledged.
• A drop is detected at t=0, so W0=R0
• Wt > 0 for 0 < t < R0
• WRo = 0 and the congestion window
continues to increase until the next
drop occurs.
fast recovery
Stochastic Model of TCPwith fast recovery and time-out
tttt
ttpropttWtWt
tttt
propttWt
dBRdtRdR
dTdNTRdtdW
dTXdNX
dtTR
dX
2
11
12
11
2
0
0
When a time-out occurs, the congestion window is set to 1.
The Forward Equation
trxpxrntrwxpxrn
trwxpw
trwxpxTr
trwxrpr
trwxprr
trwxpt
propTrww
wwprop
,,0,22,21,,,,1
,,,1,,,11
,,,2
1,,,
2,,,
0
00
22
22
tdrdwdxPrwx
trwxp
CRBWAXPtCBAP ttt
,,,,,,Let
,,:,,,Let 2
No Time-outsStationary environment (model parameters are constant)
Assumptions:
Midday RTT and Drop Data
0 5 10 15 20 25 300
0.02
0.04
0.06
0.08
0.1
0.12Marginal Density p(X)
X - Congestion Window
p
15 20 25 300
5
10
15
20
25
30
X -
Co
ng
est
ion
Win
do
w
R - Roundtrip Time
Marginal Density p(X,R)
= 4, = 0.85, = 0.5
0 2 4 6 8 10 12 140
0.05
0.1
0.15
0.2
0.25
RTT
Pro
b(R
TT
)
Fitted Measured
0 2 4 6 8 10 12 140
0.005
0.01
0.015
0.02
0.025
0.03
RTT
drop
pro
b
Fitted Measured
Drop Probability
Roundtrip Time Stationary Distribution
ns-2 (network simulator)topology
Source 1 2 3 4 5 Destination
A B DC
S T U V
Competing TCP Sources
ns-2 Simulation
20 30 40 50 60 700
5
10
15
20
25
30
X -
Con
gest
ion
Win
dow
R - Roundtrip Time
Marginal Density p(X,R)
= 2, = 0.17, = 0.34
0 5 10 15 20 25 30 35 40 45 500
0.01
0.02
0.03
0.04
0.05
0.06
0.07
RTT
P(R
TT
)
Fitted Measured
50 60 70 80 90 100 110-0.005
0
0.005
0.01
0.015
0.02
0.025
0.03
0.035
0.04
0.045
RTT
dro
p p
rob
Drop Probability
Roundtrip Time Stationary Distribution
0 10 20 30 40 500
0.01
0.02
0.03
0.04
0.05
0.06
0.07current Simulated
Marginal Density p(X)
The Dependence on Drop Probability
0 5 10 15 20 25 300
0.02
0.04
0.06
0.08
0.1
0.12
0.14
0.16
0.18
X - Congestion Window
p
Drop Prob Scale = 0.75Drop Prob Scale = 1.0 Drop Prob Scale = 1.25Drop Prob Scale = 1.5 Drop Prob Scale = 1.75Drop Prob Scale = 2.0
10-3
10-2
10-1
100
101
102
The TCP Friendly Rule
p1/2
RT
T
Se
nd
ing
Ra
te =
Co
ng
es
tion
Win
do
w
Drops are modeled as a Cox process with intensity
n(Rt, Xt, t) = Xt / Rt · g(Rt, Xt, t) • Scale
Dependence on
10-2
101
The TCP Friendly Rule
p1/2
RT
T
Se
nd
ing
Ra
te =
Co
ng
es
tion
Win
do
w
0 5 10 15 20 25 300
0.02
0.04
0.06
0.08
0.1
0.12
X - Congestion Window
p
= 0.069 = 0.138 = 0.275 = 0.413 = 0.551 = 0.688 tttt dBRdtRdR
2
2
15 20 25 300
5
10
15
20
25
X -
Co
ng
est
ion
Win
do
w
R - Roundtrip Time
Marginal Density p(X,R)
= 0.07
recall that controls the rate at which the transition probability converges to the stationary distribution
0 5 10 15 20 25 30
0
0.02
0.04
0.06
0.08
0.1
0.12Conditional Probability Density p(X | RTT)
Sending Rate
p
compatiblesending rate
Application to Variable Bit Rate Video Transmission
TCP Friendly – Send data at a rate similar to the rate that TCP would.
When the video image changes quickly, the bit rate increases and the sending rate must also increase.The “compatibility” with TCP’s sending rate can the judged by examining the probability density function of the congestion window.
Future Work
• Better models: dynamic models that depend on the past sending rate.– For example:
• Suppose that the sending rate is initially high. Then other TCP flows should decrease their sending rate.
• If the sending rate suddenly decreases, then there is temporarily extra capacity and there should be few drops (maybe).
• Time-out and slow start.• Doubly stochastic processes: Allow the parameters to vary
with time.• More accurate roundtrip time models• Experimental verification• More data, do general models for drop probability exist?
Conclusions
• System theoretical (input/output) view point to the Internet is valid.– Drop probability models– Roundtrip time models (queuing theory works!)
• Stochastic models – seem to accurately predict the TCP in complex
networks.– give useful insight into the performance of TCP
(e.g. the dependence on )– might be for other types of congestion control
(e.g. VBR video)