W(t) - Homepages | The University of Aberdeen

advertisement
A Survey on TCP Performance
Evaluation and Modeling
Michele Pagano and Raffaello Secchi
Department of Information Engineering
University of Pisa
Network Telecomunication Research Group
wwwtlc.iet.unipi.it
1
Michele Pagano – A Survey on TCP Performance Evaluation and Modeling
Outline
• Fast overview on TCP congestion control mechanisms
• Models of TCP congestion control
• A simple stationary models
• The long-term TCP bandwidth
• TCP in high bandwidth-delay product networks
• TCP interactions with AQM
• Tuning RED parameters through linear control theory
2
Michele Pagano – A Survey on TCP Performance Evaluation and Modeling
TCP congestion control algorithm
• Key parameters
• cwnd
Sender
Receiver
Sender
Receiver
• ssthresh
• Additive-Increase Multiplicative Decrease
• TCP increases its cwnd by roughly one MSS
every RTT as long as no loss event occurs
(linear increase phase or congestion
avoidance)
• Slow Start
• TCP increases its rate exponentially fast by
doubling its value of cwnd every RTT
• Reaction to loss events (triple duplicate
ACKs)
• Fast Retransmit
• Fast Recovery
3
Michele Pagano – A Survey on TCP Performance Evaluation and Modeling
Evolution of TCP’s Congestion Window
TCP Reno vs. TCP Tahoe
18
cwnd = 16
Loss detected
by a triple DupACK
Loss detected
by a timeout
16
cwnd = 14
cwnd (MSS)
14
12
10
8
ssthresh = 8
ssthresh = 7
6
4
2
0
0
4
2
4
6
8
10
12
14
18
Time (RTT)
20
22
24
Michele Pagano – A Survey on TCP Performance Evaluation and Modeling
26
28
Models of TCP congestion control
• Single connection models
– Assume the knowledge of network characteristics, such as mean RTT
and loss probability, and try to evaluate the performance of TCP
connections
– This class can be further divided into models for short-lived and long-lived
connections
• Models of interaction with AQM
– Derive the performance of TCP and network statistics
– Introduce a sub-model of TCP and a sub-model of IP network protocol
and solves through fixed-point procedures
• Models for TCP Network Optimization
– Interpret the steady-state behaviour of TCP sources as the solution of a
large optimization problem
– An utility function is associated to each source. The aggregate of TCP
sources converges toward a global optimality point
5
Michele Pagano – A Survey on TCP Performance Evaluation and Modeling
Single source traffic models
•
Underlying assumptions:
•
Steady state
•
The loss rate and RTT are independent from the source
•
No ACK loss
•
Neglect the slow-start phase
•
6
TCP-Reno model:
•
Congestion Avoidance
•
Fast Retransmit – Fast Recovery
•
Delayed-ACK
Michele Pagano – A Survey on TCP Performance Evaluation and Modeling
Simple stationary model
W(t)
Wmax
periodic behaviour of
congestion window
Wmax/2
b · Wmax/2
Total packets
per cycle
W
1  Wmax
3


 Wmax   b max 
b  Wmax
2  2
2
8


1
Loss
Probability
p
Maximum cwnd
Wmax 
8
3bp
MSS

RTT
3
2bp
Throughput
7
time (RTT)
b · Wmax
3
2
b  Wmax 
8
Michele Pagano – A Survey on TCP Performance Evaluation and Modeling
2
Simple stationary model
• The previous expression does not take
into account the timeout mechanisms
• It is an optimistic estimate of the
bandwidth of a TCP connection.
– It is accurate in the range of small loss probabilities
– It is not suitable to determine performance of TCP
over slow-speed line (few packets in transit)
8
Michele Pagano – A Survey on TCP Performance Evaluation and Modeling
TCP window size evolution
W(t)
ni cycles with Additive Increase
(cwnd-cycles)
New TCP
cycle
Timeout period
Acj Tcj
t
Ends of Congestion Avoidance phase
(timeout mechanism)
9
Michele Pagano – A Survey on TCP Performance Evaluation and Modeling
Throughput estimation
A cycle 
3
2
b  EW 
8
Bw 
Tcycle
A cycle
EW  
8
3bp
Tcycle  Q Ttimeout
EW 
 b  RTT
