Queuing Networks - Outline of queuing networks - Mean Value Analisys - - PowerPoint PPT Presentation

queuing networks
SMART_READER_LITE
LIVE PREVIEW

Queuing Networks - Outline of queuing networks - Mean Value Analisys - - PowerPoint PPT Presentation

Queuing Networks - Outline of queuing networks - Mean Value Analisys (MVA) for open and closed queuing networks 1 Open queuing networks outgoing requests incoming requests DISK CPU CD Closed queuing networks (finite number of users)


slide-1
SLIDE 1

Queuing Networks

1

  • Outline of queuing networks
  • Mean Value Analisys (MVA) for open and closed

queuing networks

slide-2
SLIDE 2

Open queuing networks

2

DISK CD

  • utgoing

requests incoming requests

CPU DISK CD CPU M clients

Closed queuing networks

(finite number of users)

slide-3
SLIDE 3

Kind of resources in a queuing network

3

Load independent Load dependent Delay

S(n) R(n) S(n) R(n) S(n) R(n) n n n

slide-4
SLIDE 4

Definitions

K: number of queues X0: network average throughput. If open network in a stationary condition X0 =  Vi: average number of visits a generic request makes to i server from its generation to its service time (request goes out from the system if open network) Si: average request service time at the server i Wi: average request waiting time in the queue i Ri: average request response time in the queue i Ri = Si + Wi

4

slide-5
SLIDE 5

Definitions

Xi: throughput for the i-th queue Xi = X0 Vi R’

i: average request residence time in the queue i from its creation to

its service completion time (request goes out from the system if

  • pen network)

R’

i = Vi Ri

Di: request service demand to a server in a queue i from its creation to its service completion time (request goes out from the system if

  • pen network)

Di = Vi Si

5

slide-6
SLIDE 6

Qi: total time a request spends waiting in the queue i from its creation to its service time (request goes out from the system if open network) Qi = Vi Wi

  • R’

