75
Queueing Networks G. Rubino INRIA / IRISA, Rennes, France February 2006

Queueing Netw orks - | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

  • Upload
    lykhanh

  • View
    223

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

!

"

#

$

%

&

'

(QueueingNetworks

G. RubinoINRIA / IRISA, Rennes, FranceFebruary 2006

Page 2: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

!

"

#

$

)* +,Index

1. Open nets: Basic Jackson result 2

2. Open nets: Internet performance evaluation 18

3. Closed nets: Basic Gordon-Newell result 25

4. Closed nets: Convolution algorithm 41

5. Closed nets: Mean Value Analysis (MVA) 47

6. Closed nets: Applications 53

7. Loss nets: The model 58

8. Loss nets: Product-form 62

9. Loss nets: Erlang fixed point approach 72

Open QN G. Rubino, INRIA / IRISA slide 1

Page 3: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

1: Basic Jackson result!

"

#

$

)* +,The basic model

! N nodes; each one is a ./M/1 queue

! in node i,• service rate: µi;• external arrival flow: Poisson with rate !i ! 0;• arrival flows are independent

! routing probabilities (transfer time = 0):• rij = Pr(a customer leaving i goes to j)(i, j = 1, 2, . . . , N )

• ri0 = Pr(a customer leaving i, leaves the network),(i = 1, 2, . . . , N )

• for i = 1, 2, . . . , N ,!N

j=0 rij = 1

! total arrival rate: ! =!N

i=1 !i > 0

Open QN G. Rubino, INRIA / IRISA slide 2

Page 4: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

(1: Basic Jackson result)!

"

#

$

-. /0Example

!1

!2

23

34

13

14

1

2

3

Here, we assume !1 > 0, !2 > 0, !3 = 0.For instance, we have

r1,2 = 1/3, r1,3 = 2/3,

r2,3 = 1/4, r2,0 = 3/4,

r3,0 = 1.

Open QN G. Rubino, INRIA / IRISA slide 3

Page 5: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

(1: Basic Jackson result)!

"

#

$

-. /0The assumptions and the goal

! arrival processes, service processes and switching processes areindependent of each other

! at each server, service times are independent of each other

! at each switching point, switching results are also independent ofeach other

! the goal is to evaluate performance metrics in equilibrium, such as

• mean # of customers at each node, or in the whole network,• mean delay at each node, or at the whole network,• utilization rate of some specific server,• etc.

Open QN G. Rubino, INRIA / IRISA slide 4

Page 6: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

(1: Basic Jackson result)!

"

#

$

-. /0Computing the mean throughput (in equilibrium)

!1

!2

23

34

13

14

1

2

3

Define Ti = mean throughput at i, i = 1, 2, 3, in customers per sec.We have T1 = !1. Then,

T2 = !2 + T1r1,2 = !2 + !1/3,

andT3 = T1r1,3 + T2r2,3 = (3!1 + !2)/4.

Open QN G. Rubino, INRIA / IRISA slide 5

Page 7: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

(1: Basic Jackson result)!

"

#

$

)* +,Extended network

A node 0, representing the environment of the net, with service rate !, isadded as the figure shows.The routing probability from 0 to i is r0i

def= !i/!.

!r0,2

!r0,1

141

3

23

34

!

1

2

3

0

To see that the two networks are equivalent, we use the decompositionproperties of Poisson processes.

Open QN G. Rubino, INRIA / IRISA slide 6

Page 8: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

(1: Basic Jackson result)!

"

#

$

-. /0Eliminating pathological and/or trivial cases

! Seeing the extended network as a graph, we assume it is stronglyconnected. This way, we eliminate the pathological situations inwhich

• nodes will eventually empty,• nodes will eventually explode.

Open QN G. Rubino, INRIA / IRISA slide 7

Page 9: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

(1: Basic Jackson result)!

"

#

$

-. /0A pathological example

Assume an arrow entering a node means that the external arriving flowhas a non-null rate.

Node 2 will explode (at t = "," customers inside).

1

2

3

Here, eliminate node 2.

Open QN G. Rubino, INRIA / IRISA slide 8

Page 10: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

(1: Basic Jackson result)!

"

#

$

-. /0Another pathological example

In this example, node 1 receives no customer. So, at t = ", it is empty.

1

2

3

Here, eliminate node 1.

Open QN G. Rubino, INRIA / IRISA slide 9

Page 11: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

(1: Basic Jackson result)!

"

#

$

)* +,Jackson’s theorem

! Resuming, from

Ti = !i +N"

j=1

Tjrji,

the strongly connected property of the extended graph implies thatthere is an unique (and strictly positive) solution, =# we get the Tis.

This can be seen, from instance, from Markov chain theory, seeingthe extended graph as the graph of a Markov chain.