2
Mean duration of a
cwnd-cycle period
10
Amount of data delivered
in a cwnd-cycle period
Mean duration of a
timeout period
Probability that congestion
is detected by timeout
Michele Pagano – A Survey on TCP Performance Evaluation and Modeling
Modeling timeout
T0
•
•
•
loss
loss
Exponential Backoff
2T0
loss
t
4T0
T0 is the initial value of the timeout period
For each unsuccessful retransmission (which happens with probability p) the
timeout period is doubled until a threshold value (64T0) is reached
The retransmit timeout remains constant after 64T0


 2 k  1 T0
Lk  
63  64k  6  T0
for k  6
for k  7
6
Mean duration of a
timeout period
11

k


2p

k 1
2(1  p)
k 1
L

p
 k 1  p 
k 1
 T0
Michele Pagano – A Survey on TCP Performance Evaluation and Modeling
Fast Retransmit / Fast Recovery
W(t)
A period of congestion
window increasing
t
w
•The losses in consecutive RTT are independent
w
•The losses of packets within the same round are correlated since
DropTail discipline induces a bursty dropping behaviour
• A packet is lost with probability p given that the previous was not lost
• All the packets following the first packet lost in a round of packet transmission
would be also lost.
12
Michele Pagano – A Survey on TCP Performance Evaluation and Modeling
Probability of timeout
Probability of having k<w successful
transmissions in the penultimate round
A(w, k) 
1  p k
w
1  1  p 
Distribution of the number m of packets successfully transmitted in
the last round
 p1  p m
C (n, m)  
 1  p n
for m  n  1
for m  n
Probability that the cwnd-cycle ends with a timeout (the sender
receives less than three duplicate ACKs)
1
2
w 2
Q̂(w)  
 Aw, k   Aw, k   Ck, m 
k 3 m  0
 k 0
13
if w  3
otherwise
Michele Pagano – A Survey on TCP Performance Evaluation and Modeling
Probability of timeout
•A good numerical approximation of the conditional timeout probability is
the limit as p→0 of expression of Q:
 3
Q̂w   min 1,

 w
•This expression is based on the assumption that, when p→0, all
packets in a particular round are equally liked to be dropped, with at
most one drop per round. In that case, any one of last 3 packets in a
round can cause a timeout if dropped
•Finally, the probability of timeout is computed as a function of
the mean size of congestion window E[W].
8
E W  
3bp
Q 

 Q̂w  PrW  w  EQW   Q̂EW 
w 1
14
Michele Pagano – A Survey on TCP Performance Evaluation and Modeling
Model validation


W
B ( p )  min  max ,
 RTT
RTT


1

2bp
3bp 
p 1  32p 2
 T0 min 1, 3
3
8 


Additional term
related to the
impact of the
window
limitation
From [PFTK]
15
Michele Pagano – A Survey on TCP Performance Evaluation and Modeling








TCP in high bandwidth-delay
product networks
•
The goal of TCP is to keep outstanding an amount of data equal
to the bandwidth-delay product of path.
•
Over WANs TCP experiences a round trip delay of the same
order of magnitude of buffering delay.
•
Keep the pipe full can be difficult if TCP suffers occasional
random losses due to:
– transient congestion
– lossy link (wireless)
– link sharing with uncontrolled load (real-time traffic)
•
Performance of TCP-Reno with respect to …
– WAN delay-bandwidth product
– rate of random losses
16
Michele Pagano – A Survey on TCP Performance Evaluation and Modeling
The case loss-free path (fluid model)
bottleneck link
TCP
TCP
B
c
The total latency of the path is
the sum of transmission delay
and propagation delay
T  τ  1/c
•When the size of window exceeds Wmax a buffer overflow occurs and
the cwnd is set to Wmax /2
Wmax  cT  B
•The cwnd-evolution is governed by following equation
dW dW da
1 da




dt
da dt W dt
•The ACK reception rate is equal to the link rate c if the bottleneck is
congested, otherwise it is equal to the sending rate W/T
da
W
 min{ , c}
dt
T
17
Michele Pagano – A Survey on TCP Performance Evaluation and Modeling
The case loss-free path
The queue
is filling up
W(t)
loss
epoch
cT
pipesize
capacity
linear
increase
N1
N2
time
T1
T2
T1  T  cT  Wmax /2 
The first sub-period
of congestion avoidance
Wmax T1  T12 / 2T 
Wt 
N1  
dt 
T
2T
T1
2
Wmax
 cT 
