a short course on network calculus

45
0 A Short Course on Network Calculus CH1015 Ecublens [email protected] http://icawww.epfl.ch Jean-Yves Le Boudec Patrick Thiran ICA, EPFL

Upload: others

Post on 28-Dec-2021

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: A Short Course on Network Calculus

0

A Short Course on Network Calculus

CH‐1015 [email protected]

http://icawww.epfl.ch

Jean-Yves Le BoudecPatrick Thiran

ICA, EPFL

Page 2: A Short Course on Network Calculus

1

The Network Calculus Book available on-line (free

download) from Le Boudec’s or Thiran’s home page

or

ica1www.epfl.ch/PS_files/NetCal.htm

this presentation : based on chapters 1, 5 and 6 of the online version

Page 3: A Short Course on Network Calculus

2

Contents

1. What is “Network Calculus” ?2. Preliminary Concepts

Sections 1.2, 1.3, 1.4.1

3. Another linear system theory: Min-PlusSection 3.1

4. The composition theoremSection 1.4.2

5. Optimal ShapingSection 1.5

6. Optimal SmoothingReference [54] Le Boudec Verscheure 2000

http://lcawww.epfl.ch/Publications/LeBoudec/LeBoudecV00.pdf

7. Diff-Serv BoundsSection 2.4.2

Page 4: A Short Course on Network Calculus

3

1. What is Network Calculus ?

Deterministic analysis of queuing / flow systems arising in communication networks

Abstraction of schedulers uses min, max as binary operators and

integrals (min-plus. max-plus algebra)

Page 5: A Short Course on Network Calculus

4

A simple example

assume R(t) = sum of arrived traffic in [0, t] is known

required buffer for a bit rate c is sup s t {R(t) - R(s) - c (t-s)}

CBR trunk

bit rate c

XR(t)

Page 6: A Short Course on Network Calculus

52. Preliminary ConceptsArrival and Service Curves

Internet integrated services use the concepts of arrival curve and service curves

Page 7: A Short Course on Network Calculus

6

Arrival Curves

Arrival curve R(t) -R(s) (t-s)

Examples: leaky bucket (u) = ru+b standard arrival curve in the Internet

(u) = min (pu+M, ru+b)

time

bits

b

M

slope r

slope m

Page 8: A Short Course on Network Calculus

7

Arrival Curves can be assumed sub-additive

Theorem: can be replaced by a sub-additivefunction

sub-additive: (s+t) (s) + (t)

concave => subadditive

Page 9: A Short Course on Network Calculus

8

Service Curve

System S offers a service curve to a flow iff for all t there exists some s such that

R * (t ) R(s) (t s)

ts

R*(t)

R(s)

R

R*

Page 10: A Short Course on Network Calculus

9The constant rate server has service curve (t)=ct

Proof: take s = beginning of busy period: R*(t) – R*(s) = c (t-s)R*(t) – R(s) = c (t-s)

buffer

s t

Page 11: A Short Course on Network Calculus

10

The guaranteed-delay node has service curve T

seconds

T

RR*

0 T

T (t)

Function T

t

Page 12: A Short Course on Network Calculus

11The standard model for an Internet router

rate-latency service curve

T

bits

R

seconds

Page 13: A Short Course on Network Calculus

12

Tight Bounds on delay and backlog

If flow has arrival curve and node offers service curve then

backlog sup ((s) -(s)) delay h(, )

h(, )

backlog

Page 14: A Short Course on Network Calculus

13

Example

delay bound: b/R + T backlog bound: b + rT

T

h()

xb

r

R

Page 15: A Short Course on Network Calculus

14

3. Another linear system theory: Min-Plus

Standard algebra: R, +, a (b + c) = (a b) + (a c)

Min-Plus algebra: R, min, +a (b c) = (a b) (a + c)

Page 16: A Short Course on Network Calculus

15

Min-plus convolution Standard convolution:

Min-plus convolutionf g (t) = infu { f(t-u) + g(u) }