! Let "i =Ti

µi.

Open QN G. Rubino, INRIA / IRISA slide 10

Page 12: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

(1: Basic Jackson result)!

"

#

$

! If for all i we have "i < 1, then, in equilibrium (Jackson result)

Pr(n1 in 1, . . . , nN in N) =N#

i=1

(1 $ "i)"nii .

This is called a product form result.

! The simplest proof of this result is straightforward:

• argue that the multidimensional stochastic process(L(1)

t , · · · , L(N)t ) is Markov (continuous time, infinite

denumerable state space, homogeneous),

• that it is irreducible (so, when ergodic, only one stationarydistribution),

• and then check that the given expression (product form) satisfiesthe equilibrium equations (Chapman-Kolmogorov equations).

Open QN G. Rubino, INRIA / IRISA slide 11

Page 13: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

(1: Basic Jackson result)!

"

#

$

-. /0Proof of the result concerning the Tis

! Consider a Markov chain in continuous time, with state space{0, 1, · · · , N} and transition probabilities (ri,j). The departure rateof state i is some di > 0.

! The strong connectivity condition means that the chain is irreducible,and then, we know that the system of N + 1 unknowns (x0, · · · , xN )and equations

xi =N"

j=0

xjrji, i = 0, 1, · · · , N

has a unique non-trivial solution up to a factor, and that it iscomposed of strictly positive numbers.

Open QN G. Rubino, INRIA / IRISA slide 12

Page 14: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

(1: Basic Jackson result)!

"

#

$

! Then, choose the solution such that x0 = !. It follows that theremaining xis verify the throughtput equations.Reciprocally, given a solution (T1, · · · , TN) to the throughputequations, then (!, T1, · · · , TN ) is a solution to the auxiliaryhomogeneous system, so, the solution with x0 = !, proving theunicity of the solution in the throughputs.

! Observe that this also gives

for any node i, Ti > 0.

! Given the fact that if #x is the stationary probability of state x in anergodic Markov chain, 1/#x is the relative average frequency ofvisits to that state, we deduce that Ti/! is the expected # of visits acustomer will make to node i before leaving.

! For the same reason, the number!

i Ti/! is the mean number visitsto nodes a customer does before leaving.

Open QN G. Rubino, INRIA / IRISA slide 13

Page 15: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

(1: Basic Jackson result)!

"

#

$

-. /0The marginal distributions

Pr(n1 in 1) ="

n2!0,··· ,nN!0

Pr(n1 in 1, . . . , nN in N)

= · · · = (1 $ "1)"n11

So,

Pr(n1 in 1, . . . , nN in N) =N#

i=1

Pr(ni in i).

We say that the occupation processes at each node (the processesL(1)

t , · · · , L(N)t ) are asymptotically independent.

Open QN G. Rubino, INRIA / IRISA slide 14

Page 16: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

(1: Basic Jackson result)!

"

#

$

-. /0An equivalent view

! Everything happens as if the network was composed of N queuesM/M/1 independent, in parallel, where the ith has arrival rate Ti

and service rate µi (same joint stationary distributions).

! So, mean # of packets at i: Li ="i

1 $ "i=

Ti

µi $ Ti

! Since in the two models, each node i has the same Li and the sameTi, then by Little the mean delay to pass through it is also the same:

Di =1

µi $ Ti

! mean delay to pass through the whole network (Little):

D =1!

N"

i=1

Ti

µi $ Ti

Open QN G. Rubino, INRIA / IRISA slide 15

Page 17: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

(1: Basic Jackson result)!

"

#

$

-. /0Questions

! Since the factors in the product form are geometric, we couldconjecture that arrival flows at each node are Poisson:

• if the network is feedforward, this can be shown to be true: it isbased in Burke’s Theorem: in equilibrium, the output of aM/M/1 queue is Poisson (true also forM/M/c orM/M/"queues)

• if not, the conjecture is false! We still don’t understandcompletely what is happening here.

Open QN G. Rubino, INRIA / IRISA slide 16

Page 18: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

(1: Basic Jackson result)!

"

#

$

)* +,Extensions

! Jackson’s result also holds

• if the nodes are ./M/c or ./M/" queues,

• if the global network has finite storage capacity,• if, more generally, the arrival rates depend on the total # of unitsin the network,and if the service rate at i is a function µi(ni) of the backlog at i.

! There are also different multiclass extensions.

Open QN G. Rubino, INRIA / IRISA slide 17

Page 19: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

2: Internet performance evaluation!

"

#

$

-. /0Analyzing a network of routers

! A packet switching network has N switches, working in datagrammode.

! Denote by cij the speed (or capacity) of the line from i to j (0 meansthat there is no connexion from i to j).

! Let Ci denote the set of switches that can directly receive packetsfrom i, that is,

Ci = {j : cij > 0}.

! Inside switch i there are |Ci| = Mi output queues, eachcorresponding to an output link.Denote by Qij the queue associated with the link connected toj % Ci; it has service rate in pps µij = cij/B.

Open QN G. Rubino, INRIA / IRISA slide 18

Page 20: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

2: Internet performance evaluation!

"

#

$

! A packet leaving i to j, goes to queue Qjk with probability rjk andleaves the network (to go to some host connected to switch j) withprobability rj0.

! This leads to a Jackson model havingM =!

i Mi nodes (one foreach output line leaving a switch).

! Problem: service times are certainly not indep.!Kleinrock approximation: assume they are!!

! Observation: if there are many packets traveling and the speeds arenot too low, the approximation is very good.

Open QN G. Rubino, INRIA / IRISA slide 19

Page 21: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

(2: Internet performance evaluation)!

"

#

$

)* +,Other metrics

! The utilization rate Ui of node i is the probability that, inequilibrium, server i is busy.We have

Ui = "i.

! Assume a customer arrives at a node i (even for a node where!i = 0).Let Ei = mean delay to travel through the whole network for thecustomer.

! In the example, we have E3 = D3. Then,

E2 = D2 +14E3 = D2 +

14D3,

andE1 = D1 +

13E2 +

23E3 = D1 +

13D2 +

34D3.

Open QN G. Rubino, INRIA / IRISA slide 20

Page 22: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

(2: Internet performance evaluation)!

"

#

$

! In general, the system of equations leading to the Eis is

Ei = Di +N"

j=1

rijEj ,

which solution is unique (observe that the system matrix is thetranspose of the one leading to the Tis).

Open QN G. Rubino, INRIA / IRISA slide 21

Page 23: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

(2: Internet performance evaluation)!

"

#

$

)* +,Exercise

