Upload
basil
View
27
Download
0
Tags:
Embed Size (px)
DESCRIPTION
89-850 Communication Networks Network Calculus: Deterministic Traffic Analysis. Last updated: Thursday, August 14, 2014 Prof. Amir Herzberg Dept of Computer Science, Bar Ilan University http://AmirHerzberg.com. Network Calculus: Topics. Introduction Voice call processing example - PowerPoint PPT Presentation
Citation preview
89-850 Communication Networks Network Calculus: Deterministic Traffic Analysis
Last updated: Saturday, April 22, 2023
Prof. Amir HerzbergDept of Computer Science, Bar Ilan Universityhttp://AmirHerzberg.com
Network Calculus: Topics 1. Introduction
• Voice call processing example• Network calculus• Fixed-rate service and Reich’s equation• Min-Plus Convolution
2. Arrival curves3. Service curves
Backlog, delay bounds, IntServ routers (Latency-Rate servers), Shapers
Voice Call Processing & Delays Sound sampled and encoded
Constant Bit Rate (CBR), e.g. 64Kbps (8000*8b) Voice activity detection (and compression?) Discard (long, e.g. >0.2s) inactive periods On-off Variable Bit Rate (VBR)
Question: what link rate C is needed? R
buffer fills when source rate > service rate
r- < C < R
r-
Voice Call Processing & Delays (cont’) Sound sampled and CBR-encoded Voice activity detection, compression VBR Shaping Specifications of sent traffic Allows efficient rates, buffers
Packetization (and padding if necessary) R
buffer fills when source rate > service rate
r- < C < R
r-
Voice Call Processing & Delays (cont’) Sender:
Sampling and CBR-encoding Voice Activity Detection, compression VBR Shaping Packetization (and padding if necessary)
Network (queues, transmission, propagation) Receiver Immediate or delayed playout?
Voice Transport over Packet Network Deterministic vs. stochastic analysis
ARBRSource Playout SinkDecoderShaper Packetizer
R
R
Packet network
Coderwith VAD
Playout Delay to `Hide` Jitter Lines: actual packet delays Is output Ok? What size of buffer (backlog)?
packet send time
this target end-to-end delay Twill avoid any packet loss
Playout Buffer Model Network system S:
CBR input: R(t)=rt Delay variation (jitter) bounded by Δ Namely for some D>0 holds:
R(t) ≦R*(t+D+Δ) and R*(t+D-Δ)≦R(t)
Playout buffer S’: Receive first bit at d(0), delay it by Δ Then, serve at constant rate r , when not empty if never empty after d(0), then S(t)=r(t-Δ-d(0))+
Playout Buffer Analysis Claim: for every t>d(0) holds
0<R*(t)-S(t)<2Δr Playout buffer always non-
empty, produces at rate r Buffer size of 2Δr is sufficient
(to avoid overflow) Proof:
(omitted)
Network Calculus Deterministic analysis of scheduling/ queuing /
flow Uses min, max as binary operators and
integrals (min-plus. max-plus algebra) Worst-case wasteful [cf. probabilistic queuing analysis –
later] Applicable to many problems Voice, audio, data, …
Only `traffic flow`, no processing/control Discrete or continuous time (bit or fluid model,
resp.)
Network Calculus Network Calculus: Worst-case analysis of
Arrivals, Service, Buffering and Departures Used in design of QoS protocols
Internet: mainly IntServ, DiffServ ATM
Arrivals A(t)
Departures D(t)Service
Buffer X(t)
L5
L4L3L1
slope C
a1a2a3 a4 a5 a6
Buffer Analysis: Fixed Rate Queue Bits sent (removed) at C bits/second (unless empty)
ak: arrival of (complete) packet k Lk[0,∞) : bit-length of packet k A(t), D(t): total arrivals (deliveries)
till time t; A(0-)=0 t- : just before time t
X(t): queued bits at time t
X(t)
Reich’s Equation:
Work-conserving schedule with output rate C
))()()((sup)(0
stCsAtAtXts
))()()(()(],[at Departs],[at Arrives
tsts
stCsAtAtX
))()()((sup)(0
stCsAtAtXts
hence... ,0)'()0'( tAt
t
A(t)
X(t)A(s)
timev(t)
this line has slope C,and value A(s) + C.(t s) at t
s
Proof:
Reich’s Equation: ))()()((sup)(0
stCsAtAtXts
))()()(()(],[at Departs],[at Arrives
tsts
stCsAtAtX
))()()((sup)(0
stCsAtAtXts
hence... ,0)'()0'( tAt
Let v be earliest time after which buffer was not empty:
}0)(:0sup{ sXtsv
Hence:
))()()((sup)()()()(0
stCsAtAvtCvAtAtXts
Reich’s Equation: Illustration))()()((sup)(
0stCsAtAtX
ts
t
A(t)
X(t)A(s)
timeb
this line has slope C,and value A(s) + C.(t s) at t
s
D(time)
Reich’s Equation: Departures
))()((inf
))()()((sup)()()()(
0
0
stCsA
stCsAtAtAtXtAtD
ts
ts
t
A(t)
X(t)
D(t)
time
Departures and Convolutions))()((inf)(
0stCsAtD
ts
))()((inf)(
stCsAtD
s
A(s)=0 for s<0, and (t-s)+=0 for s≥t, hence…
Definition: The convolution A*B of two non-decreasing functions A(t), B(t):+ is:
))()((inf))(*( stBsAtBAs
Note: compare to linear systems theory convolution:dsstBsAtBA
s )()())(*(
Two equivalent notations: A*B, A B⊗
Convolution Operation - Visualization
))()((inf))(*( stBsAtBAs
slope ρB (t )
st
slope C
t
slope ρτ t
slope C
A (t)
(A * B)(t)
A(τ ) + B(t τ)
B(t-τ)
A(t)=Ct +
]0[)()( tIttB
Convolution Operator: Properties Convolution operator * is… Commutative: A*B=B*A Associative:
(A*B)*C=A*(B*C) Distributive over min function:
A*min{B,C} = = min {(A*B), (A*C)}
The convolution A*B is: ))()((inf))(*( stBsAtBAs
slope ρτ t
slope C
A (t)
(A * B)(t)
A(τ ) + B(t τ)
Convolutions and the δ (delay) function
The convolution A*B is: ))()((inf))(*( stBsAtBAs
Define the delay function as:
elsefor0
)(dt
td
Since A(t) is non-decreasing:
)())()((inf))(*( dtAstsAtA dsd
B(t)≥0 is causal if B(t)=0 for t<0; If A, B are causal then…
)())(*())(*( 0 tAtAtBA AAA )*(
Network Calculus: Topics 1. Introduction2. Arrival curves
Arrival curve and min-plus convolution Leaky bucket Good arrival curves are sub-additive Minimal arrival curve and min-plus deconvolution
3. Service curves Backlog, delay bounds, IntServ routers (Latency-
Rate servers), Shapers
Cumulative flows Cumulative flow R(t) F , t real (or integer) F = { x(t) | x(t) is non decreasing and x(t) = 0 for t < 0 } Models:
time t
bits
12 567 time t
bits
1 55.5
R1(t) R2(t)
Fluid model (continuous) Packet model (left continuous)
Arrival Curves Flow R has arrival curve (envelope) iff
∀0 s t:R(t) -R(s) (t-s) and (x<0)(α(x)=0)
Example 1: affine arrival curve r,b
(t) = r,b(t) = rt+b for t>0, r,b≥0(Example 2, stair arrival curvekvT,: hidden next foil)
time
bits
bslope r R(t)
Leaky Bucket Conforming Arrivals
Leaky Bucket (LB) conformance test: Parameters: rate r, bucket size b Initially: bucket 0 (empty) Upon packet arrival:
If bucket+|packet|≦b then {bucket+=|packet|; mark packet `conforming`}else mark packet `non-conforming’;
Every 1/r seconds: if bucket>0 then bucket--;
R(t)
r
x(t)
bR(t)
Affine Arrivals are LB-Conforming
Let R* be leaky-bucket conforming arrivals R* has affine arrival curve(t) = r,b(t) = rt+b for t>0, r,b≥0 If R conforms to (has envelope)(t), then R*=R
All packets of R are conformant
R(t) r,b
r
x(t)
bR(t) slope r
b
Min-Plus Convolution Flow R has envelope (arrival curve) iff ∀0 s t:R(t) -R(s) (t-s) and (x<0)(α(x)=0) The min-plus convolution of R andαis:
Flow R has arrival curve α,iff R R≦ ⊗α R has arrival curve all 0 s t, R(t) -R(s) (t-s) R(t) R(s) + (t-s) for all 0 s t R(t) infu { R(u) + (t-u) }
R R
))()((inf))(( stsRtRs
Min-plus convolution (cont’) Definition
(f g) (t) = infu { f(t-u) + g(u) }
t
f(t)
g(t)
(f g)(t)
Some properties of min-plus convolution
(f g) F is associative is commutative Neutral element: 0 : f 0 = f
( 0 (t) = 0 for t = 0 and 0 (t) = for t > 0) is distributive with respect to min ( is isotone: f f’ and g g’ f g f’ g’ Functions passing through origin (f(0) = g(0) = 0):
f g f g Concave functions passing through the origin:
f g = f g
Example: rate latency function
T (delay function) R,T (rate-latency function)
latency T
R,T(t)
Slope (rate) R
delay T
T(t)
R(t)=Rt
Rate R
R (delay function)
Sub-Additive Functions Recall cumulative flow functions
A function fF is sub-additive iff:
If flow has arrival curve fF, then it also has sub-additive arrival curve In particular, the `sub-additive closure`
Focus on sub-additive arrival curves Mostly, `good` functions: sub-additive and f(0)=0
}{ 0)0)(x(t)t(x(t))t)(x(s)s(|x(t) F
)()()()0,( tfsftsfts
xxfxf )()(
Affine Arrivals are Sub-Additive
affine arrival curve:r,b(t) = rt+b for t>0, r,b≥0
Is sub-additive (and `good`): r,b(s+t) = r(s+t)+b≦ ≦ rs+b+rt+b = r,b(s)+ r,b(t)
time
bits
bslope r
Sub-additivity and arrival curves
T
k
2T 3T
2k3k4k
4T T
k
2T 3T
2k3k4k
4T
Flow R has arrival curve , the sub-additive closure, is arrival curve
What is the sub-additive closure ? Use min-plus convolution
)(t)(t
)()( tt
Sub-additive Closure The sub-additive closure of an arrival curve,
is a (sub-additive) arrival curve fF , f(0)=0 f ≥ f⊗f ≥ 0 Repeat… sequence of smaller and smaller
functions:
is sub-additive with (`good`) is sub-additive with f(0) = 0 =f f = f f
,...},,,inf{ 0 fffffff f
f
0)0( f
f
Combining Two Leaky Buckets
time
bits
b
M
slope rslope p
time
bits
bslope r
IntServ Standard Traffic Specifications: T-Spec 4-tuple: (p,M, r, b) Peak rate p (link speed), packet size M
`Store and forward`: entire packet `received at once’ Burst size b, long-term average rate r
(u) = min (pu+M, ru+b) = (pu+M) (ru+b) Exercise: show (u) is sub-additive (and `good`)
Combining Two Arrival Curves (1) Generalize: Flow R has arrival curves ’ ∀0 s t:R(t) -R(s) (t-s), R(t) -R(s) ’(t-s)
Clearly: R has arrival curve ’ E.g., two affine arrival curves (leaky bucket)
But sometimes there is a tighter curve!
Combining Arrival Constraints (2) Flow R has arrival curves ’ Clearly: R has arrival curve ’ Example: t)=r,b(t), ’(t)=vT,(t) Pick r=1, b=0, T=2, =0… Is ’ sub-additive?
time
bits
slope 1
1,0(t)
time
bits
1
V2,0(t) [stair function]
234
4 6
0)0(,)0( ,,
tv
Tttv TT
’
’(2.5)=2’( 2)=1’( 0.5)=0.5
Combining with Sub-Additive Closure Flow R has arrival curves ’ also ’ Also arrival curves: ⊗’ and The sub-additive closure of ’
If ’ are `good`, then ⊗’=
time
bits
slope 1
1,0(t)
time
bits
1
V2,0(t) [stair function]
234
4 6
0)0(,)0( ,,
tv
Tttv TT
’
'
'
'
Minimal arrival curveAssume we only know arrival rate R (empirically)How can we compute the (minimal) arrival curve ?The answer uses min-plus deconvolution
R
Min-plus deconvolution Ø Definition
(f Ø g) (t) = supu { f(t+u) - g(u) }
t
f(t)
g(t)
(f g)(t)
Properties of min-plus deconvolution (f g) F in general (f f) F (f f) is sub-additive with (f f) (0) = 0 (f g) h = f (g h) Duality with : f g h f g h
Minimal arrival curveThe minimal arrival curve of flow R is R Ø R.Proof:
It is an arrival curve because R(t) – R(s) = R((t-s)+s) - R(s) supu { R((t-s)+u) - R(u) } = (R Ø R) (t-s)
If ’ is another arrival curve for flow R, then R R ’ [use duality rule: f g h f g h ] R Ø R ’ . ∎
Contents1. Introduction 2. Arrival curves3. Service curves, backlog, delay bounds
Service curve: definition Backlog and delay bounds Shapers
Service Curve System S has (minimal/lower) service curve , if F , and
for any arrival process A(t), the delivery process D(t) satisfies: D≥ A⊗ Assuming system is full (some backlog)
S A(t) D(t)
t
D(t)
s
A(s)
A( ) D( ) (t)
Service Curve System S has (minimal/lower) service curve , if F , and for any
arrival process A(t), the delivery process D(t) satisfies: D≥ A⊗ Assuming system is full (some backlog) If is continuous, for all t exists some s≦t such that D(t) - A(s) (t-s) [see hidden foil]
(t)
S A(t) D(t)
t
D(t)
s
A(s)
A( ) D( )
Rate-latency service curve Standard model for Internet (IntServ) router:
(lower) service curve S(t)= Rt+ ⊗ δT E.g.: fixed rate, but (max) packet size L
T=L/R in this case
T
bits
R
seconds
WFQ Scheduler is a Latency Rate Server Notations:
Bound on length of packets GPS departure time of kth packet (any queue) WFQ departure time of same packet
WFQ Delay Theorem [4.3 in KMK]: GPS deliveries for non-empty queue j:
Hence GPS, WFQ have lower service curves:
CLdd kk
maxˆ kd̂kd
maxL
CtduCduugtD N
i i
jt
o N
i i
jt
o jj
11
)()(
CttS N
i i
jGPS
1
)(
CLtCtS N
i i
jWFQ
max
1
)(
LatencyRate Server
Min-plus deconvolution Ø Definition
(f Ø g) (t) = supu { f(t+u) - g(u) }
t
f(t)
g(t)
(f g)(t)
Tight Bound on Backlog If flow has arrival curve and node offers
service curve then the backlog is at most: sup ((s) -(s)) = ( Ø )(0) = v(, ) Proof: simple application of definitions of curves
δ(s)
v(,)
s
Recall (f Ø g) (t) = supu { f(t+u) - g(u) }
Tight Bound on DelayIf flow has arrival curve and node has service
curve then delay h(, )=sups{ δ(s)}, δ(s)= inf{τ≥0:(s)≦(s+τ)} Proof: omitted.
δ(s)
v(,)
s
Theorem: Delay of Enveloped Arrivals Given causal arrivals A with envelope E into element with lower service curve S(t), the departures D satisfy:Namely, delay is at most Where:
Proof: Since S is lower service curve: D≥A*S By definition of :
Hence:
A=A*E, since E is envelope of (causal) A Claim follows (from associativity of convolution *)
max* dAD
}*:inf{),(max SEdSEd d
)*(**maxdEASA
maxd
maxd )*(maxdES
Leaky Bucket via IntServ Router Flow with LB-arrivals, A(t)=b+rT Latency-rate server (e.g. router): B(t)=R(t-T)+
If r ≤ R: buffer≦b+rT , delay≦T+b/R Burstiness of flow increased by rT. If r > R, the bounds are infinite.
data
ArrivalsA(t)=b+rt
b
T
b+rT
T+b/R
Latency-rateService curve:B(t)=R(t-T)+
Leaky Bucket via WFQ Flow with LB-arrivals, A(t)=b+rt Latency-rate server (e.g. router): S(t)=R(t-T)+
If r ≤ R: buffer≦b+rT , delay≦T+b/R Burstiness of flow increased by rT. If r > R, the bounds are infinite.
For WFQ: data
ArrivalsA(t)=b+rt
b
T
B+rT
T+b/R
Latency-rateService curve:S(t)=R(t-T)+
CLtCtS N
i i
jWFQ
max
1
)(
CLT maxCR N
i i
j 1
Details: Network Calculus lecture (or [KMK/BT]
Service Curves: not just lower… Delay often bounded by service curves: S(t) is a (lower/minimal) service curve if D≥A*S S(t) is an upper service curve if DA*S S(t) is a service curve if D=A*S S(t),S(t): non-negative, non-decreasing, causal
S(t)A(t) D(t)
S(t)
The composition theorem Theorem: the concatenation of two network elements each
offering (lower) service curve i offers the (lower) service curve 1 2
Holds for lower, upper service curvers
Cascade of Latency Rate Servers
Latency rate servers: rate r, delay (latency) d Lower service curve of kth server: Sk(t)= rk(t-dk)+
A(t)D1(t) D2(t)S 1 ( t ) Dn(t)
S1(t)
S2(t)
S2(t)
Sn(t)
Sn(t)
)()(*)min(
)))(*)(*)((*)***(
)*(**)*(*)*(
)(**)(*)(
))(**()(
,1
21
21
1
21
21
2211
1
dtrttr
ttttrtrtr
trtrtr
dtrdtrdtr
tSStS
d
d
r
knk
dddn
dndd
nn
n
nk k
n
n
R1 R2
T2
=
T1
Example: Cascade of Two Latency-Rate Servers (IntServ Routers)
R1
T2 T1+T2
Pay Bursts Only Once
D1 D2
D
D b /R + T1 + T2
end to end delay bound is less!!
D1 +D2 (2b + rT1)/ R + T1 + T2
Recall, LB via router: delay≦T+b/R bout=bin+RT
Regulators (aka Shapers) How to ensure envelope E? Regulator: departures envelope is E (any arrivals)
A regulator with envelope E satisfies: Arrivals A(t), Departures D(t), and D(t)A(t) Departures envelope is E (any arrivals) For all st holds D(t)-D(s)E(t-s) D D*E
Regulators (Shapers) Lemma Def: A regulator with envelope E satisfies: Arrivals A(t), Departures D(t), and D(t)A(t) Departures envelope is E (any arrivals) For all st holds D(t)-D(s)E(t-s) D D*E
Lemma:
Proof:
)(*))()((inf)( tEAstEsAtDs
))()((inf)()()()(
)()()()(
stEsAtDstEsAtD
sDtDsDtD
s
Leaky Bucket Regulator / Shaper D(t)-D(s) σ+ρ(t-s) Such process is (σ,ρ)-regulated, or (σ,ρ)-process D has envelope E(t)= σ+ρt for t≥0, E(t)=0 for t<0 Or use notation: E(t)= (σ+ρt)I[t≥0] D(0)=0 for t<0 D, E are causal D=D*E
Called leaky-bucket (LB)regulator / shaper
σ
ρ
A(t ) D (t )X1(t )
X2(t )
Source buffer
Tokenbucket
Leaky Bucket Shaper Operation[fluid model - ignore packetization]
LB becomes empty
buffer becomes empty
buffer nonempty
amount of data in the buffer
departure process
time
σ
LB full
LB nonempty
amount of tokens in LB
Bucket is full
LB Shaper: Properties, Operation Denote peak (input=output) rate by R D(t)-D(s) σ+ρ(t-s) Bucket size σ, average rate ρ Max burst (at rate R ): σR/(R-ρ)
LB becomes empty
buffer becomes empty
buffer nonempty
amount of data in the buffer
time
σ
LB nonempty
σ
LB Shaper Theorem: D=A*E Lemma: Claim: Consider any time t.
If source buffer at t is empty then:
Source buffer non-empty at t bucket empty at t Let v(t) be last time before t bucket was full
At t all tokens were used for departures, so:
)(*))()((inf)( tEAstEsAtD ))()((inf)( stEsAtD
s
))()((inf)()( stEsAtAtDs
}at fullbucket :0sup{)( ststv
))()((inf)()()( stEsAvtvAtDs
A(t): arrivals to LB shaper with envelope E(t)= σ+ρt for t>0, E(t)=0 for t0
Cascade of Leaky Buckets Shapers
Theorem: D2=D1=A*E Associativity: D2=A*(E*E) E*EE , since E is causal (E(t)=0 for t<0) EE*E
Holds for any subadditive E [for all s t holds E(t)E(s)+E(t-s)] E.g. for Leaky Bucket…
E=E*E D2=A*E=D1
A(t)D1(t) D2(t)E(t)=
=(σ+ρt)I[t≥0]
E(t)