T2 
2c
2
The second sub-period
of congestion avoidance
18
N2  c  T2
Michele Pagano – A Survey on TCP Performance Evaluation and Modeling
The case loss-free path
•
The mean throughput of TCP-Reno is then given by:
2
N1  N 2
B
T1  T2
B 

1 

3c
cT 



2
4
B  B 
1


cT  cT 
• The performance of TCP can be expressed as a function of
the ratio between the bottleneck buffer size and pipe size
– TCP suffers the presence of small buffers
– Larger buffers determine an increase of delays
– To fully exploit the capacity of bottleneck the buffer should be at
least equal to pipe size
19
Michele Pagano – A Survey on TCP Performance Evaluation and Modeling
Random loss scenario
bottleneck link
random loss
TCP
TCP
B
•
•
•
20
c
q
A packet, successfully delivered at the bottleneck link, can be lost
randomly with probability q.
The evolution of congestion window is determined by the window size
w at the beginning of cwnd-cycle (Markov process)
We introduces two functions:
Wn, w 
Window size after n successful
packet transmissions (w initial window)
Tn, w 
Time required to complete
n successful packet transmissions
Michele Pagano – A Survey on TCP Performance Evaluation and Modeling
Markov chain analysis
Since the independent loss model used …
1 q
1 q
wi
0
…
1
q
q
0
1
0
…
…
1
…
1 q
1 q
wi
wi+1
q
q
q
…
2wi-1
…
1 q
…
wi-1
1 q
1 q
wi 
 2 
wi-1
1 q
1 q
 w i  1
 2 
1 q
1 q
wi-1
…
1 q
… N (w )
…
w
q
The cwnd evolution is
expressed through these
recursive equations
1

w

 W N i , w i 
i

1

2


T  T N , w 
i
i
 i 1

Once solved the time-homogenous Markov Bw  EN i 
chain, we can evaluate the throughput
ETi 
21
1 q
Michele Pagano – A Survey on TCP Performance Evaluation and Modeling
i
General comments
•
This analysis can be extended also to other versions of TCP
•
Since the analysis is computational expensive, approximated
solutions have been proposed (see [LM97]).
•
Even small loss leads to a significant throughput deterioration over
networks with high bandwidth-delay products.
•
TCP performance is strongly dependent on the parameter q(cT)2
and decreases sharply as this parameter increases
– “too early” drops in the TCP cycle induce the over-reaction
•
Random losses should be avoided
– flow isolation
– link layer protocols
22
Michele Pagano – A Survey on TCP Performance Evaluation and Modeling
Interaction between TCP and AQM
• Fluid model:
– The congestion window is a continuous variable
– A continuous flow of data
• Interaction between TCP-Reno and AQM mechanism
• Fixed-Point approach
TCP
load
ploss RTT
Network
23
Michele Pagano – A Survey on TCP Performance Evaluation and Modeling
Active Queue Management: RED
•
RED (Random Early Detection): implicit congestion avoidance
mechanism
•
RED discards packets randomly in order to:
–
Prevent the incipient congestion by reacting earlier
–
Avoid the synchronization between sources
–
Mechanism of Dropping/Marking based on the mean queue length
–
Moving Average Algorithm used to smooth the instantaneous queue size
Probability of Dropping
p(x)
1
Pmax
Tmin
Tmax
Mean queue size
24
x
Michele Pagano – A Survey on TCP Performance Evaluation and Modeling
Active Queue Management: RED
x(t)
Instantaneous queue length
t
Moving average filter
Sampled data system
xk  1T 
xk  1T  
Mean queue length
1  α xkT
e aT  xkT 
α  qkT

 k 1T

b
e
kT
dx
ln 1  α 
ln 1  α 

 x t  
 qt 
dt
T
T
25
dτ  qkT 
a  kT  τ 
Michele Pagano – A Survey on TCP Performance Evaluation and Modeling
Model of the network
•The network is modelled as a set of L links with capacities cl l =
1,2, … , L and the links are shared by a set of S sources indexed
by s = 1,2, … , S each using a subset Ls of links
• Basic quantities
congestion window associated
with each TCP source
Ws (t )
probability of drop and instantaneous
length associated with each link
pl (t ) ql (t )
1,
Als  
0,
26
if
l  Ls
otherwise
routing matrix
Michele Pagano – A Survey on TCP Performance Evaluation and Modeling
Model of the network
Parameters related to the s-th TCP connection
•
Round trip time
RTTs t 
q l t 
 τs  