Consider the network represented here.

2 3

1

0

After leaving node 0, packets can follow either of the two paths (1) or(2,3). Working on the routing algorithm, we can control the proportion ofpackets using each path.

The output link speed at router i is ci bps; the packets arrive at a rate of! pps; the mean packet size is B bits. We denote by p the fraction ofpackets following path (1).

Problem: find p so that the global delay is minimal, when ! = 104,c0 = c1 = 2 & 107, c2 = 3 & 107, c3 = 4 & 107 and B = 103.

Open QN G. Rubino, INRIA / IRISA slide 22

Page 24: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

(2: Internet performance evaluation)!

"

#

$

-. /0Example (cont.)

! With the usual assumptions, denoting µi = ci/B, we have theJackson network

1 " pµ0

µ3

p! µ1

µ2

1

3

0

2

! The mean delay at each node isD0 = 1/(µ0 $ !),

D1 =1

µ1 $ p!, D2 =

1µ2 $ (1 $ p)!

, D3 =1

µ3 $ (1 $ p)!.

! Simplifying and using as unit of time 100 µs,

D0 = 1, D1 =1

2 $ p, D2 =

12 + p

, D3 =1

3 + p.

Open QN G. Rubino, INRIA / IRISA slide 23

Page 25: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

(2: Internet performance evaluation)!

"

#

$

! Global delay:

D = 1 + pD1 + (1 $ p)(D2 + D3).

Solving dD/dp = 0 we obtain (numerically) the minimal value forp ' 0.4520, and the min delay is ' 1.6742.

! For the same prize, let us compare D1 and D2 + D3:

