Top Banner

of 68

Queueing Network Beamer

Apr 14, 2018

Download

Documents

chindhuz
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
  • 7/29/2019 Queueing Network Beamer

    1/68

    Introduction to Queueing Networks

    Prof. John C.S. LuiDepartment of Computer Science & Engineering

    The Chinese University of Hong Kong

    John C.S. Lui () Computer System Performance Evaluation 1 / 79

  • 7/29/2019 Queueing Network Beamer

    2/68

    Outline

    Outline

    1 Introduction

    Illustration

    2 Jackson Network

    Example

    Theory on Jackson Networks

    Examples3 Closed Queueing Network

    Example

    Theory of Closed Queueing Network

    Computation Methods

    Convolution Algorithm

    Multiclass Queueing Networks

    BCMP Networks

    Mean Value Analysis (MVA)

    John C.S. Lui () Computer System Performance Evaluation 2 / 79

  • 7/29/2019 Queueing Network Beamer

    3/68

    Introduction Illustration

    Example: Network of Queues

    0

    1!

    0,0 1,0 2,0

    0,1 1,1

    0,2

    ,0k0

    k0-1,1

    ! ! ! !

    ! !!

    !

    1 0

    1

    0

    1

    1

    0

    1 0

    1

    1

    !

    !

    .........

    .........

    .........

    .........

    .........

    John C.S. Lui () Computer System Performance Evaluation 4 / 79

  • 7/29/2019 Queueing Network Beamer

    4/68

    Introduction Illustration

    for k0 > 0, k1 > 0:

    (0 +1 +)p(k0, k1) = 0p(k0 +1, k1 1)+1p(k0, k1 +1)+p(k0 1, k1)

    for k0 > 0, k1 = 0:

    (0

    + )p(k0

    , 0) = 1

    p(k0

    , 1) + p(k0

    1, 0)

    for k0 = 0, k1 > 0:

    (1 + )p(0, k1) = 0p(1, k1 1) + 1p(0, k1 + 1)

    for k0 = 0, k1 = 0: p(0, 0) = 1p(0, 1)

    John C.S. Lui () Computer System Performance Evaluation 5 / 79

  • 7/29/2019 Queueing Network Beamer

    5/68

    Introduction Illustration

    Normalization :

    k0=0

    k1=0

    p(k0, k1) = 1

    p(k0, k1) = (1 0)k00 (1 1)

    k11 for k0, k1 = 0, 1,

    where 0 =0

    ; 1 =1

    ;

    P[N0 = k0] = (1 0)k0

    0

    ; P[N1 = k1] = (1 1)k1

    1

    John C.S. Lui () Computer System Performance Evaluation 6 / 79

    J k N k E l

  • 7/29/2019 Queueing Network Beamer

    6/68

    Jackson Network Example

    Open Queueing Network [Jackson 57]

    It allows "feedback" and "product-form" can still be maintained.

    0

    1

    !

    P0

    P1

    !0

    !0

    !1

    CPU I/O

    p(k0, k1) = (1 0)k00 (1 1)

    k11

    0 = + 1

    1 = 0p1

    John C.S. Lui () Computer System Performance Evaluation 8 / 79

    J k N t k E l

  • 7/29/2019 Queueing Network Beamer

    7/68

    Jackson Network Example

    Therefore,

    0 = 1 p1

    1 =p1

    1 p1

    0 = 0

    0=

    (1 p1)0=

    p00

    1 =11

    =p1

    p01

    What is the average response time of a job?

    John C.S. Lui () Computer System Performance Evaluation 9 / 79

    Jackson Network Example

  • 7/29/2019 Queueing Network Beamer

    8/68

    Jackson Network Example

    By Littles formula, T = N

    where N is the average no. of jobs in the

    "system".

    N = N0 + N1 =

    k0=0

    k1=0

    (k0 + k1)p(k0, k1)

    =

    k0=0

    k1=0

    k0p(k0, k1) +

    k0=0

    k1=0

    k1p(k0, k1)

    =

    k0=0

    k0(1 0)k00

    k1=0

    (1 1)k11

    +

    k0=0

    (1 0

    )k00

    k1=0

    k1

    (1 1

    )k11

    N =0

    1 0+

    11 1

    ; E[T] =N

    =

    0

    1 0+

    11 1

    1

    John C.S. Lui () Computer System Performance Evaluation 10 / 79

    Jackson Network Example

  • 7/29/2019 Queueing Network Beamer

    9/68

    Jackson Network Example

    Types of service centersFCFS and service time is exponentially distributed.Processor sharing (PS)Last come first serve pre-emptive resume (LCFS-PR)Infinite server (IS) or delay nodes

    We also allow a state dependent service rate (i(n) = service rateat the ith node where there is ncustomer).

    Single server fixed rate (SSFR) where i(n) = uiInfinite server (IS) , i(n) = ni

    Queue length dependent (QLD) with service rate i(n)

    John C.S. Lui () Computer System Performance Evaluation 11 / 79

    Jackson Network Theory on Jackson Networks

  • 7/29/2019 Queueing Network Beamer

    10/68

    Jackson Network Theory on Jackson Networks

    Jackson Network

    A queueing network with M nodes (labeled i = 1, 2, , M) s.t.

    Node i is QLD with rate i(n) when it has n customers.

    A customer completing service at a node makes a probabilisticchoice of either leaving the network or entering another node,

    independent of past history.

    The network is open and any external arrivals to node i is from a

    Poisson stream.

    John C.S. Lui () Computer System Performance Evaluation 13 / 79

    Jackson Network Theory on Jackson Networks

  • 7/29/2019 Queueing Network Beamer

    11/68

    Jackson Network Theory on Jackson Networks

    Jackson Network : Continue

    State space S = {(n1, n2, , nM) | ni 0}

    Routing probability matrix Q = (qij | i,j = 1, 2, M)

    qi0 = 1

    Mj=1

    qij

    Let be the "TOTAL" external arrival rate to the open queueingnetwork, the rate to node i is i = q0i for i = 1, 2, M. So

    =M

    i=1

    i (

    q0i = 1)

    John C.S. Lui () Computer System Performance Evaluation 14 / 79

    Jackson Network Theory on Jackson Networks

  • 7/29/2019 Queueing Network Beamer

    12/68

    Jackson Network Theory on Jackson Networks

    All nodes in the Jackson network are QLD with exponential

    service time. Pictorially we can have:

    !1

    "1

    "2

    "3

    !2

    !3

    !4

    M=4

    Let i = mean arrival rate to node i,(i = 1, 2, , M)

    i = i +M

    j=1

    jqji there is unique solution to{i}

    John C.S. Lui () Computer System Performance Evaluation 15 / 79

  • 7/29/2019 Queueing Network Beamer

    13/68

    Jackson Network Theory on Jackson Networks

  • 7/29/2019 Queueing Network Beamer

    14/68

    y

    Jacksons Theorem: For a Jackson Network in steady state with

    arrival rate i to node i,

    The no. of customer at any node is independent of the number of

    customers at every other node.Node i behaves "stochastically" as if it were subjected to Poisson

    arrival rates iLet (n) = Prob[(n1, n2, nM)] where ni 0, for SSFR:

    (n) =M

    i=1

    1

    ii

    ii

    ni

    For QLD, M/M/c queues, define ui(r) = i min(r, ci) for r 0,

    i = 1,.., M, and i = i/i for i = 1, ..M.

    (n) =M

    i=1

    Ci

    nii

    nir=1 i(r)

    ; Ci=

    ci1r=0

    rir!

    +

    ciici!

    1

    1 i/ci

    1

    John C.S. Lui () Computer System Performance Evaluation 17 / 79

  • 7/29/2019 Queueing Network Beamer

    15/68

  • 7/29/2019 Queueing Network Beamer

    16/68

    Jackson Network Theory on Jackson Networks

  • 7/29/2019 Queueing Network Beamer

    17/68

    Comment

    1

    The arrival to each node, in general (unless its only feed forward),is NOT a Poisson process.

    2 How can we compute the T and each node utilization?

    3 Optimal allocation : assume that the open network of SSFR nodes

    with arrival rate i

    and i

    for each node (i = 1, 2, M)

    Min N =

    Mi=1

    ii

    1 ii

    s.t.

    Mi=1

    i = C = constant

    4 Application : Network, distributed system

    John C.S. Lui () Computer System Performance Evaluation 20 / 79

    Jackson Network Examples

  • 7/29/2019 Queueing Network Beamer

    18/68

    Example 1

    Consider a switching facility that transmits messages to a required

    destination. A NACK is sent by the destination when a packet has not

    been properly received. If so, the packet in error is retransmitted as

    soon as the NACK is received.

    Assume the time to send a message and the time to receive a NACK

    are both exponentially distributed with parameter . Assume thatpackets arrive at the switch according to a Poisson process with rate

    0. Let p, 0 < p 1, be the probability that a message is received

    correctly. Derive mean response time T.

    John C.S. Lui () Computer System Performance Evaluation 22 / 79

  • 7/29/2019 Queueing Network Beamer

    19/68

    Jackson Network Examples

  • 7/29/2019 Queueing Network Beamer

    20/68

    Example 2

    Similar to last example but now the switching facility is composed of Knodes in series, each model as M/M/1 queue with switching rate .What is the response time T?

    We have 0i = 0 for i = 2,..., K (no external arrival to nodes

    2,..., K), i = for i = 1, 2,..., K, pi,i+1 = 1 for i = 1,..., K 1, andpK,0 = p and pK,1 = 1 p.

    1 = 0 + (1 p)K, i = i1 for i = 2,..., K. So

    i = 0/p i = 1,..., K.

    John C.S. Lui () Computer System Performance Evaluation 24 / 79

    Jackson Network Examples

  • 7/29/2019 Queueing Network Beamer

    21/68

    By the Jacksons theorem, we have

    (n) =

    p 0

    p

    K

    0

    p

    n1++nKn= (n1, n2, . . . , nK) INK

    provided that 0 < p. Let E[Ni] be the average number of packets in

    queue i:

    E[Ni] =0

    p 0i = 1, . . . , K.

    Let E[T] be the average response time:

    E[T] =K

    i=1

    E[Ni] = K

    1p 0

    .

    John C.S. Lui () Computer System Performance Evaluation 25 / 79

    Jackson Network Examples

  • 7/29/2019 Queueing Network Beamer

    22/68

    Example 3: open central server network

    A computer system with one CPU and two I/O devices. New jobs

    enter the system, wait for CPU resource, then possibly an I/O

    requests. When a job finishes its I/O, it may return for more CPUresource. Eventually a job completes and leave the system.

    It means that K = 3 (three nodes). 0i = 0 for i = 2, 3,p2,1 = p3,1 = 1, while p1,0 > 0.

    The traffic equations are: 1 = 01 + 2 + 3, 2 = 1p1,2,

    3 = 1p1,3. Solving, we have: 1 = 01/p1,0, i =

    01p1,i/p1,0 for

    i = 2, 3. Thus,

    (n)=

    1

    011p1,0

    011p1,0

    n1 3

    i=2

    1

    01p1,i

    ip1,001p1,i

    ip1,0

    ni

    n IN

    3

    E[T] =1

    1p1,0 01

    +3

    i=2p1,i

    ip1,0 01p1,i

    John C.S. Lui () Computer System Performance Evaluation 26 / 79

    Closed Queueing Network Example

  • 7/29/2019 Queueing Network Beamer

    23/68

    Example of Queueing Network

    We fixed the total number of jobs be n in the system, where n is

    also called the degree of multiprogramming.

    0 1

    P0

    P1!0

    !1

    CPU I/O

    new program path

    State representation (k0, k1). Now with the constant thatk0 + k1 = n

    John C.S. Lui () Computer System Performance Evaluation 28 / 79

    Closed Queueing Network Example

  • 7/29/2019 Queueing Network Beamer

    24/68

    Unlike the open queueing network, the state space is finite. The

    flow balance equations are:

    (1 + 0p1)p(k0, k1) = 0p1p(k0 + 1, k1 1) + 1p(k0 1, k1 + 1)

    1p(0, n) = 0p1p(1, n 1)

    0p1p(n, 0) = 1p(n 1, 1)

    John C.S. Lui () Computer System Performance Evaluation 29 / 79

  • 7/29/2019 Queueing Network Beamer

    25/68

    Closed Queueing Network Example

  • 7/29/2019 Queueing Network Beamer

    26/68

    The normalization factor C(n) is chosen s.t

    k0+k1=n& k0,k10

    p(k0, k1) = 1

    The choice of a(where 0 =a0

    , 1 =ap11

    ) is very arbitrary in that

    the value of p(k0, k1) will not change with a.

    If we define 0 = a and 1 = ap1, then (0, 1) as the relative

    throughputof the corresponding nodes.

    We can choose, for example, a= 1 or a= 0. Assume we choosea= 0 , then 0 = 1, 1 =

    0p1

    . Since

    p(k0, k1) =1

    C(n) k

    00 k

    11 =1

    C(n) k

    11

    1 =1

    C(n)

    nk1=0

    k11 =1

    C(n)

    1 n+11

    1 1

    John C.S. Lui () Computer System Performance Evaluation 31 / 79

    Closed Queueing Network Example

  • 7/29/2019 Queueing Network Beamer

    27/68

    C(n) = 1n+1

    111

    where 1 = 1

    n+ 1 where 1 = 1(LHospital Rule)

    John C.S. Lui () Computer System Performance Evaluation 32 / 79

    Closed Queueing Network Example

    If e choose a 1 then 1 p1

  • 7/29/2019 Queueing Network Beamer

    28/68

    If we choose a= 1,then 0 =10

    , 1 =p11

    p(k0, k1) =1

    C(n)

    k00 k11 =

    1

    C(n) 1

    0

    k0

    p11

    k1

    , summing all k0, k1

    1 =n

    k0=0

    nk0k1=nk0

    1

    C(n)

    1

    0

    k0 p11

    k1

    =

    n

    k0=0

    1

    C(n) 1

    0k0 p1

    1nk0

    C(n) =

    nk0=0

    1

    0

    k0 p11

    nk0= (

    p1

    1)n

    nk0=0

    1

    0

    k0 p11

    k0

    =

    p11

    n nk0=0

    1p10

    k0

    C(n) =

    p11

    n1 ( 1p10

    )n+1

    1 1p10

    John C.S. Lui () Computer System Performance Evaluation 33 / 79

    Closed Queueing Network Example

  • 7/29/2019 Queueing Network Beamer

    29/68

    p(k0, k1) =1

    C(n) 1

    0k0

    p11

    k1

    =1

    C(n)

    1

    0

    k0 p11

    nk0=

    1

    C(n)

    p10

    n 1p10

    k0

    p(k0, k1) = 1p

    1

    n

    1 1p10

    1 ( 1p10

    )n+1p1

    1

    n

    1

    p1

    0

    k0

    = (p1)k0

    1 p11

    1 p(n+1)1

    = (p1)(nk1)

    pn

    1

    1 p1

    1 pn+11

    = (p1)k1

    1 p1

    1 pn+11

    John C.S. Lui () Computer System Performance Evaluation 34 / 79

  • 7/29/2019 Queueing Network Beamer

    30/68

    Closed Queueing Network Theory of Closed Queueing Network

    G d N ll t k (1967)

  • 7/29/2019 Queueing Network Beamer

    31/68

    Gordon - Newell network (1967)

    A Gordon-Newell network has M nodes (i = 1, 2, M) s.t.

    Node i is QLD with rate i(n) when there is n customers.a customer completing service at a node chooses a node to enternext probabilistically, independent of past historyThe network is CLOSED and has a fixed population K

    State space:S = {(n1, n2, nM) | ni ,M

    i=1 ni = K}

    |S| =

    K + M 1

    M 1

    VERY LARGE NUMBER

    If M = 5, K = 10, |S| = 1, 001.If M = 10, K = 35, |S| = 52, 451, 256.

    John C.S. Lui () Computer System Performance Evaluation 37 / 79

    Closed Queueing Network Theory of Closed Queueing Network

    Si th i t l i l

  • 7/29/2019 Queueing Network Beamer

    32/68

    Since there is no external arrival, = .Routing probabilities qij satisfy:

    Mj=1

    qij = 1

    traffic equations are:

    i =

    Mj=1

    jqji i = 1, 2, , M

    The number of solutions {i} that satisfy the traffic equations isinfinite.

    All solutions differ by a multiplicative factor C

    Let (e1, e2, eM) be any non-zero solution, that is ei = Ci (visitrate). Define: xi =

    eii

    (e1, e2, eM) is chosen by fixing one component to a convenientvalue, such as e1 = 1

    John C.S. Lui () Computer System Performance Evaluation 38 / 79

  • 7/29/2019 Queueing Network Beamer

    33/68

    Closed Queueing Network Computation Methods

    Computation of G (assume SSFR)

  • 7/29/2019 Queueing Network Beamer

    34/68

    Computation of G (assume SSFR)

    Define S(m, n) = {(n1, nm) | ni 0,mi=1 ni = n}

    G(m, n) =

    nS(m,n)

    mi=1

    xi(ni) where xi =eii

    G(m, n) =

    nS(m,n);

    nm=0

    mi=1

    xnii +

    nS(m,n);

    nm>

    mi=1

    xnii

    = nS(m1,n)

    m1

    i=1

    xi(ni) + xm nS(m,n);

    ki=ni(i=m);

    km=nm1

    m

    i=1

    xi(ki)

    G(m, n) = G(m 1, n) + xmG(m, n 1) m, n>

    John C.S. Lui () Computer System Performance Evaluation 41 / 79

    Closed Queueing Network Computation Methods

  • 7/29/2019 Queueing Network Beamer

    35/68

    In summary, for SSFR queueing network, we have

    G(m, n) = G(m 1, n) +em

    mG(m, n 1) m, n> 0

    G(m, 0) = 1 m > 0G(0, n) = 0 n 0

    John C.S. Lui () Computer System Performance Evaluation 42 / 79

    Closed Queueing Network Computation Methods

  • 7/29/2019 Queueing Network Beamer

    36/68

    mn 0 1 2 3 i M-1 M

    0 1 1 1 1 1

    0e1

    1

    e11

    +e22

    e11

    ( )2

    ..........

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    0

    0

    1

    2

    K-1

    K

    0

    0

    e11( )

    K-1

    e11

    ( )K

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    ei

    ix

    +

    +

    ..........

    John C.S. Lui () Computer System Performance Evaluation 43 / 79

    Closed Queueing Network Computation Methods

    Performance Measures

  • 7/29/2019 Queueing Network Beamer

    37/68

    Performance Measures

    Idle Probability for node i:

    P(NM = 0) =1

    G(M, K)

    nS(M,K);

    nM=0

    M1i=1

    eii

    ni=

    G(M 1, K)

    G(M, K)

    Another way to express it:

    P(Ni = 0) =1

    G(M, K) nS(,k);ni=0

    i1

    j=1

    eij

    nj Mk=i+1

    ekk

    nk

    =G(M\i, K)

    G(M, K)

    John C.S. Lui () Computer System Performance Evaluation 44 / 79

    Closed Queueing Network Computation Methods

    Utilization of node i or (Ui ):

  • 7/29/2019 Queueing Network Beamer

    38/68

    Utilization of node i or (Ui):

    Ui = 1 P[Ni = 0] = 1 G(M\i, K)

    G(M, K)

    How about P[Ni k]:

    P[Ni k] =1

    G(M, K)

    nS(M,K);

    nik

    Mj=1

    ej

    j

    nj

    =1

    G(M, K)

    eii

    k mj=nj(j=i);

    mi=nik;

    nS(M,K);

    nik

    Mj=1

    ej

    j

    mj=

    eii

    k G(M, K k)G(M, K)

    For P[Ni 1]:

    P[Ni 1] = i =

    eii

    G(M, K 1)

    G(M, K)

    (more useful)John C.S. Lui () Computer System Performance Evaluation 45 / 79

    Closed Queueing Network Computation Methods

    The throughout of node i is

  • 7/29/2019 Queueing Network Beamer

    39/68

    g

    i = iUi = ieii

    G(M, K 1)

    G(M, K)= ei

    G(M, K 1)

    G(M, K)

    Prob[ni = k] = i(k) = P[Ni k] P[Ni k + 1]

    i(k) =1

    G(M, K) nS(M,K);

    ni=k

    M

    j=1

    ej

    j

    nj

    =( eii

    )k

    G(M, K)

    nS(M,Kk);

    ni=0

    Mj=1

    ej

    j

    nj=

    eii

    kG(M\i, K k)

    G(M, K)

    i(k) = P[Ni k] P[Ni k + 1]

    =

    eii

    kG(M, K k) eii G(M, K k 1)G(M, K)

    John C.S. Lui () Computer System Performance Evaluation 46 / 79

    Closed Queueing Network Computation Methods

    Expected no. of customer in node i = Li(K)

  • 7/29/2019 Queueing Network Beamer

    40/68

    ( )

    Li(K) =K

    j=1

    jP[Ni = j] =K

    j=1

    P[Ni = j]K

    k=1

    I(kj)

    =K

    k=1

    Kj=k

    P[Ni = j] =K

    k=1

    P[Ni k]

    Li(K) =1

    G(M, K)

    Kk=1

    ei

    ik

    G(M, K k) i = 1, 2, , M

    Derivation of above expression:

    LI(K) = P[Ni = 1] +

    P[Ni = 2] + P[Ni = 2] +

    P[Ni = 3] + P[Ni = 3] + P[Ni = 3] + +

    P[Ni = K] + P[Ni = K] + P[NI = K] + + P[Ni = K]

    John C.S. Lui () Computer System Performance Evaluation 47 / 79

    Closed Queueing Network Convolution Algorithm

    Garden Newell Convolution Algorithm

  • 7/29/2019 Queueing Network Beamer

    41/68

    Garden Newell Convolution Algorithm

    Assume M QLD nodes and K customers

    Define

    fi(Z) =

    k=0

    Xi(k)Zk = 1 + Xi(1)Z + Xi(2)Z

    2 + Xi(3)Z3 +

    = 1 +

    ei

    i(1)

    Z +

    e2i

    i(1)i(2)

    Z2 +

    e3i

    i(1)i(2)i(3)

    Z3 +

    f(Z) = f1(Z)f2(Z) . . . fM(Z)

    The coefficient of Zk in f(Z) the sum of products of the formX1(n1)X2(n2) . . . XM(nM) such that

    i ni = k

    John C.S. Lui () Computer System Performance Evaluation 49 / 79

    Closed Queueing Network Convolution Algorithm

  • 7/29/2019 Queueing Network Beamer

    42/68

    Thus

    f(Z) = 1+G(M, 1)Z+G(M, 2)Z2+G(M, 3)Z3+ +G(M, k)Zk+

    *IDEA: build up f(Z) from partial products gi(Z) so that G(i, k) is

    the coefficient of Zk in gi(Z)

    g1(Z) = f1(Z)

    gi(Z) = gi1(Z)fi(Z) i = 2, 3, , M

    John C.S. Lui () Computer System Performance Evaluation 50 / 79

    Closed Queueing Network Convolution Algorithm

    Therefore,

  • 7/29/2019 Queueing Network Beamer

    43/68

    G(1, k) = coefficient of the Zk term in g1(Z)

    G(1, k) = X1(k) =

    ek1ki=1 1(i)

    G(i, k) =k

    j=0

    G(i 1,j)xi(k j) (convolution!)

    Example :

    G(2, k) =k

    j=0G(1,j)x2(k j)

    = G(1, 0)x2(k) + G(1, 1)x2(k 1) + + G(1, k)x2()

    =ek2

    kj=1 x2(j)

    +e1

    1(1)

    ek12

    k1j=1 2(j)

    +

    John C.S. Lui () Computer System Performance Evaluation 51 / 79

    Closed Queueing Network Convolution Algorithm

  • 7/29/2019 Queueing Network Beamer

    44/68

    k\ 1 2 0 1 1

    1 e11(1)

    2e2

    11(1)1(2)

    3 e3

    11(1)1(2)1(3)

    ......

    Kek

    1

    1(1)...1(k)

    John C.S. Lui () Computer System Performance Evaluation 52 / 79

    Closed Queueing Network Convolution Algorithm

    Performance Measure

  • 7/29/2019 Queueing Network Beamer

    45/68

    Prob[node i has k customers] = i(k):

    i(k) =1

    G(M, K)

    nS(,k);

    ni=k

    X1(n1)X2(n2) . . . XM(nM)

    i(k) = xi(k)

    G(M, K)G(M\i, K k)

    Expected number of customers in node i

    E[Li] =

    Kk=0

    ki(k) = very involve

    Prob[node i 1 customer] = ?

    John C.S. Lui () Computer System Performance Evaluation 53 / 79

    Closed Queueing Network Convolution Algorithm

  • 7/29/2019 Queueing Network Beamer

    46/68

    Utilization of a node, in general, is very involved.

    Ui(K) = Prob[ni 1] =K

    j=1

    Prob[ni = j]

    For a node that is SSFR, we have

    Ui(K) =

    eii

    G(M, K 1)

    G(M, K)

    This holds even the other nodes are QLD servers!!

    John C.S. Lui () Computer System Performance Evaluation 54 / 79

    Closed Queueing Network Convolution Algorithm

    Example :

  • 7/29/2019 Queueing Network Beamer

    47/68

    .

    .

    .

    .

    .

    .

    front end communication

    transaction processing

    query processing

    0P

    1P

    2P

    3

    P

    4P

    terminal

    !"

    !average think time = 1/

    eT = eFp0; eF = eT + eCp2; eC = eFp1 + eD + eP;eD = eCp3; eP = eCp4

    eT = 1; eF =

    1

    p0 ; eC =

    1p0

    p0p2 ; eD =

    (1p0)p3

    p0p2 ; eP =

    (1p4)p4

    p0p2

    T =eT

    = 1

    ; F =1

    p0F; C =

    (1p0)p0p1c

    ; D =(1p0)p3

    p0p20P =

    (1p0)p4p0p2p

    (nT, nF, nC, nD, np) =1

    G

    (T)nT

    nT!(F)

    nF(C)nC(D)

    nD(P)nP

    John C.S. Lui () Computer System Performance Evaluation 55 / 79

    Closed Queueing Network Convolution Algorithm

    UF = ?

  • 7/29/2019 Queueing Network Beamer

    48/68

    Since UF is a SSFR, we have

    UF = F G(5, K 1)G(5, K)

    = 1p0F

    G(5, K 1)G(5, K)

    Average throughput or rate of request completion is:

    = Fp0UF =G(5, k 1)

    G(5, k)

    but Littles Result (N = T)

    T = the expected response time = K

    = KG(5,k)G(5,K1)

    T = average think + average processing time =KG(5,k)

    G(5,K1)

    T = 1 + average processing time =KG(5,k)

    G(5,K1)

    Therefore, average processing time =KG(5,k)

    G(5,K1) 1

    John C.S. Lui () Computer System Performance Evaluation 56 / 79

    Closed Queueing Network Multiclass Queueing Networks

    Multiclass Open/Closed/Mixed Jackson Networks

  • 7/29/2019 Queueing Network Beamer

    49/68

    Setting

    We have K customers and M nodes with i exponential servicerate for i = 1,.., M.

    R, an arbitrary but finite number of classes of customers.

    Let pi,r;j,s be the probability that a customer of class r completes

    service at node i will become class s in node j.

    The pairs (i, r) and (j, s) belong to the same subchain if thesame customer can visit node i in class r and node j in class s.

    Let m be the number of subchains, let E1, . . . , Em be the set ofstates in each subchains.

    John C.S. Lui () Computer System Performance Evaluation 58 / 79

    Closed Queueing Network Multiclass Queueing Networks

    Setting: continue

  • 7/29/2019 Queueing Network Beamer

    50/68

    Let nir be the number of customers of class r at node i. A closed

    system is characterized by(i,r)Ej

    = constant. j = 1, . . . , m.

    For an open system, a Poisson process with 0ir is the external

    arrival rate of class r to node i. Customer may leave the systemwith pi,r;0 so that

    j,s pi,r;j,s + pi,r;0 = 1.

    Define Q(t) = (Q1(t), . . . ,QM(t)) whereQi(t) = (Qi1(t), . . . , QiR(t)) with Qir(t) being the number of class rcustomers at node i. Note that Q(t) is NOT a CTMC because theclass of a customer leaving a node is not known.

    Instead, we define Xi(t) = (Ii1(t), . . . , Ii,|Qi(t)|(t)) whereIij(t) {1, 2,..., R} is the class of the customer in position j innode i at time t. Then (X1(t),...,XM(t)), t 0) is a CTMC.

    John C.S. Lui () Computer System Performance Evaluation 59 / 79

    Closed Queueing Network Multiclass Queueing Networks

    Multiclass Open/Closed/Mixed Jackson Networks: For k {1,..., m} suchthat Ek is an open subchain, let (ir )(i r)E be the "unique" strictly positive

  • 7/29/2019 Queueing Network Beamer

    51/68

    that Ek is an open subchain, let (ir)(i,r)Ek be the unique strictly positivesolution of the traffic equations

    ir =

    0

    ir +

    (j,s)Ekjspj,s;i,r (i, r) Ek.

    For k {1,..., m} such that Ek is a closed subchain, let (ir)(i,r)Ek be anynon-zero solution of

    ir =

    (j,s)Ekjspj,s;i,r (i, r) Ek.

    If

    r:(i,r)belongs to an open subchain ir < i for all i = 1, 2, ..., M, then

    (n) = 1G

    Mi=1

    ni!

    Rr=1

    1nir!

    iri

    nir

    for all n= ((n1),...,(nM)) in the state space, where (ni) = (ni1,..., niR) INR

    and ni = Rr=1 nir. Here, G is the normalization constant.John C.S. Lui () Computer System Performance Evaluation 60 / 79

    Closed Queueing Network Multiclass Queueing Networks

  • 7/29/2019 Queueing Network Beamer

    52/68

    Example

    There are M = 2 nodes and R = 2 classes of customers. There isno external arrival to node 2. External customers enter node 1 in

    class 1 with rate . Upon completion at node 1, a customer ofclass 1 is routed to node 2 with the probability 1. Upon completion

    at node 2, a customer of class a leaves with probability 1.There are always K customers of class 2 in the system. Upon

    service completion at node 1 (resp. node 2), customer of class 2

    is routed back to node 2 (resp. node 1) in class 2 with probability

    1. Let i be the service rate at node i = 1, 2.

    John C.S. Lui () Computer System Performance Evaluation 61 / 79

    Closed Queueing Network Multiclass Queueing Networks

  • 7/29/2019 Queueing Network Beamer

    53/68

    Example: continue

    The state space S is

    S = {(n11, n12, n21, n22) IN4 : n11 0, n21 0, n12 + n22 = K}.

    There are two subchains: E1 (open), and E2 (closed), with

    E1 = {(1, 1), (2, 1)} and E2 = {(1, 2), (2, 2)}.

    We find 11 = 2,1 = and 12 = 22. Take 12 = 22 = 1 for instance.We have

    (n) =1

    G

    n1

    n11

    n2

    n22

    1

    n11

    2

    n21

    1

    1

    n12

    1

    2

    n22

    with < i, i = 1, 2 (stability condition).

    John C.S. Lui () Computer System Performance Evaluation 62 / 79

  • 7/29/2019 Queueing Network Beamer

    54/68

    Closed Queueing Network Multiclass Queueing Networks

  • 7/29/2019 Queueing Network Beamer

    55/68

    Extension to M/M/c

    Let ci 1 be the number of servers at node i and definei(j) = min(ci,j) for i = 1, ..., M. Hence ii(j) is the service rate atnode i when there are j customers. We have

    (n) =1

    G

    Mi=1

    ni

    j=1

    1

    i(j)

    ni!

    R

    r=1

    1

    nir!

    iri

    nir .

    John C.S. Lui () Computer System Performance Evaluation 64 / 79

    Closed Queueing Network Multiclass Queueing Networks

  • 7/29/2019 Queueing Network Beamer

    56/68

    Extension to M/M/c with state-depending routing

    Let the total number of customer be M(n) = Mi=1 ni. Let the externalarrival rate of class r customer at node i be 0ir(M(n)), where is anarbitrary function from IN into [0, ). We have

    (n) =d(n)

    G

    M

    i=1

    ni

    j=1

    1

    i(j)ni!

    R

    r=1

    1

    nir!ir

    i

    nir

    .where

    d(n) =

    M(n)1

    j=0

    (j).

    and d(n) = 1 if the network is closed.

    John C.S. Lui () Computer System Performance Evaluation 65 / 79

    Closed Queueing Network BCMP Networks

  • 7/29/2019 Queueing Network Beamer

    57/68

    A classic piece by F. Baskett, K.M. Chandy, R.R. Muntz and F.G.

    Palacios on Open, Closed, and Mixed Networks of Queues withDifferent Classes of Customers, JACM, 22(2), 1975.

    Terminology

    FCFS: First come first serve M/M/c queue.

    PS: Processor sharing queue.

    LCFS: Last come first serve single server queue.

    IF: Infinite server queue

    John C.S. Lui () Computer System Performance Evaluation 67 / 79

    Closed Queueing Network BCMP Networks

  • 7/29/2019 Queueing Network Beamer

    58/68

    Characterization

    If node i is of type FCFS, then ir = ir/i for r = 1, . . . , R, whereR is the number of classes of customer, and i is the exponentialservice times in node i.

    If node i is of type PS, LCFS, or IS, then ir = ir/ir forr = 1, . . . , R, and

    iris the mean service time for customer of type

    r in node i.

    For nodes of types PS, LCFS, or IS, the service time distribution is

    arbitrary.

    ir is the solution of the traffic equations.

    John C.S. Lui () Computer System Performance Evaluation 68 / 79

    Closed Queueing Network BCMP Networks

    Theorem

  • 7/29/2019 Queueing Network Beamer

    59/68

    For a BCMP network with M nodes and R classes of customer, which

    is open, closed, or mixed in which each node is of type FCFS, PS,

    LCFS, or IS, the steady state probabilities are:

    (n) =d(n)

    G

    M

    i=1fi(ni).

    wheren= (n1, , nM) in the state space S withni = (ni1, ni2, , niR) where nir is the number of jobs of class r atnode i. Moreover, |ni| =

    Rr=1 nir for i = 1, 2, . . . , M.

    G < is the normalization constant such that

    nS

    (n) = 1,d(n) =

    M(n)1j=0 (j) if the arrivals depend on the total number of

    customers M(n) =M

    i=1 |ni|, and d(n) = 1 if the network is closed.

    John C.S. Lui () Computer System Performance Evaluation 69 / 79

    Closed Queueing Network BCMP Networks

    fi(ni) for different types of nodes

  • 7/29/2019 Queueing Network Beamer

    60/68

    If node i is of type FCFS:

    fi(ni) = |ni|!|ni|

    j=1

    1

    i(j)

    Rr=1

    nirirnir!

    If node i is of type PS or LCFS:

    fi(ni) = |ni|!R

    r=1

    nirirnir!

    If node i is of type IS:

    fi(ni) =R

    r=1

    nirirnir!

    John C.S. Lui () Computer System Performance Evaluation 70 / 79

    Closed Queueing Network BCMP Networks

  • 7/29/2019 Queueing Network Beamer

    61/68

    Comment

    Solve the traffic equations ir for i = 1, ..., M and r = 1,..., R.Use queueing network package to solve for G.

    When using queueing network package, all we need to enter arethe topology of the network:

    K, the number and the types of nodes,R classes, androuting matrix [pi,r;j,s].external arrival ratesservice rates, e.g., ii(j), for j = 0, 1,... for a node that is FCFS.service rates ir for customers of class r = 1,...R for a node that is

    PS, LCFS, or IS.

    John C.S. Lui () Computer System Performance Evaluation 71 / 79

    Closed Queueing Network Mean Value Analysis (MVA)

    Mean value analysis [S. Lavenberg & M. Reiser]

  • 7/29/2019 Queueing Network Beamer

    62/68

    Derive expected performance measures while avoiding derivation

    of steady state probability

    0

    b

    a!

    !

    1

    !2CLOSED

    NETWORKArrival

    Departure

    Replace an arc by 1 node 2

    John C.S. Lui () Computer System Performance Evaluation 73 / 79

    Closed Queueing Network Mean Value Analysis (MVA)

  • 7/29/2019 Queueing Network Beamer

    63/68

    Whenever a customer arrives at node (via along 1), it departsfrom the network and is replaced by a

    "stochastically" identical customer who has the same routing

    probability along arc 2

    This open network behaves exactly as the closed one (except

    node )

    John C.S. Lui () Computer System Performance Evaluation 74 / 79

    Closed Queueing Network Mean Value Analysis (MVA)

    Mean Value analysis for state-dependent service rates

  • 7/29/2019 Queueing Network Beamer

    64/68

    The system throughput is still T(K) =KPM

    i=1 viWi(k)

    Let i(j|K) =Prob[node i has j customers where the network hasK customers]

    Wi(K) =

    Kj=1

    i(j 1|K 1) ji(j)

    Example:

    i(0|K 1) 1i(1)

    + i(1|K 1) 2i(2)

    + + i(K 1|K 1) Ki(K)

    John C.S. Lui () Computer System Performance Evaluation 75 / 79

    Closed Queueing Network Mean Value Analysis (MVA)

  • 7/29/2019 Queueing Network Beamer

    65/68

    The mean queue length is:

    Li(K) =K

    j=1

    ji(j|K)

    By definition,i(0|0) = 1 and

    i(j|K) =

    viT(K)i(j)

    i(j 1|K 1) j = 1, 2, . . . , k

    1

    Kk=1 i(k|K) j =

    John C.S. Lui () Computer System Performance Evaluation 76 / 79

    Closed Queueing Network Mean Value Analysis (MVA)

    For the we chosen, let us define the network throughput T asthe average rate customers pass along arc in steady state.

  • 7/29/2019 Queueing Network Beamer

    66/68

    t e a e age ate custo e s pass a o g a c steady state

    Now we can view T as the external arrival rate () in the open

    network.Suppose that we have M nodes in the network. Define

    vi = average number of visit to node i by a customer= (visitation rate)

    i = average arrival rate of customer to node i

    i = Tvi , v0 = vaqab

    But since customers visit node EXACTLY ONCE, v0 = 1,therefore:

    va =1

    qab; vj =

    i=1

    viqij

    Once one vi is found,we can find other vis.

    John C.S. Lui () Computer System Performance Evaluation 77 / 79

    Closed Queueing Network Mean Value Analysis (MVA)

    Looking at node i, let Li= average no. of customers, we have:

    L w L Tv w

  • 7/29/2019 Queueing Network Beamer

    67/68

    Li = iwi , Li = Tviwi

    But sinceM

    i=1 Li = K = TM

    i=1 viwi, therefore the systemthroughput

    T =K

    Mi=1 viwi

    If node i is infinite server,then

    wi =1

    i

    If node i is single server fixed rate (SSFR),

    wi = 1i

    [Yi + 1]

    where Yi is the mean number of customers seen by an arrival to

    node i.

    John C.S. Lui () Computer System Performance Evaluation 78 / 79

    Closed Queueing Network Mean Value Analysis (MVA)

    Example:

    T (K )

  • 7/29/2019 Queueing Network Beamer

    68/68

    i(j|K) = viT(K)i(j)

    i(j 1|K 1) j = 1, 2, . . . , k

    1 K

    k=1 i(k|K) j =

    Assume it is node 1 (that is , i=1)

    1(1|1) =

    v1T(1)

    1(1) 1(|) =

    v1T(1)

    1(1)

    1(|1) = 1 1(1|1)

    1(1|2) =v1T(2)

    1(1)1(|1)

    1(2|2) = v1T(2)2(2)

    1(1|1)

    1(|2) = 1 (1|2) (2|2)

    John C.S. Lui () Computer System Performance Evaluation 79 / 79