lLs c l
ts is the round trip
propagation delay
• End-to-end dropping probability
p̂s (t)  1 
L
 (1  A p (t))
ls l
l 1

 A p (t)
lL
ls l
since we are considering AQM/RED, we may reasonably
assume that drops at different queue are independent
27
Michele Pagano – A Survey on TCP Performance Evaluation and Modeling
Model of the network
Parameters related to dynamic of the l-th queue
S
Ws (t)
A ls

RTTs ( t )
s 1
q l t 
Incoming traffic
cl
Outgoing traffic
• Differential version of the Lyndley equation
dq l (t)
dt

 1ql t  cl 
S
Ws (t)
Als

RTTs (t)
s 1
• Mean transient behaviour (by approximating the expectation of both sides):
d
E{q l (t)}
dt
28

 1E{q l t } cl

S
E{Ws (t)}
Als

E{RTT s (t)}
s 1
Michele Pagano – A Survey on TCP Performance Evaluation and Modeling
Model of the source
W(t)
t
loss events
• Packet losses at flow s are modelled by a Poisson process with time
varying rate λ s (t)
• Ni(t): number of losses suffered by flow i
• t: point of time when the flow detects losses
• Evolution of cwnd:
dWs (t)
Additive Increase

dt
RTT s t 
Multiplicative Decrease

Ws (t)
 dN s t 
2

E{Ws (t)}
 λ s (t)dt
2
• Again, taking the expectation
dE{W s (t)} 
29
dt
E{RTT s t }
Michele Pagano – A Survey on TCP Performance Evaluation and Modeling
Model of the source
• In proportional marking schemes the dropping rate is proportional
to the share of the connection
expected value for
drop rate at link l Ls
p l (t) 
Ws (t)
RTT s (t)
• Actually, drops occur at the node about a round trip time before they
can detected by the sender (the latency of feedback is important in a
control system since it impacts on stability)
•This equation governs the evolution of congestion window of s-th
connection
d W s (t)
1


dt
RTT s (t)
30
W s (t) W s (t  τs )

p̂s (t  τs )
2
RTT (t  τs )
Michele Pagano – A Survey on TCP Performance Evaluation and Modeling
Stochastic differential equations system
• 2L+S coupled equations in the unknowns (x,q,W) that can be solved
numerically
TCP
Lindley
RED
d Ws t 
1
Ws t  Ws t  τs 



 p̂s t  τs 
dt
2
RTT s (t )
RTT s t  τs 
dq l t 

dt
dxl

dt
 1q t 0 cl
l
ln 1  α 
 x l t 
T

Ws t  τs 

sLs RTT s t  τ s 

ln 1  α 
 q l t 
T
s {1,2,..., S}
l {1,2,..., L}
l {1,2,..., L}
The time needed to solve the system is several order of magnitude
less than that needed for the simulation of the same network scenario
31
Michele Pagano – A Survey on TCP Performance Evaluation and Modeling
Linearized analysis of TCP with AQM
•
Goal: linearization of the previous set of equations in the case of
single bottleneck link topology
•
The linearized system is suitable to be studied through the classic
tools of linear control theory.
•
The linear analysis gives us many suggestions on the way to
modify the algorithm in order to achieve stability and robustness
losses
BOTTLENECK
32
Michele Pagano – A Survey on TCP Performance Evaluation and Modeling
Linear analysis: the single link case
•
Let us consider N identical TCP Reno flows (with the same
RTT) sharing a common link with capacity C.
1
W(t)  W(t  τ)
 
W
(t)


p(t  τ)

R(t)
2R(t  τ)


 q (t)  W(t) N  C

R(t)
•
We have assumed that the server is always transmitting
packets (bottleneck)
•
Common value of RTT:
R(t)  τ 
33
q(t)
C
Michele Pagano – A Survey on TCP Performance Evaluation and Modeling
Block diagram
qt 
1
RTT (.)
W t 
+
qt 
TCP
-
W t 

C
1
RTT (.)
+
N
q t 
Congested
Router