D1 ? D2 + D3 (# 12 $ p

?1

2 + p+

13 + p

(# 3p2 + 6p $ 4 ? 0.

! So, with p0 = $1 +"

213 ' 0.5275,

p < p0 (resp. p > p0)(# (1) shorter (resp. longer)

! Remark: when p = p0, D1 = D2 + D3 and the total delay is' 1.6791.

Open QN G. Rubino, INRIA / IRISA slide 24

Page 26: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

3: Basic Gordon-Newell result!

"

#

$

)* +,The basic model

! N nodes; each one is a ./M/1 queue

! in node i, mean output rate: µi;

! no external arrivals, no departures to outside

! routing probabilities (transfer time = 0):• rij = Pr(a customer leaving i goes to j)(i, j = 1, 2, . . . , N )

• for i = 1, 2, . . . , N ,!N

j=1 rij = 1

! the graph defined by the routing probabilities is assumed to bestrongly connected (again, everything reduces to this case)

! H customers circulating in the network

Open QN G. Rubino, INRIA / IRISA slide 25

Page 27: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

(3: Basic Gordon-Newell result)!

"

#

$

-. /0Example

13

H customers

23

1

2

3

Open QN G. Rubino, INRIA / IRISA slide 26

Page 28: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

(3: Basic Gordon-Newell result)!

"

#

$

-. /0The assumptions and the goal

! service processes and switching processes are independent of eachother

! service times and switching results are also independent of each otherand of the previous mentioned processes

! the goal is to evaluate performance metrics in equilibrium, such as

• mean # of customers at each node, or in the whole network,• mean delay at each node, or at the whole network,• utilization rate of some specific server,• etc.

Open QN G. Rubino, INRIA / IRISA slide 27

Page 29: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

(3: Basic Gordon-Newell result)!

"

#

$

-. /0Computing the mean throughput (in equilibrium)

13

H customers

23

1

2

3

Define Ti = mean throughput at i, i = 1, 2, 3, in customers per sec.We have T1 = T3 and T2 = T1/3.

Up to this point, the throughputs are known up to a multiplicativeconstant.

Open QN G. Rubino, INRIA / IRISA slide 28

Page 30: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

(3: Basic Gordon-Newell result)!

"

#

$

)* +,Gordon-Newell’s theorem

! From

Ti =N"

j=1

Tjrji,

the strongly connected property of the extended graph! unique (andstrictly positive) solution up to a factor.For instance, let (Vi) be the only solution such that

!Ni=1 Vi = 1.

! Vi is the visit ratio of node i. Recall that Vi > 0.If $i(t) is the number of visits made by a customer to node i in [0, t],then

limt#$

$i(t)$j(t)

=Vi

Vj.

Open QN G. Rubino, INRIA / IRISA slide 29

Page 31: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

(3: Basic Gordon-Newell result)!

"

#

$

! Let Xi =Vi

µi.

! Since we are assuming that all service times are indep., then(Gordon-Newell’s result)

Pr(n1 in 1, . . . , nN in N) =$N

i=1 Xnii

G.

This is called a product form result.

! G is the normalizing constant. It is given by

G ="

n1+···+nN=H

N#

i=1

Xnii .

! Immediate to verify that we can express the product-form usingXi = KVi/µi for any K > 0.

Open QN G. Rubino, INRIA / IRISA slide 30

Page 32: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

(3: Basic Gordon-Newell result)!

"

#

$

-. /0Example

In the example,

13

H customers

23

1

2

3

from V1 = V3 and V2 = V1/3 we have

V1 =37, V2 =

17, V3 =

37.

Open QN G. Rubino, INRIA / IRISA slide 31

Page 33: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

(3: Basic Gordon-Newell result)!

"

#

$

-. /0Example (cont.)

Let us look for the probability that the server in node 3 is busy, for H = 2customers and in the case µi = µ, i = 1, 2, 3.

! Let us denote a = V1/µ and b = V2/µ.

! G = 3a2 + 2ab + b2

! Pr(node 3 busy) = 1 $ Pr(node 3 empty)

Pr(node 3 empty) =a2 + ab + b2

G

! So,

Pr(node 3 busy) =2a2 + ab

3a2 + 2ab + b2=

2125

.

Open QN G. Rubino, INRIA / IRISA slide 32

Page 34: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

(3: Basic Gordon-Newell result)!

"

#

$

-. /0Example (end)

! Since we know the probability that node 3 is not empty, we have

T3 = µ2125

.

! From this, we obtain all the throughputs:

T1 = T3 =21µ25

, T2 =7µ

25.

Open QN G. Rubino, INRIA / IRISA slide 33

Page 35: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

(3: Basic Gordon-Newell result)!

"

#

$

)* +,Proof of Gordon-Newell’s theorem

! The simplest proof of Gordon-Newell’s result is straightforward:

• argue that the multidimensional stochastic process(L(1)

t , · · · , L(N)t ) is Markov (continuous time, infinite

denumerable state space, homogeneous), where L(i)t is the