duugutftgf )()())((

t

f(t)

g(t)

(f g)(t)

Page 17: A Short Course on Network Calculus

16

r1

r2

s1

s2

u1

=

t1

Examples of Min-Plus convolution

f T (t) = f (t-T) convex piecewise linear curves, put segments

end to end with increasing slope

s1

u1

r1

u1 + t1

r2

Page 18: A Short Course on Network Calculus

17

4. We can express arrival and service curves with min-plus

Arrival Curve property meansR R

Service Curve guarantee meansR* R

Page 19: A Short Course on Network Calculus

18

The composition theorem Theorem: the concatenation of two network elements

each offering service curve i offers the service curve 1 2

Page 20: A Short Course on Network Calculus

19

R1 R2

T2

=

T1

Example tandem of routers

R1

T2 T1+T2

Page 21: A Short Course on Network Calculus

20

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

Page 22: A Short Course on Network Calculus

21

5. Linear Characterization of Shapers

Definition: shaper forces output to be constrained by storesdata in a buffer if needed

Theorem Output of shaper is R* = R

fresh traffic shaper

R R*

Page 23: A Short Course on Network Calculus

22

Proof of Shaper Theorem is a typical Min-Plus result

R*() is the maximum function x() such that (1) x x (2) x R

Solution: x0 = Rxi = xi-1

R* is given by R* = inf {x0, x1, ..., xi, ...} Here: =

xi = R for all i 1R* = R

Page 24: A Short Course on Network Calculus

23

Application: Re-shaping does not increase worst-case delay

Re-shaping is for free: Proof :

h(, 12 ) = h( 12 )= h(12 )

fresh trafficconstrained by

shaper

Page 25: A Short Course on Network Calculus

24

Shaper Keeps Arrival Constraints

The output of the shaper is still constrained by Proof

R* = R (R R R*

shaper input traffic

constrained by R R*

Page 26: A Short Course on Network Calculus

25

6. Optimal Smoothing with pre-fecthing

smoother is a scheduler which produces a -smooth output

may look-ahead Q: given signal R(t), and

what is the minimum playback delay D ?

R(t-D)R’(t) R*(t)

NetworkSmoother

ß(t)

Video display

Video server

R(t)

Page 27: A Short Course on Network Calculus

26

System Equations

(1) R’ is -smooth (2) (R’(t) R(t-D) R’(t) = 0 for t 0

Define min-plus deconvolution (a Ø b)(t) = sups 0 [a(s+t)-b(s)]

x y <-> x Ø y

R(t-D)R’(t) R*(t)

NetworkSmoother

ß(t)

Video display

Video server

R(t)

Page 28: A Short Course on Network Calculus

27

A max-plus model

(1) R’ R’ Ø (2) R’ (R Ø )(t-D) this is a max-plus problem, with minimum

solution x* = inf {x0, x1, ..., xi, ...}

x0 (t) = (R Ø (t-D) xi = xi-1 Ø

thus R’ = (R Ø ) Ø (t-D) = R Ø ( ) (t-D)

R(t-D)R’(t) R*(t)

NetworkSmoother

ß(t)

Video display

Video server

R(t)

Page 29: A Short Course on Network Calculus

28

Example

R(t)R(t)

(t) (t)

-50 0 50 100 150 200 250 300 350 400 450

Frame #

5

4

3

2

1

* 106

R ( )R ( )

minimum value of Dminimum value of D

Page 30: A Short Course on Network Calculus

29

Minimum Playback Delay

D must satisfy :R Ø ( ) (-D) 0

this is equivalent toD h(R, )

Page 31: A Short Course on Network Calculus

30

Back to our example

D=h(R, )D=h(R, )

(t) (t)R(t)R(t)

-50 0 50 100 150 200 250 300 350 400 450

Frame #

5

4

3

2

1

* 106

Page 32: A Short Course on Network Calculus

31

100 200 300 400

2000

4000

6000

8000

10000 R(t)

100 200 300 40010203040506070

tD = 435 ms

100 200 300 400

2000

4000

6000

8000

10000

100 200 300 40010203040506070

t

D = 102 ms

Page 33: A Short Course on Network Calculus

32

Other examples

Bounds for Diff-serv (chapter 2) Packet Scale Rate Guarantee (chapter 7)

� used in the definition of EF (infocom 2001)

Page 34: A Short Course on Network Calculus

337. Diff-Serv Bounds Problem Definition

Consider a network implementing aggregate scheduling� For example: Expedited Forwarding (EF)

Problem: find a bound for the end-to-end delay variation that is � valid for any network topology� has closed form� does not require per flow information

Page 35: A Short Course on Network Calculus

34

microflows constrained by leaky buckets (i, i)

the aggregate receives a guaranteed service, with service curve lll etrt

We assume aggregate scheduling and leaky bucket

constraint microflows4, 4

r1, e1 r2, e2

r4, e4

r3, e3

5, 5 6, 6

1, 12, 2

3, 3

Page 36: A Short Course on Network Calculus

35

Utilization factor = maxl (f f / rl)

Even if network is subcritical ( <1), we don’t know:� good bounds for a general topology� if network is stable

M. Andrews presents an example of a network which is unstable for = 1 and claims it is also true for some < 1

State of the art

Page 37: A Short Course on Network Calculus

36

)1(1

hcrit

Our main result is a delay bound valid for small utilization factors

ehhD

)1(1

A better bound exists when peak rates Cmare known

Page 38: A Short Course on Network Calculus

37

D

Cm not knownCm = 2 r

0.111 0.2000 ms

100 ms

Examples (h=10 hops)

Cm not knowncri= 1 / (h-1) Cm = 2C

cri= 2 / h

Page 39: A Short Course on Network Calculus

38

Derivation of the bound Assume nodes are GR (orFIFO-per aggregate rate latency

service curve elements)1) Assume delay bound hD on low delay traffic (EF) exists,

where h = max number of hops, D = max delay bound per node

2) An arrival curve of aggregate traffic at node i i(t) = m i (mt + (h-1)mD + m) = iRit + (h-1) iRiD +

iRi iwhere i = (m i m )/Ri and i = (m i m )/ (m i rm )

3) Compute horizontal distance between i(t) and i(t):Di= ei + (h-1) iD + ii

4) Deduce D <= (e + )/(1 – (h-1)) wheree = maxi ei , = maxi i and = maxi i

5) Show that finite bound exists at any time t, and let t ->