i = Vi Ri =Vi (Wi + Si) = Wi Vi + Si Vi = Qi + Di

  • R0: total average request response time ((from the whole system)

R0 = k

i=1 R’ i

ni: average number of requests waiting or in service at the queue i N: average number of requests in the system N = k

i=1 ni

6

slide-7
SLIDE 7

7

Open queuing networks

DISK TAPE

  • utgoing

requests incoming requests

CPU

slide-8
SLIDE 8

Open networks (Single Class)

Equations: Arrival theorem (for open networks): the average number of requests in a queue i that an incoming request find in the same queue (na

i), is equal to the average number of requests in the

queue i (ni). Ri(n) = Si + Wi(n) = Si + ni Si Using Little’s Law (ni = Xi Ri) and Ui = Xi Si : Ri = Si _

(1-Ui)

8

given that Ri = Si (1 + ni) = Si + Si Xi Ri= Si + Ui Ri Ri (1- Ui) = Si

slide-9
SLIDE 9

Open networks (Single Class)

Equations: Then: R’

i = Vi Ri = Di _ (1-Ui)

besides: ni = Ui _

(1-Ui)

9

because ni = Xi Ri Ri = Si / (1- Ui ) Ui = Xi Si

slide-10
SLIDE 10

Open networks (Single Class)

Calculation of the greatest  : In an open network the average frequency of users incoming into the network is

  • fixed. For  too much big the network will become unstable, we are then interested

in the greatest value of  that we can apply to the network. Given: Ui = Xi Si =  Vi Si then:

 = Ui / Di because Di = Vi Si

Ui = 1 is the greatest utilization factor of a queue (i.e.= i), then we can calculate the greatest  that doesn’t make unstable the system as:

  1 _

maxk i=1 Di

10

slide-11
SLIDE 11

DB Server

(example 9.1)  =10.800 requests per hour = 3 requests per sec = X0 DCPU = 0,2 sec Service demand at CPU VDISK1 = 5 VDISK2 = 3 SDISK1 = SDISK2 = 15 msec DDISK1 = VDISK1 * SDISK1 = 5 * 15 msec = 75 msec Service demand at disk 1 DDISK2 = VDISK2 * SDISK2 = 3 * 15 msec = 45 msec Service demand at disk 2

11

CPU DISK1 DISK2

slide-12
SLIDE 12

DB Server

(example 1)

.

Service Demand Law UCPU = DCPU * X0 = 0,2 sec/req * 3 req/sec = 0,6 CPU utilization UD1 = DDISK1 * X0 = = 0,225 Disk1 utilization UD2 = = 0,135 Disk2 utilization Residence time R’CPU = DCPU / (1- UCPU ) = 0,5 sec R’D1 = DDISK1 / (1- UDISK1 ) = 0,097 sec R’D2 = DDISK2 / (1- UDISK2 ) = 0,052 sec

12

CPU DISK1 DISK2

slide-13
SLIDE 13

Total response time R0 = R’CPU + R’D1 + R’D2 = 0,649 sec Average number of requests at each queue nCPU = UCPU / (1- UCPU ) = 0,6 / (1-0,6) = 1,5 nDISK1 = = 0,29 nDISK2 = = 0,16 Total number of requests at the server N = nCPU + nDISK2 + nDISK2 = 1,95 requests RMaximum arrival rate  = 1 _ = 1 _ = 5 req /sec

maxk i=1 Di max (0,2; 0,075; 0,045)

13

slide-14
SLIDE 14

14

DISK TAPE CPU M clients

Closed queue network

(finite number of users)

slide-15
SLIDE 15

Closed networks (Mean Value Analysis)

  • Allows calculating the performance indeces (average response time,

throughput, average queue lenght, etc…) for a closed network

  • Iterative method based on the consideration that a queuing network

results can be calculated from the same network results with a population reduced by one unit.

  • Useful also for hybrid queuing networks

Definitions . X0: average queuing network throughput. . Vi: average number of visits for a request at a queue i. . Si: average service time for a request on the server i. . Ri: average response time for a request at the queue i (service+waiting time)

15

slide-16
SLIDE 16

Closed networks (Mean Value Analysis)

Definitions . R’

i: total average stay time for a request at the queue i considering all its visits

at the queue. Equal to Vi Ri . Di: total average service time for a request at the queue i considering all its visits at the queue. Equal to Vi Si . R0: average response time of the queuing network. Equal to the sum of the R’

i

. ni

a: average number of the requests found by a request incoming in the

queue. Forced Flow Law Then we have: Xi = X0 Vi

16

slide-17
SLIDE 17

Mean Value Analysis (Single class)

Equations: Ri(n) = Si + Wi(n) = Si + ni

a(n) Si = Si (1+ ni a(n) )

Arrival Theorem: the average number of requests (ni

a) in a queue i that

an incoming request finds in the same queue is equal to the average number of requests in the queue i when n-1 requests are in the queuing network (ni

(n-1) that is n minus the incoming request that wants the

service on the i-th queue) in other words: ni

a(n) = ni (n-1) (i.e ni is function of n-1)

then: Ri = Si(1+ni(n-1)) and multiplying both members for Vi → R’

i = Di(1+ni(n-1))

17

slide-18
SLIDE 18

Mean Value Analysis (Single class)

Equations: Applying Little’s Law to the whole “queuing network” system (n=X0R0), we have: →

X0 = n / R0(n) = n / K

r=1 R’ i(n)

Applying Little’s Law and Forced Flow Law: → ni(n) = Xi(n) Ri(n) = X0(n) Vi Ri(n) = X0(n) R’

i(n)

18

slide-19
SLIDE 19

19

Mean Value Analysis (Single class)

Three equations: → Residence Time equation R’

i (n)= Di[1+ni(n-1)]

→ Throughput equation

X0 (n)= n / K

r=1 R’ i(n)

→ Queue lenght equation

ni(n) = X0(n) R’

i(n)

slide-20
SLIDE 20

Mean Value Analysis (Single class)

Iterative procedure: 1. We know that ni(n) = 0 for n=0: if no users is in the queuing network, then no users (requests) will be in every single queue. 2. Given ni(0) it’s possible to evaluate all R’

i(1)

3. Given all R’

i(1) it’s possible to evaluate all ni(1) and X0(1)

4. Given all ni(1) it’s possible to evaluate all R’

i(2)

5. The procedure continues until all ni(n), R’

i(n) and X0(n) are found,

where n is the total number of users (requests) inside the network.

20

slide-21
SLIDE 21

DB Server

(example 9.3)

  • Requests from 50 clients
  • Every request needs 5 record read from (visit to) a disk
  • Average read time for a record (visit) = 9 msec
  • Every request to DB needs 15 msec CPU

DCPU = SCPU = 15 msec

CPU service demand

DDISK = SDISK * VDISK = 9 * 5 = 45 msec Disk service demand

21

slide-22
SLIDE 22

DB Server

(example 2) Using MVA Equations n = 0; Number of concurrent requests R’CPU = 0; Residence time for CPU R’DISK = 0; Residence time for disk R0 = 0; Average response time X0 = 0; Throughput nCPU = 0; Queue lenght at CPU nDISK = 0 Queue lenght at disk n = 1; R’CPU = DCPU (1+ nCPU(0)) = DCPU = 15 msec; R’DISK = DDISK (1+ nDISK(0)) = DDISK = 45 msec; R0 = R’CPU + R’DISK = 60 msec; X0 = n/ R0 = 0,0167 tx/msec nCPU = X0 * R’CPU = 0,250 nDISK = X0 * R’DISK = 0,750

22

slide-23
SLIDE 23

23

DB Server

(example 2)

n = 1; R’CPU = DCPU (1+ nCPU(0)) = DCPU = 15 msec; R’DISK = DDISK (1+ nDISK(0)) = DDISK = 45 msec; R0 = R’CPU + R’DISK = 60 msec; X0 = 1 / R0 = 0,0167 tx/msec nCPU = X0 * R’CPU = 0,250 nDISK = 0,750 n = 2; R’CPU = DCPU (1 + nCPU(1)) = 15 * 1,25 = 18,75 msec; R’DISK = DDISK (1 + nDISK(1)) = 45 * 1,750 = 78,75 msec; R0 = R’CPU + R’DISK = 97,5 msec; X0 = 2 / R0 = 0,0205 tx/msec nCPU = X0 * R’CPU = 0,38 nDISK = X0 * R’DISK = 1,62

slide-24
SLIDE 24

The related Markov process

24

50/Z 1 2 49/Z 1/Z 49 50

. . .

X0(1) X0(2) X0(50)

slide-25
SLIDE 25

Closed networks (Single Class) - Bounds

Bottleneck identification (1/3) Usually the queuing network throughput will reach saturation if requests increase inside the system; we are then interested in finding the component in the system that causes saturation. → in open networks:   1 _

maxk i=1 Di

and replacing  with X0 (n): X0 (n)  1 _ maxk

i=1 Di

25

slide-26
SLIDE 26

Closed networks (Single Class) - Bounds

Bottleneck identification (2/3)

  • from throughput equation of MVA, remembering that

R’i (n) = Di [1 + ni(n-1)] → R’

i  Di for every queue i,

then we have (from Little’s formula): X0 (n) = n  n _

K r=1 R’ i K r=1 Di

26

slide-27
SLIDE 27

Closed networks (Single Class) - Bounds

Bottleneck identification (3/3)

  • Combining the preceding two equations we obtain:

→ X0 (n)  min n _ , 1 _

K r=1 Di maxk i=1 Di

For little n the throughput will increase at the most in a linear way with n, then becomes flat around the value 1/ maxk

i=1 Di

27

X0 n

slide-28
SLIDE 28

Closed networks (Single Class) - Bounds

Average response time (1/2) When throughput reaches its greatest value (that is for n big) the average response time is equivalent to: R0 (n)  n _ max throughput Then for n big the response time increases in a linear way with n: → R0 (n)  n maxk

i=1 Di

On the contrary, for small values of n (n near to 1) the average response time will be: → R0 (n) = K

r=1 Di

considering that all waiting times are null.

28

slide-29
SLIDE 29

Closed networks (Single Class) - Bounds

Average response time (2/2) We can establish a lower bound on average response time equal to: → R0 (n)  max K

i=1 Di , n ∙ maxk i=1 Di

29

slide-30
SLIDE 30

DB Server

(Example 9.4) New scenarios with regard to previous example:

  • a. index variation in DB (# of disk access equal to 2,5 (before was 5))
  • b. 60% faster Disk (average service time = 5,63 msec)

c. faster CPU (service demand = 7,5 msec)

Scenario Service demand DCPU Service demand DDISK  Di 1/ maxDi Bottleneck a 15 2,5 * 9 = 22,5 37,5 0,044 disk b 15 5*5,63 = 28,15 43,15 0,036 disk c 15/2 = 7,5 45 52,5 0,022 disk a+b 15 2,5*5,63 = 14,08 29,08 0,067 CPU a+c 15/2 = 7,5 2,5 * 9 = 22,5 30,0 0,044 disk

30