occupation process (# of customers) of node i at time t;

• the chain is irreducible and the state space is finite; the chain isthen ergodic; there is only one stationary distribution;

• then, check that the given expression (product form) satisfies theequilibrium equations (Chapman-Kolmogorov equations).

• Remark: see that, trivially, the variables L(1)t , · · · , L(N)

t arenever independent (not even for t = "), since

!Hi=1 L(i)

t = H .

Open QN G. Rubino, INRIA / IRISA slide 34

Page 36: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

(3: Basic Gordon-Newell result)!

"

#

$

-. /0The state space

! Vector (L(1)t , · · · , L(N)

t ) lives in the state space%

(n1, . . . , nN ) % INN :N"

i=1

ni = H

&.

! There are'N+H%1

H

(states.

! For instance,• N = 10, H = 20 ! ' 107 states• N = 20, H = 100 ! ' 5 & 1021 states

Open QN G. Rubino, INRIA / IRISA slide 35

Page 37: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

(3: Basic Gordon-Newell result)!

"

#

$

-. /0The convolution operator

! Denote G = G(H).

! Define fi(n) = Xni .

! Clearly, G() is the convolution of f1(), · · · , fN () (recall thatconvolution is commutative and associative).

Open QN G. Rubino, INRIA / IRISA slide 36

Page 38: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

(3: Basic Gordon-Newell result)!

"

#

$

-. /0The marginal distribution

Denote by #i(n) = Pr(n in i) (always, in equilibrium). We have

#i(n) ="

n1+···+nN=H, ni=n

Pr(n1 in 1, . . . , nN in N)

=Xn

i G(i)(H $ n)G(H)

where G(i)() is the convolution of f1(), · · · , fi%1(), fi+1(), · · · , fN ()

Open QN G. Rubino, INRIA / IRISA slide 37

Page 39: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

(3: Basic Gordon-Newell result)!

"

#

$

Pr(at least k at i) = Pr(L(i)$ ! k)

=H"

n=k

Xni G(i)(H $ n)

G(H)

=Xk

i

G(H)

H%k"

n=0

Xni G(i)(H $ k $ n)

=Xk

i G(H $ k)G(H)

.

Open QN G. Rubino, INRIA / IRISA slide 38

Page 40: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

(3: Basic Gordon-Newell result)!

"

#

$

-. /0Throughputs

! We know that Ti = TVi for some T .Since

!Ni=1 Ti = T , T is called mean global throughput.

! We haveTi = (1 $ #i(0))µi = Pr(L(i)

$ ! 1)µi.

Using the previous slide,

Ti =XiG(H $ 1)

G(H)µi = Vi

G(H $ 1)G(H)

.

! The mean global throughput is, then,

T =G(H $ 1)

G(H).

Open QN G. Rubino, INRIA / IRISA slide 39

Page 41: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

(3: Basic Gordon-Newell result)!

"

#

$

! In the example,

G(1) = 2a + b

T =G(1)G(2)

=2a + b

3a2 + 2ab + b2 =4934

µ.

Open QN G. Rubino, INRIA / IRISA slide 40

Page 42: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

4: Convolution algorithm!

"

#

$

)* +,Main idea

! Recall that

#n1,··· ,nN =$N

i=1 Xnii

G(H).

! The problem is G(). Using its definition

G(H) ="

n1+···+nN=H

N#

i=1

Xnii .

is useless except for very small models.

! Key idea: G() is the convolution of f1(), · · · , fN () withfi(n) = Xn

i , and the convolution is commutative and associative.

Open QN G. Rubino, INRIA / IRISA slide 41

Page 43: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

(4: Convolution algorithm)!

"

#

$

-. /0Convolution algorithm

! Denote by Gi() the convolution of f1(), · · · , fi().

! We have that G1() = f1(), G() = GN () and that Gi() is theconvolution of Gi%1() and fi() for i ! 2.

! Working this way, the computation of G() moves from a complexity!

)'N+H%1H

(*to %(NH).

Open QN G. Rubino, INRIA / IRISA slide 42

Page 44: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

(4: Convolution algorithm)!

"

#

$

-. /0Using convolutions

Recall that everything can be computed from these convolutions:

! Thoughputs:

T =G(H $ 1)

G(H)and Ti = TVi

! Marginals:

#i(n) =Xn

i G(i)(H $ n)G(H)

(orH"

n=k

#i(k) =Xk

i G(H $ k)G(H)

)

Open QN G. Rubino, INRIA / IRISA slide 43

Page 45: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

(4: Convolution algorithm)!

"

#

$

! Mean number of customers:

Li =H"

k=1

Xki G(H $ k)

G(H)

! Mean response time: Ri = Li/Ti (Little)

Open QN G. Rubino, INRIA / IRISA slide 44

Page 46: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

(4: Convolution algorithm)!

"

#

$

-. /0Implementing

! We can exhibit another recurrence while computing Gi():

Gi(n) = Gi%1(n) + XiGi(n $ 1).

! This means that to compute G() we can use the schemefor (i=1; i<=N; i++)

for (h=1; h=H; h++)G[h] += X[i]*G[h-1]

Open QN G. Rubino, INRIA / IRISA slide 45

Page 47: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

(4: Convolution algorithm)!

"

#

$

-. /0Possible problems

! Main difficulty: overflows or underflows while computingconvolutions.

! For instance, consider a ring composed of N identical ./M/1 nodes,with H customers. Let µi = 1 for all i. Then,

• By symmetry, Li = H/N , but

G(n) =1

Nn

+n + H $ 1

H

,.

Consider N = 20 and H = 100: Li = 5 but G() has very smallvalues, most of them too small to be stored as double.

! Some solutions exist (dynamic scaling, for instance).

Open QN G. Rubino, INRIA / IRISA slide 46

Page 48: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

5: Mean Value Analysis (MVA)!

"

#

$

)* +,Main idea

! Instead of a recurrence on the nodes, as in the convolution approach,we look for a recurrence on the customers.

! Make explicit the dependency on the number of customers: Li(H),Ri(H).Write Si = 1/µi the mean service time.

! Key result:Ri(H) = Si[1 + Li(H $ 1)].

! From Li(H) = Ti(H)Ri(H), Ti(H) = T (H)Vi and!Ni=1 Li(H) = H we obtain

T (H) =H

!Ni=1 ViRi(H)

.

Open QN G. Rubino, INRIA / IRISA slide 47

Page 49: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

(5: Mean Value Analysis (MVA))!

"

#

$

)* +,MVA scheme

