640 likes | 758 Views
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
E N D
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 • Network calculus • Fixed-rate service and Reich’s equation • Min-Plus Convolution • Arrival curves • 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?
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)
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
Playout Delay to `Hide` Jitter • Lines: actual packet delays • Is output Ok? What size of buffer (backlog)?
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 Service Departures D(t) Arrivals A(t) Buffer X(t)
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: Proof: Work-conserving schedule with output rate C A ( t ) A ( s ) X ( t ) this line has slope C , . - and value A ( s ) + C ( t s ) at t s t time v(t)
Reich’s Equation: Let vbe earliest time after which buffer was not empty: Hence:
Reich’s Equation: Illustration A ( t ) D ( time) A ( s ) X ( t ) this line has slope C , . - and value A ( s ) + C ( t s ) at t b s t time
Departures and Convolutions Two equivalent notations: A*B, A⊗B A(s)=0 for s<0, and (t-s)+=0 for s≥t, hence… Definition: The convolutionA*B of two non-decreasing functions A(t), B(t):+ is: Note: compare to linear systems theory convolution:
Convolution Operation - Visualization A(t)=Ct + slope C t A ( t ) - A ( τ ) + B ( t τ) ( A B )( t ) * B(t-τ) B ( t ) slope ρ s slope ρ t t τ slope C
Convolution Operator: Properties The convolutionA*B is: • 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)} A ( t ) - A ( τ ) + B ( t τ) ( A B )( t ) * slope ρ t τ slope C
Convolutions and the δ (delay) function The convolutionA*B is: Define the delay function as: Since A(t) is non-decreasing: B(t)≥0 is causal if B(t)=0 for t<0; If A, B are causal then…
Network Calculus: Topics • Introduction • Arrival curves • Arrival curve and min-plus convolution • Leaky bucket • Good arrival curves are sub-additive • Minimal arrival curve and min-plus deconvolution • 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: bits bits R1(t) R2(t) 1 2 5 6 7 1 5 5.5 time t time t Fluid model (continuous) Packet model (left continuous)
bits slope r b time Arrival Curves • Flow R has arrival curve (envelope)iff ∀0 st:R(t) -R(s) (t-s) and (x<0)(α(x)=0) Example 1: affine arrival curve gr,b (t) = gr,b(t) = rt+b for t>0, r,b≥0 (Example 2, stair arrival curvekvT,t: hidden next foil) 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(t) b x(t) r
Affine Arrivals are LB-Conforming • Let R* be leaky-bucket conforming arrivals • R* has affine arrival curve (t) = gr,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) gr,b R(t) slope r b b x(t) r
Min-Plus Convolution • Flow R has envelope (arrival curve) iff ∀0 st: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 st, R(t) -R(s) (t-s) R(t) R(s) +(t-s) for all 0 st R(t) infu { R(u) + (t-u) } R R
(f g)(t) Min-plus convolution (cont’) • Definition (fg) (t) = infu { f(t-u) + g(u) } g(t) f(t) 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’ fg f’g’ • Functions passing through origin (f(0) = g(0) = 0): fg f g • Concave functions passing through the origin: fg = f g
lR(t)=Rt dT(t) bR,T(t) Slope (rate) R Rate R delay T latency T bR,T (rate-latency function) lR (delay function) Example: rate latency function dT (delay function) =
Sub-Additive Functions • Recall cumulative flow functions • A function fFis 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
bits slope r b time Affine Arrivals are Sub-Additive • affine arrival curve:gr,b(t) = rt+b for t>0, r,b≥0 • Is sub-additive (and `good`): gr,b(s+t) = r(s+t)+b≦ ≦ rs+b+rt+b = gr,b(s)+ gr,b(t)
Sub-additivity and arrival curves • Flow R has arrival curve a , the sub-additive closure, is arrival curve • What is the sub-additive closure ? • Use min-plus convolution 4k 4k 3k 3k 2k 2k k k 3T 3T 2T 2T T T 4T 4T
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
bits bits slope r slope r b b slope p M time time Combining Two Leaky Buckets • 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 st: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: a(t)=gr,b(t), a’(t)=vT,t(t) • Pick r=1, b=0, T=2, t=0… • Is ’ sub-additive? V2,0(t) [stair function] bits bits g1,0(t) • ’(2.5)=2 • ’( 2)=1 • ’( 0.5)=0.5 4 3 2 ’ slope 1 1 4 6 time 2 time
Combining with Sub-Additive Closure • Flow R has arrival curves , ’ also ’ • Also arrival curves: ⊗ ’ and • The sub-additive closure of ’ • If , ’ are `good`, then ⊗ ’= V2,0(t) [stair function] bits bits g1,0(t) 4 3 ’ 2 slope 1 1 4 6 time 2 time
Minimal arrival curve Assume we only know arrival rate R (empirically) How can we compute the (minimal) arrival curve a ? The answer uses min-plus deconvolution R
(f g)(t) g(t) Min-plus deconvolution Ø • Definition (fØg) (t) = supu { f(t+u) - g(u) } f(t) t
Properties of min-plus deconvolution • (fg) F in general • (ff) F • (ff) is sub-additive with (ff) (0) = 0 • (fg) h = f (g h) • Duality with : fg h f g h
Minimal arrival curve The minimal arrival curve of flow R is a = 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: fg h f g h ] = R Ø R ’ . ∎
Contents • Introduction • Arrival curves • Service curves, backlog, delay bounds • Service curve: definition • Backlog and delay bounds • Shapers
S A(t) D(t) b(t) D(t) A(s) t s Service Curve • System S has (minimal/lower) service curve , if (0)=0, F , and for any arrival process A(t), the delivery process D(t) satisfies: D≥ A⊗ • Assuming system is full (some backlog) A( ) D( )
S A(t) D(t) b(t) D(t) A(s) t s Service Curve • System S has (minimal/lower) service curve , if (0)=0, 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] 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 bits R T 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: Latency Rate Server
(f g)(t) g(t) Min-plus deconvolution Ø • Definition (fØg) (t) = supu { f(t+u) - g(u) } f(t) 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 • Recall (fØg) (t) = supu { f(t+u) - g(u) } δ(s) v(,) s
Tight Bound on Delay If 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 *)