Hybrid Control and Switched Systems: Why Model Network Traffic?
Hybrid Control and Switched Systems: Why Model Network Traffic?
Motivation
Why model network traffic? to validate designs through simulation (scalability, performance) to analyze and design protocols (throughput, fairness, security, etc.) to tune network parameters (queue sizes, bandwidths, etc.)
Types of models
Packet-level modeling tracks individual data packets, as they travel across the network ignores the data content of individual packets sub-millisecond time accuracy computationally very intensive Fluid-based modeling tracks time/ensemble-average packet rates across the network does not explicitly model individual events (acknowledgments, drops, queues becoming empty, etc.) time accuracy of a few seconds for time-average only suitable to model many similar flows for ensemble-average computationally very efficient (at least for first order statistics)
Types of models
captures fast dynamics even for a small number of flow
provide information about both average, peak, and instantaneous resource utilization (queues, bandwidth, etc.)
Hybrid modeling keeps track of packet rates for each flow averaged over small time scales explicitly models some discrete events (drops, queues becoming empty, etc.) time accuracy of a few milliseconds (round-trip time) computationally efficient
Summary
Modeling 1st pass: Dumbbell topology & simplified TCP Modeling 2nd pass: General topology, TCP and UDP models Validation Simulation complexity
r1 bps
f1
queue
f2 f3
f3
Several flows follow the same path and compete for bandwidth in a single bottleneck link Prototypical network to study congestion control routing is trivial single queue
Queue dynamics
f1 f2
r2 bps rate B bps r3 bps
q( t ) queue size
r1 bps
f1
queue
f2 f3
f3
Queue dynamics
f1 f2
r2 bps rate B bps r3 bps
q( t ) queue size
r1 bps
f1
queue
f2 f3
f3
e.g., wf = 3
1st packet sent 2nd packet sent 3rd packet sent
source f
t0 t1 t2 t3
destination f
0 1 2
1st packet received & ack. sent 2nd packet received & ack. sent 3rd packet received & ack. sent
round-trip time
propagation delay
longer RTT
This mechanism is still not sufficient to prevent a catastrophic collapse of the network if the sources set the wf too large
multiplicative increase disclaimer: this is a very simplified version of TCP Reno, better models later
rf
additive increase
RTT
drop
multiplicative increase disclaimer: this is a very simplified version of TCP Reno, better models later
multiplicative increase
disclaimer: this is a very simplified version of TCP Reno, better models later
Switching-by-switching analysis
x1 t0
additive increase
T t1
additive increase
x2 t2
additive increase
t3
multiplicative decrease
multiplicative decrease
x1 x2
ns transitio urface
additive increase
Switching-by-switching analysis
x1 t0
additive increase
T t1
additive increase
x2 t2
additive increase
t3
multiplicative decrease
multiplicative decrease
continuous state before the kth multiplicative decrease Theorem. The function T is a contraction. In particular,
Therefore xk x as k x( t ) x ( t ) as t
n1 n2
s1
Bottleneck link
Router R1 Router R2
s2
TCP Sources
Window and Queue Size (packets)
flow 7 flow 8
400
TCP Sinks
20Mbps/20ms
500
n7 n8
s7 s8
window size w1 window size w2 window size w3 window size w4 window size w5 window size w6 window size w7 window size w8 queue size q
300
200
100
0 0 10 20 30 40 50
time (seconds)
Results
t0
additive increase
t1
additive increase
t2
additive increase
t3
multiplicative decrease
multiplicative decrease
Window synchronization:
convergence is exponential, as fast as .5 k Steady-state formulas: average drop rate average RTT average throughput (well known TCPfriendly formula)
server
data
acks
client
congestion control
server
sending rate
Routing
determines the sequence of links followed by each flow f n
n'
Conservation of flows:
Routing
determines the sequence of links followed by each flow Multicast Multi-path routing
n'
l1
n'
l l
l2
n''
Queue dynamics
in-queue rates
l M
drop rates
out-queue rates
M
link bandwidth
queue size due to flow f the packets of each flow are assumed uniformly distributed in the queue
Queue dynamics:
Queue dynamics
in-queue rates
l M
drop rates
out-queue rates
queue empty
M
same in and outqueue rates
no drops
Drops events
in-queue rates
l M
drop rates
out-queue rates
When? t0 t1 t2
Drops events
in-queue rates
l M
drop rates
out-queue rates
When? t0 t1 t2
Which flows?
(drop tail dropping) flow that suffers drop at time tk
in-queue rates
out-queue rates
queue dynamics
TCP/UDP
drops
congestionavoidance
set of links transversed by flow f TCP-Reno is based on AIMD but uses other discrete modes to improve performance
Slow start
In the beginning, pure AIMD takes a long time to reach an adequate window size 3. 4. Until a drop occurs (or a threshold ssthf is reached), double wf on each RTT When a drop occurs, divide wf and the threshold ssthf by 2
slow-start
cong.-avoid.
Fast recovery
After a drop is detected, new data should be sent while the dropped one is retransmitted
slow-start
cong.-avoid.
fast-recovery
Timeouts
Typically, drops are detected because one acknowledgment in the sequence is missing. source
1st packet sent 2nd packet sent 3th packet sent 4th packet sent
destination
drop
three acks received out of order drop detected, 1st packet re-sent
2nd packet received & ack. sent 3th packet received & ack. 4th packet received & ack. sent sent
When the window size becomes smaller than 4, this mechanism fails and drops must be detected through acknowledgement timeout.
6. When a drop is detected through timeout: a. the slow-start threshold ssthf is set equal to half the window size, b. the window size is reduced to one, c. the controller transitions to slow-start
in-queue rates
out-queue rates
sending rates
RTTs
queue dynamics
drops
Validation methodology
Compared simulation results from ns-2 packet-level simulator hybrid models implemented in Modelica Plots in the following slides refer to two test topologies
dumbbell
Y-topology
10ms propagation delay drop-tail queuing 5-500Mbps bottleneck throughput 0-10% UDP on/off background traffic
45,90,135,180ms propagation delays drop-tail queuing 5-500Mbps bottleneck throughput 0-10% UDP on/off background traffic
Simulation traces
single TCP flow 5Mbps bottleneck throughput no background traffic
hybrid model
140 cwnd and queue size (packets) cwnd and queue size (packets) 120 100 80 60 40 20 0 0 2 4 6 8 10 12 time (seconds) 14 16 18 20 cwnd of TCP 1 queue size 140 120 100 80 60 40 20 0
ns-2
cwnd of TCP 1 queue size
8 10 12 time (seconds)
14
16
18
20
Simulation traces
four competing TCP flow (starting at different times) 5Mbps bottleneck throughput no background traffic
hybrid model
140 cwnd and queue size (packets) 120 100 80 60 40 20 0 0 2 4 6 8 10 12 time (seconds) 1 4 16 18 20 cwnd and queue size (packets)
cwnd size of TCP 1 cwnd size of TCP 2 cwnd size of TCP 3 cwnd size of TCP 4 Queue size of Q1 Queue size of Q2
ns-2
140 120 100 80 60 40 20 0 0 2 4 6 8 10 12 time (seconds) 14 16 18 20
cwnd size of TCP 1 cwnd size of TCP 2 cwnd size of TCP 3 cwnd size of TCP 4 Queue size of Q1 Queue size of Q2
Simulation traces
four competing TCP flow (different propagation delays) 5Mbps bottleneck throughput 10% UDP background traffic (exp. distributed on-off times) hybrid model
140 cwnd and queue size (packets) 120 100 80 60 40 20 0 0 2 4 6 8 10 12 14 time (seconds) 16 18 20
CWND size of TCP 1 (Prop=0.045ms)
ns-2
140 cwnd and queue size (packets) 120 100 80 60 40 20 0 0 2 4 6 8 10 12 time (seconds) 14 16 18 20
CWND size of TCP 1 (Prop=0.045ms) CWND size of TCP 2 (Prop=0.090ms) CWND size of TCP 3 (Prop=0.135ms) CWND size of TCP 4 (Prop=0.180ms) Queue size of Q1 Queue size of Q3
CWND size of TCP 2 (Prop=0.090ms) CWND size of TCP 3 (Prop=0.135ms) CWND size of TCP 4 (Prop=0.180ms) Queue size of Q1 Queue size of Q3
Thru. 1 Thru. 2 Thru. 3 Thru. 4 RTT1 RTT2 RTT3 RTT4 ns-2 hybrid model relative error 1.873 1.824 2.6% 1.184 1.091 7.9% .836 .823 1.5% .673 .0969 .669 .0879 .7% 9.3% .141 .132 5.9% .184 .180 3.6% .227 .223 2.1%
the hybrid model accurately captures TCP unfairness for different propagation delays
Empirical distributions
0.15
hybrid model
ns-2
probability
0.1
0.05
10
60
70
10
60
70
the hybrid model captures the whole distribution of congestion windows and queue size
Execution time
10000
1 flow
1000
500Mbps
3 flows ns-2
50Mbps
100
10
5Mbps
1 1 0.1 10 100
hybrid model
1000
hybrid models are particularly suitable for large, highbandwidth simulations (satellite, fiber optics, backbone)