! Start with Li(0) = 0

! CallR(h) the network with h customers.

! The parameters for R(h) are obtained from the following scheme:

• Compute the response times:

Ri(h) = Si[1 + Li(h $ 1)] for i = 1, · · · , N

• Then, compute the global throughput:

T (h) =h

!Ni=1 ViRi(h)

.

• Finally, compute the mean queue lengths:

Li(h) = T (h)ViRi(h) for i = 1, · · · , N

Open QN G. Rubino, INRIA / IRISA slide 48

Page 50: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

(5: Mean Value Analysis (MVA))!

"

#

$

-. /0Properties

! MVA is robust (no overflow or underflow risk)

! Complexity in %(NH) (as for convolution)

! The probabilistic interpretation of the key relationships leads to manyother approximation algorithms, bounding techniques, etc.

Open QN G. Rubino, INRIA / IRISA slide 49

Page 51: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

(5: Mean Value Analysis (MVA))!

"

#

$

-. /0An example of approximation technique based on MVA

! In some problems, we have to evaluate many times a network with alarge number H of customers. This can be costly.

! Schweitzer’s method: forH large, assume

Li(H $ 1) ' H $ 1H

Li(H).

! Write Li(H) as a function of L1(H $ 1), · · · , LN (H $ 1) using theMVA recurrences:

Li(H) =HXi [1 + Li(H $ 1)]

!Nj=1 Xj [1 + Lj(H $ 1)]

Open QN G. Rubino, INRIA / IRISA slide 50

Page 52: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

(5: Mean Value Analysis (MVA))!

"

#

$

! Use Schweitzer’s idea, solve the fixed-point equation

yi =HXi

-1 +

H $ 1H

yi

.

!Nj=1 Xj

-1 +

H $ 1H

yj

.

! It can be proved (using Brower’s fixed point theorems) results aboutexistence and unicity of a fixed point for the previous equation.

! Many improvements of this scheme have been published.

Open QN G. Rubino, INRIA / IRISA slide 51

Page 53: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

(5: Mean Value Analysis (MVA))!

"

#

$

)* +,Extensions

! Gordon-Newell’s result also holds

• if the nodes are ./M/c or ./M/" queues,

• for different multiclass extensions.

! For instance, if node i is of the ./M/" type, we have that for allpopulation sizeH ,

Ri(H) =1µi

.

! If node i is ./M/ci, then

Ri(H) =

/01

02

1µi

if ci ! H,

1µi

(1 $ Li(H $ 1)) if ci < H.

Open QN G. Rubino, INRIA / IRISA slide 52

Page 54: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

6: Applications!

"

#

$

)* +,Client-server models

A standard model of a client-server architecture is depicted in thefollowing figure:

C clients

server

requests

services (answers)

Open QN G. Rubino, INRIA / IRISA slide 53

Page 55: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

(6: Applications)!

"

#

$

-. /0Client-server models (cont.)

! This leads to use a closed queueing network as a representativemodel.

! For instance, the goal can be to evaluate the maximum of the numberof customers that can be served in order to keep the response timelow enough.

! The model can be made more precise, if relevant, as for instance inthe next picture.

Open QN G. Rubino, INRIA / IRISA slide 54

Page 56: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

(6: Applications)!

"

#

$

-. /0Client-server models (cont.)

the clients(a ./M/K node)

p

the server 1 " p

a database (say)2 3

Here, a fraction p of the request sent to the server are followed by arequest to another resource (a database), and then the answer arrives at theclient.

Open QN G. Rubino, INRIA / IRISA slide 55

Page 57: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

(6: Applications)!

"

#

$

-. /0Flow control using windows mechanisms

! Consider a network connection where some window mechanism isused to work with a maximum ofH packets.

! If the connection uses N routers, a simple model allowing to performsome global performance analysis is a closed queuing network withN nodes and H customers organized as a ring.

! As an exercise, assume that we use such a model with identicalrouters, represented as ./M/1 nodes with same mean service time S.Compute the mean RTT (Round Trip Time).

Open QN G. Rubino, INRIA / IRISA slide 56