1
2
X
RED
K ( x) 
t
1
RTT (.)
X
pt 
K
dp
dx
LOW
PASS
qt 
controller
34
Michele Pagano – A Survey on TCP Performance Evaluation and Modeling
qt 
Small signal analysis
•
•
35
Goals of an AQM (RED) controller
•
Stable closed-loop system
•
Acceptable transient response
•
Insensitivity to variations of model parameters
•
Insensitivity to disturbance factors (short lived flows)
Strategy
•
Linearization around the operating point
•
Input: Loss probability
•
Output: Queue size
•
Design of RED using dominant pole compensation
(W0, q0, p0)
Michele Pagano – A Survey on TCP Performance Evaluation and Modeling
Small signal analysis
• Operating point  derivative equal to zero:
 1
W02

p0  0

R
2
R
 0
0

W0 N  1  0

 R0

W0 
2
p0
W0 
R0  C
N
• Difference variables  linearization in a neighbourhood of the
operating point
 
R 0C2
N
δp(t  τ)
δW(t)   2 δWt  τ   δWt  
2
R 0C
2N


N
1
δq
 (t) 
δW(t) 
δq(t)  2δWt 

R0
R0

36
Michele Pagano – A Survey on TCP Performance Evaluation and Modeling
Laplace representation
• Representation of the system in the Laplace domain:
N
Pqueue s  
1  R 0s
R 30 C3
3
4N
Ptcp s  
R 02 C
1 s
2N
• The static gain of plant is
• proportional to RTT and capacity
• inversely proportional to the number of active flows
• A small number of TCP flows lead to an oscillatory response
• An increase in the round trip time reduces the controllability
of the system
• High speed links are difficult to control
37
Michele Pagano – A Survey on TCP Performance Evaluation and Modeling
Small signal model
• RED acts as a proportional
controller
C red s   K
controller
gain
K
p max
t max  t min
+
+
-
Cred s 
Ps
e  sτ
1
1  s/β
β
ln(1  α)
T
controller
time-constant
• Internet routers typically implement a drop tail policy in the queues
(ON-OFF control strategy)  strong oscillation in queue size, with the
alternation of emptiness and buffer overflow
• RED should reduce the extent of variations in queue length
• Trade-off between acceptable queuing delay and link utilization.
38
Michele Pagano – A Survey on TCP Performance Evaluation and Modeling
RED Design
•
In choosing the parameters of RED controller (K,β), it is necessary to
introduce some bounds on the number of TCP sessions and on RTT:
N  N min , R 0  R max
•
Basic Result: Under previous constraints, if K and β satisfy the following
condition:
K R max C
2N min 2
3
where
ωg 

 ωg

 β

2

  1

1
Queue
min ωTCP
min , ω min
10
dominant pole
compensation

 the system converges exponentially fast to the equilibrium,
for whatever initial condition.
39
Michele Pagano – A Survey on TCP Performance Evaluation and Modeling
Designing AQM/RED
Bode Plots
Usually the dynamics of the queue
are faster than those of TCP
Amplitude
ωg
ωTCP
ω Queue
ω
ω
Phase
-900
phase
margin
-1800
40
Michele Pagano – A Survey on TCP Performance Evaluation and Modeling
Conclusions
•
Summary of analytical modelling for the performance evaluation of
Internet congestion control
•
Bandwidth achieved by a TCP connection in response to network
conditions
– These models are also useful in asymptotic conditions with
many sources
•
Interaction between TCP and AQM (RED) schemes
– Qualitative understanding of TCP transient behaviour.
– Powerful tools of linear control theory
– Selection of the network parameters leading to stable and robust
working conditions
41
Michele Pagano – A Survey on TCP Performance Evaluation and Modeling
A few references
[PFTK98] J. Padhye, V. Firoiu, D. Towsley and J. Kurose, “Modeling
TCP Throughput: A Simple Model and its Empirical Validation”, In
SIGCOMM, 1998.
[LM97] T. Lackshman and U. Madhow, “The performance of TCP/IP
for networks with high bandwidth-delay products and random
loss”, In Transaction on Networking, 1997
[VGT99] V. Misra, W. Gong, D. Towsley, “Stochastic Differential
Equation Modeling And Analysis of TCP-Windowsize Behavior”, In
PERFORMANCE, Istanbul, Turkey, 1999.
[HMTG01] C. Hollot, V. Misra, D. Towsley and W. Gong. “A Control
Theoretic Analysis of RED”, In INFOCOMM 2001
42
Michele Pagano – A Survey on TCP Performance Evaluation and Modeling
Download