Modeling TCP Congestion Control Don Towsley UMass Amherst [email protected] collaborators: T. Bu,...
-
Upload
clement-flynn -
Category
Documents
-
view
215 -
download
0
Transcript of Modeling TCP Congestion Control Don Towsley UMass Amherst [email protected] collaborators: T. Bu,...
Modeling TCP Congestion Control
Don Towsley UMass Amherst
collaborators: T. Bu, W. Gong, C. Hollot, V. Misra
Outline
• motivation• TCP primer • bottleneck invariance principle
– instability of RED active queue management– fixed point approximations of TCP networks
• transient analysis of TCP networks– stochastic differential equations
• summary
Properties of TCP• 90% of Internet traffic• conservative end-end congestion control
(CC)– equal bandwidth share– additive increase multiplicative decrease CC
• only end-end protocol with congestion control
20Mbs B1=5MbsB2=5Mbs
B3=5Mbs
B4=5Mbs
12
3
4
TCP
20Mbs B1= 2MbsB2= 2MbsB3= 2MbsB4= 2Mbs
1234
UDP-12Mbs
TCP{12Mbs
TCP can be pushed around
Properties of TCP• 90% of Internet traffic• conservative end-end congestion control
(CC)– equal bandwidth share– additive increase multiplicative decrease CC
• only end-end protocol with congestion control
Need to understand TCP in network setting
Additive-Increase Multiplicative-Decrease (AIMD) Congestion Control
ri - rate after i-th feedback
ri+1 = ri + c if i-th feedback is no congestion
ri+1 = a x ri if i-th feedback indicates congestion, a<1
• similar algorithms for window-based CC• basic building block of most congestion
control algorithms (e.g., TCP)
ri 1
r i2
C
C
(r1,r2)
• two sources, rates ri1,ri
2
. ..
(Chiu,Jain 89)
• initial rates r1 and r2
• bandwidth C
AIMD and Fair Share
• as time goes on, i increases, source rates converge to a fair share
Generic TCP Behavior
• window algorithm (window W )– up to W packets can be in network– return of ACK allows sender to send another
packet– ACKS cumulative
• increase window by one per RTT W W +1/W per ACK
W W +1 per RTT• seeks available network bandwidth
sender
receiver
W
Generic TCP Behavior
• window algorithm (window W)• increase window by one per RTT
W W +1/W per ACK• loss indication of congestion • decrease window by half on detection of
loss (triple duplicate ACK), W W/2
sender
receiver
TD
Generic TCP Behavior
• window algorithm (window W)• increase window by one per RTT
W W +1/W per ACK• halve window on detection of loss, W
W/2• timeouts due to lack of ACKs window
reduced to one, W 1
sender
receiver
TO
Generic TCP Behavior
• window algorithm (window W)• increase window by one per RTT (or one over
window per ACK, W W +1/W)• halve window on detection of loss, W W/2• timeouts due to lack of ACKs, W 1• successive timeout intervals grow
exponentially long• slow start mechanism• provides fair share, full use of bandwidth
Early Models
• B(p,R) - TCP session throughput– p - loss probability– R - avg round trip time
• equilibrium analysis of AIMD
B (p,R ) 1/R (1/p )1/2
• equilibrium analysis incl. timeouts (PFTK98)
B (p,R ) [R (4p/3)1/2 +
T0 3(3p/4)1/2p (1+32p 2)]-1
– T0 - timeout length
ValidationExperiments:
– 38 traces from 18 hosts– unidirectional bulk transfers– 100sec measurements
Observations:– many timeout loss
events
Conclusions:– good validation– other studies support model– insensitive to TCP version
F
F
FF
F
F
F
FF
FF
F
FFFF
F
FFFFFFFF
FFFFF
1
10
100
1000
10000
0.001 0.01 0.1 1
Loss probability (p)
F Measured
Full Model
Floyd/Ott Model
UMass - UMaryland
Pac
kets
/s
MeasuredPFTKp1/2 model
FF
F
FF
FFFFFF
FFFFFFFF
FFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
0.01
0.1
1
10
100
0.001 0.01 0.1 1
Loss probability (p)
F Measured
Full Model
Floyd/Ott Model
UMass - INRIA
Pac
kets
/s
Measured
PFTK p1/2 model
Lessons
• TCP exhibits well defined bandwidth curve– decreasing function of R and p
• timeouts important• little difference between TCP versions
– AIMD, timeouts– Vegas an exception
Bottleneck invariance principle
• bottleneck router– loss, high load, util. 1
• bottleneck invariance principle (BIP)
i Bi (Ri ,p) = C C - router bandwidth
Bi - throughput of flow i
Applications of BIP
• provides simple checks of protocol design– active queue management, RED– new improved congestion control algorithms
• accurate models of networks supporting infinite/finite duration TCP flows– thruput, loss rate, avg. queue length, …
Active queue management
• drop tail - drop pkt when buffer fills• active queue management (AQM)
– proactively drop/mark packets before buffer overflow
– example: drop pkt with probability p(x) x - avg. queue length
RED (Random Early Detect)
RED: marking/dropping based on average queue length x (t )
tmin tmax
pmax
1
2tmax
mark
ing p
rob p
avg queue length x
t
- q (t )- x (t )x (t) : smoothed, time averaged q (t)
x (ti +1) = q (ti +) + (1-) x (ti)
RED discard function
• RED queue
N
N1 < N2
N2
• N identical TCP sourcesB(R,p) = C/N
C
• p increases with N
pmax
tmax
N1
N1
N3
N2 < N3
?N4
N3 < N4
RED discard function
• RED queue
N• N identical TCP sourcesB(R,p) = C/N
C
• p increases with N
pmax
tmax
N4tmax
queue length
RED discard function
• RED queue
N
(Firoiu, Borden, 00)
• N identical TCP sourcesB(R,p) = C/N
C
• p increases with N
• once p > pmax, queue oscillates around tmax
RED unstable!pmax
tmax
Improved RED
tmin tmax
pmax
1
discontinuity removed in gentle_ variant
2tmax
Mark
ing p
rob.
p
Avg queue length x
Stationary Behavior: single bottleneck
1
N
• N infinite sourceTCP sessions
• one bottleneck link– AQM; avg. queue length q, discard prob.
p(q)– bandwidth C
• R (q) = R0 + q /C (round trip time)
B (p(q ), R (q )) = C /N
Single bottleneck
• solve a fixed point problem for q• unique solution provided B is monotonic
and continuous
• resulting q can be used to obtain Ri and p
• preliminary evaluation results good
Results: single Bottleneck
• N TCP flows • two-way prop. delay 18+2i ms, i = 1,…,N • link bandwidth N • RED: scaled by N
PFKT Modelp1/2 ModelSimulation+
RT Model p 1/2 Model
similar results for short-lived flows
Network Setting
• N TCP flows– throughputs {Bi }
• V congested RED routers– capacities {Cv }
– avg. queue lengths x = {xv }
– discard prob. p = {pv (xv )}
• TCP model: Bi (R , p)
• congested router model
i Bi (x ) = Cv , v =1,…,V
• V equations, V unknowns
TCP flow Bi
AQMrouter
Cv, pv(xv)
Results: Tandem Networks
• 8 networks, 5 -10 routers
• 2-way propagation delay 20-120 ms
• bandwidth, 2-6 Mbps• error
• throughput < 10%• loss rate < 10%• avg. queue length < 15%
• similar results for cyclic networks
RT Modelp1/2 Model
+
Est
imate
d e
nd
to e
nd
lo
ss
Measured end2end loss
Transient Analysis: single router
• one congested router– capacity {C (packets/sec) }
– queue length q (t )– discard prob. p(t )
• N TCP flows– window sizes Wi (t )
– round trip time
Ri(t ) = Ai +q (t )/C– throughputs
Bi (t ) = Wi (t )/Ri (t )
1
N
System of Stochastic Differential Equations
Window Size: dWi
Timeouts ignored
=
Additiveincrease
dt Ri (q (t))
-
Mult. decrease
Wi dNi (t-)2
{Ni (t)}: time varying, rate Wi (t ) p (x (t )) / Ri (q (t))
: feedback delay (round trip time)
Assumption: Poisson loss process {Ni (t)}:
System of SDEs
Queue length: =
Outgoingtraffic
- 1{q (t) > 0}C dtdq
Window Size: dWi = dt Ri (q (t))
- Wi dNi (t-)2
Incomingtraffic
+ Ri (q (t ))
Wi (t ) dt
System of Differential Equations
Window Size:dEWi
dt 1
Ri(Eq(t))
EWi
2
-EWi(t-)
Ri (Eq(t-))Ep(t-)
-1{Eq(t) > 0}C + Ri(Eq(t))
EWi(t)Queue length: dEqdt
Conjecture: exact as no. flows ->
System of Differential Equations (cont.)
Estimatedaverage queue length:
Eq(t)dExdt
=ln (1-)
ln (1-)
-Ex(t)
= averaging parameter of RED= sampling interval ~ 1/C
Loss probability:dEpdt
= dpdx
dExdt
dp/dx is obtained from the marking profile
p
x
Result: N +2 coupled equations
Numerical solution using MATLAB
dEWi
dt=f1(Ep,Ri, EWi) i = 1..N
dEqdt
= f2(EWi)dEpdt
= f3(Eq)
Extension to Network
Networked case: V congested AQM routers
Other extensions to modelTimeouts: leveraged work done in [PFTK Sigcomm98] to model timeoutsFlow aggregation: represent flows sharing same route by single equation
loss probability - cumulative loss probability
p(t) = 1-V (1-pV(t ))
Queuing delay - aggregate delay
q(t ) = V qV(t )
Validation scenario
• two RED routers • one way ftp flows traffic
sources• comparison to ns• transient queuing
performance obtained
Flow set 1
Flow set 2
Flow set 3
Flow set 4
Flow set 5
RED router 1RED router 2
Topology
5 sets of flows2 RED routersSet 2 flows through both routers
Performance of DE method
• link rates 5 Mb/s• load variation at t=75
and t=150 seconds• 200 flows simulated• drops to 120 between
t = 75, 120 • fluid model captures
transient performance
Fluid model ns simulation
Inst
. Q
ueue len
gth
Time
Observations on RED• “Tuning” of RED is difficult - sensitive to packet sizes, load levels, round trip time, etc.
• oscillations due to – exponential smoothing of queue length– use of variable sampling interval – feedback delay– queue fill delay
Further WorkDetailed Control Theoretic Analysis of TCP/RED available
at http://gaia.cs.umass.edu/papers/papers.html
Improving congestion control
Working with linearized model• developed rules for setting
RED parameters• compared Proportional
Integral (PI) controller with properly adjusted RED
• ns simulation with time varying http,ftp flows
• PI controller: faster response, decouples queue size and load level
Queue length vs. Time
- PI Controller- RED Controller
queue length
time
Conclusions
• fixed point approach promising for stationary behavior of TCP
• DE approach promising for more detailed transient behavior
• computation cost of methods a fraction of the discrete event simulation cost
• formal representation and analysis yields better understanding of RED/AQM