Page 58: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

(6: Applications)!

"

#

$

-. /0Flow control using windows mechanisms (cont.)

H customers

1 2 N

! We have already observed that, by symmetry, the mean # ofcustomers at node i is Li = H/N .

! The main MVA recurrence gives us the response time:

Ri = S[1 + Li(H $ 1)] = S

-1 +

H $ 1N

..

! The mean throughput in i is given by

Ti =Li

Ri=

H

S(N + H $ 1).

! RTT =!N

i=1 Ri = S(N + H $ 1)

Open QN G. Rubino, INRIA / IRISA slide 57

Page 59: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

7: Loss nets!

"

#

$

-. /0Telephone switches

! A switch in a telephone system can be seen as a G/G/c/c queue.Integer c is the # of channels or circuits.

! The blocking probability or loss probability is the probability that anarriving call finds all channels busy.

! Computing this blocking probability is the basic task in telephonydimensioning.

Open QN G. Rubino, INRIA / IRISA slide 58

Page 60: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

(7: Loss nets)!

"

#

$

-. /0Blocking probabilities

! Assuming that calls arrive according to a Poisson process with rate !,and that the duration of a call is exponentially distributed with meanS, the blocking probability (M/M/c/c model) is

E(", c) ="c/c!!ci=0 "i/i!

,

where " = !S.

! Insensitivity: recall that if we keep the same mean call duration butwe change the distribution (that is, if we consider aM/G/c/c modelwith same "), the result is the same.

Open QN G. Rubino, INRIA / IRISA slide 59

Page 61: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

(7: Loss nets)!

"

#

$

)* +,Networks of switches

! In telephone systems, switches are interconnected by links.

switch i

link l(it has cl circuits)

! Each link has several channels or circuits.

! Calls arrive at a switch and follow a path along the network beforeleaving.

Open QN G. Rubino, INRIA / IRISA slide 60

Page 62: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

(7: Loss nets)!

"

#

$

-. /0Networks of switches (cont.)

! We associate a call with a route along the graph, that can be seen as asequence of consecutive switches or links, without repetitions(acyclic).

! Each call occupies an available circuit on each link of its route.If there is no available link, that is, if at least at one link of the routeall circuits are busy, the call is blocked or lost.

! As in the single-node case, the most important engineering task intelephony is the dimensioning of the system, which needs to evaluatethe blocking probability.

Open QN G. Rubino, INRIA / IRISA slide 61

Page 63: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

8: Product-form!

"

#

$

-. /0Notation and assumptions

! # of switches: N

! # of links: L

! link l has cl circuits

! we assume that calls’ duration has mean 1 with exponentialdistribution

Open QN G. Rubino, INRIA / IRISA slide 62

Page 64: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

(8: Product-form)!

"

#

$

-. /0Notation and assumptions (cont.)

! there are R routes

! the flow of calls arriving to route r is Poisson, with rate !r

! route r is characterized by the sequence of consecutive links that arefollowed by the associated calls

! we define matrix A = (Arl), which is R & L;

Arl = 1{link l belongs to route r}.

Open QN G. Rubino, INRIA / IRISA slide 63

Page 65: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

(8: Product-form)!

"

#

$

-. /0State space

! We analyze the stochastic process Lt = (L(1)t , · · · , L(R)

t ), whereL(r)

t is the # of calls in progress following route r.

! We must respect the constraint

for every link l,R"

r=1

L(r)t Arl ) cl.

! Lt is Markov (homogeneous) with finite state space

S =

%(n1, · · · , nR) % INR : for every link l,

R"

r=1

nrArl ) cl

&.

! Denoting &n = (n1, · · · , nR) and &c = (c1, . . . , cL),

S =3(n1, · · · , nR) % INR : &nA ) &c

4.

Open QN G. Rubino, INRIA / IRISA slide 64

Page 66: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

(8: Product-form)!

"

#

$

-. /0Stationary (product-form) solution

! Assume that for any l we have cl = ".In this case,

• the r.v. L(1)t , · · · , L(R)

t are independent,

• the distribution of L(r)$ is

Pr(L(r)$ = n) =

e%!r!nr

n!= p(!r, n),

• and the joint stationary distribution is

Pr)(L(1)

$ , · · · , L(R)$ ) = (n1, · · · , nR)

*= p(!1, n1) · · · p(!R, nR).

Open QN G. Rubino, INRIA / IRISA slide 65

Page 67: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

(8: Product-form)!

"

#

$

! In our model, routes interfere, but, remarkably enough, the jointdistribution is still proportional to the previous one:

Pr)(L(1)

$ , · · · , L(R)$ ) = (n1, · · · , nR)

*=

p(!1, n1) · · · p(!R, nR)G

.

! G is a normalizing constant:

G ="

(n1,··· ,nR)&S