Ri

Ti

Di

(h-1

) iR

iD +

i

R i

i

iRi

Page 40: A Short Course on Network Calculus

39

No

Consider only cri

Example: � Unidirectional ring with n

nodes� n flows, each of them going

through n hops � cri = 1 [Tassiulas96]

Is the bound tight ?

Page 41: A Short Course on Network Calculus

40

1. No

2. Yes

However, the explosion may always occur at the point predicted by the bound

More precisely, if > h, we can always construct a network where the worst casedelay can be arbitrarily large

Is the bound tight ?

Page 42: A Short Course on Network Calculus

41The elements in our toy network

If transit sources are able to send b packets back to back, then we can arrange the internal source to output a burst of b+1 packets

internal node one internal source

many transit sources

h-1 internal nodes

(h-1) kh inputs1 datasource

1 output

(h-1) kh data sinks

building block

Page 43: A Short Course on Network Calculus

42

level J-1

level J

The output of level J-1 building blocks is a transit source for

level J building blocks

b packets back to back

b+1 packets back to back

Page 44: A Short Course on Network Calculus

43

level J - 2

level J-1

level J

A network where > cri with arbitrarily large delay

The worst-case delay at level J is at least J, with depending only on and h

Page 45: A Short Course on Network Calculus

44

Conclusion

Network Calculus is a set of tools and theories for the deterministic analysis of communication networks

Application of min-plus algebra

Explains and proves delay and backlog properties in networks

Book and slides available online at Le Boudec’s or Thiran’s home page