p(!1, n1) · · · p(!R, nR).

! The proof can be done in a straightforward manner as for Jackson orGordon-Newell models.

Open QN G. Rubino, INRIA / IRISA slide 66

Page 68: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

(8: Product-form)!

"

#

$

-. /0Blocking probabilities

! Let us denote by Sr the following space:

Sr = {(n1, · · · , nR) % S : (n1, · · · , nr + 1, · · · , nR) *% S} .

! A call in route r is lost if it arrives when the network state is in Sr .

! Using PASTA,

blocking probability in route r = Br =Gr

G,

whereGr =

"

(n1,··· ,nR)&Sr

p(!1, n1) · · · p(!R, nR).

! Writing S(&c) and Sr(&c),

Sr(&c) = S(&c $&1rA),

where &1r is the vector ('r1, · · · , 'rR).

Open QN G. Rubino, INRIA / IRISA slide 67

Page 69: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

(8: Product-form)!

"

#

$

-. /0Computational aspects

! The irregular shape of the state space makes difficult the analysis ofthis kind of models if its size is not very small.

! There are recurrences similar to those of Gordon-Newell networks,but they are more complex due to the model’s structure.

! Other possibilities exist, for instance, using Monte Carlo toapproximate the numerator and the denominator of the expression inBr = Gr/G.

Open QN G. Rubino, INRIA / IRISA slide 68

Page 70: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

(8: Product-form)!

"

#

$

-. /0Back to a single node

! Consider the case of a single node, but withK flows (for instance, Kdifferent types or classes or calls) arriving to a switch with c channels.

! Class-k calls arrive with mean intensity !k and their calls last arandom time with exponential distribution and mean 1/µk.

! This is a multiclassM/M/c/c queue with K classes

! State space: S =5&n = (n1, · · · , nK) % INK :

!Kk=1 nk ) c

6.

Open QN G. Rubino, INRIA / IRISA slide 69

Page 71: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

(8: Product-form)!

"

#

$

! The analysis of this model gives

#"n =1G

"n11 · · · "nK

K

n1! · · ·nK !.

The proof consists of verifyng that the evolution of the state withtime is Markov irreducible, of writing the balance equations and thenverifying that the given expression satisfies them.

! See that the loss probability is the same for any class, and that it isgiven by

pL ="

"n: n1+···+nK=c

#"n.

! Let us define N = total number of units in the queue.

Open QN G. Rubino, INRIA / IRISA slide 70

Page 72: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

(8: Product-form)!

"

#

$

We have

Pr(N = m) ="

"n: n1+···+nK=m

#"n

="

"n: n1+···+nK=m

1G

"n11 · · · "nK

K

n1! · · ·nK !

=1G

1m!

"

"n: n1+···+nK=m

m!n1! · · ·nK !

"n11 · · · "nK

K

=1G

1m!

"m,

where " = "1 + · · · + "K .

! So, N behaves as the # of ongoing calls in the classic Erlang Bmodel, and thus the loss probability wee are looking for is simply

pL = E(", c) ="c

c!!c

j=0

"j

j!

.

Open QN G. Rubino, INRIA / IRISA slide 71

Page 73: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

9: Erlang fixed point approach!

"

#

$

-. /0Asymptotic behavior

! It can be shown that if cl $+ " and !r $+ " such that cl/!r iskept constant,

Br $+ 1 $#

l& route r

(1 $ Bl)

where Bl is the locking probability of link l.

! In the limit, the links behave independently.

Open QN G. Rubino, INRIA / IRISA slide 72

Page 74: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

(9: Erlang fixed point approach)!

"

#

$

-. /0The Erlang fixed point idea

! Assume that the links behave independently.The flow of calls in route r arrives at link l with mean rate

!r

#

j& route r, j '=l

(1 $ Bj).

! The global rate arriving at node l is then

$l =R"

r=1

!r

#

j& route r, j '=l

(1 $ Bj).

! Now, use Bl = E($l, cl), to obtain the fixed point equations

for all link l, $l =R"

r=1

!r

#

j& route r, j '=l

(1 $ E($j , cj)).

Open QN G. Rubino, INRIA / IRISA slide 73

Page 75: Queueing Netw orks -  | Institut de Recherche ... TEAC… · Queueing Netw orks G. Rubino INRIA / IRISA, Rennes, France February 2006! " # $) * +

(9: Erlang fixed point approach)!

"

#

$

! Equivalently, we have

for all link l, Bl = E

7

8R"

r=1

!r

#

j& route r, j '=l

(1 $ Bj), cl

9

: .

! It has been shown that these fixed point equations have a solution andthat it is unique.

! The accuracy of this approximation is, in general, very good if thenetwork is large.

Open QN G. Rubino, INRIA / IRISA slide 74