queuing networks
play

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)


  1. Queuing Networks - Outline of queuing networks - Mean Value Analisys (MVA) for open and closed queuing networks 1

  2. Open queuing networks outgoing requests incoming requests DISK CPU CD Closed queuing networks (finite number of users) DISK M clients CPU CD 2

  3. Kind of resources in a queuing network S(n) R(n) Load independent n S(n) R(n) Load dependent n S(n) R(n) Delay n 3

  4. Definitions K : number of queues X 0 : network average throughput. If open network in a stationary condition X 0 =  V i : 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) S i : average request service time at the server i W i : average request waiting time in the queue i R i : average request response time in the queue i R i = S i + W i 4

  5. Definitions X i : throughput for the i -th queue X i = X 0 V i 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 open network) R ’ i = V i R i D i : 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 open network) D i = V i S i 5

  6. Q i : 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) Q i = V i W i ------------------------------- R ’ i = V i R i =V i (W i + S i ) = W i V i + S i V i = Q i + D i ------------------------------- R 0 : total average request response time ((from the whole system) R 0 =  k i=1 R ’ i n i : average number of requests waiting or in service at the queue i N : average number of requests in the system N =  k i=1 n i 6

  7. Open queuing networks outgoing requests incoming requests DISK CPU TAPE 7

  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 (n a i ), is equal to the average number of requests in the queue i (n i ). R i (n) = S i + W i (n) = S i + n i S i Using Little’s Law ( n i = X i R i ) and U i = X i S i : R i = S i _ given that ( 1-U i ) R i = S i (1 + n i ) = S i + S i X i R i = S i + U i R i R i (1- U i ) = S i 8

  9. Open networks (Single Class) Equations: Then: R ’ i = V i R i = D i _ ( 1-U i ) besides: because n i = U i _ n i = X i R i ( 1-U i ) R i = S i / (1- U i ) U i = X i S i 9

  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. U i = X i S i =  V i S i Given:  = U i / D i because D i = V i S i then: U i = 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 _ max k i=1 D i 10

  11. DB Server (example 9.1) DISK2 CPU DISK1  =10.800 requests per hour = 3 requests per sec = X 0 D CPU = 0,2 sec Service demand at CPU V DISK1 = 5 V DISK2 = 3 S DISK1 = S DISK2 = 15 msec D DISK1 = V DISK1 * S DISK1 = 5 * 15 msec = 75 msec Service demand at disk 1 D DISK2 = V DISK2 * S DISK2 = 3 * 15 msec = 45 msec Service demand at disk 2 11

  12. DB Server (example 1) DISK2 CPU DISK1 . Service Demand Law U CPU = D CPU * X 0 = 0,2 sec/req * 3 req/sec = 0,6 CPU utilization U D1 = D DISK1 * X 0 = = 0,225 Disk1 utilization U D2 = = 0,135 Disk2 utilization Residence time R’ CPU = D CPU / (1- U CPU ) = 0,5 sec R’ D1 = D DISK1 / (1- U DISK1 ) = 0,097 sec R’ D2 = D DISK2 / (1- U DISK2 ) = 0,052 sec 12

  13. Total response time R 0 = R’ CPU + R’ D1 + R’ D2 = 0,649 sec Average number of requests at each queue n CPU = U CPU / (1- U CPU ) = 0,6 / (1-0,6) = 1,5 n DISK1 = = 0,29 n DISK2 = = 0,16 Total number of requests at the server N = n CPU + n DISK2 + n DISK2 = 1,95 requests RMaximum arrival rate  = 1 _ = 1 _ = 5 req /sec max k i=1 D i max (0,2; 0,075; 0,045) 13

  14. Closed queue network (finite number of users) DISK M clients CPU TAPE 14

  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 . X 0 : average queuing network throughput. . V i : average number of visits for a request at a queue i . . S i : average service time for a request on the server i . . R i : average response time for a request at the queue i (service+waiting time) 15

  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 V i R i . D i : total average service time for a request at the queue i considering all its visits at the queue. Equal to V i S i . R 0 : average response time of the queuing network. Equal to the sum of the R ’ i a : average number of the requests found by a request incoming in the . n i queue. Forced Flow Law Then we have: X i = X 0 V i 16

  17. Mean Value Analysis (Single class) Equations: a (n) S i = S i ( 1 + n i a (n) ) R i (n) = S i + W i (n) = S i + n i a ) in a queue i that Arrival Theorem: the average number of requests (n i 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 (n-1) that is n minus the incoming request that wants the network ( n i service on the i -th queue) a (n) = n i (n-1) ( i.e n i is function of n-1) in other words: n i then: R i = S i (1+n i (n-1)) and multiplying both members for V i R ’ → i = D i (1+n i (n-1)) 17

  18. Mean Value Analysis (Single class) Equations: Applying Little’s Law to the whole “ queuing network” system (n=X 0 R 0 ), we have: X 0 = n / R 0 (n) = n /  K r=1 R ’ → i (n) Applying Little’s Law and Forced Flow Law: → n i (n) = X i (n) R i (n) = X 0 (n) V i R i (n) = X 0 (n) R ’ i (n) 18

  19. Mean Value Analysis (Single class) Three equations: → Residence Time equation R ’ i (n)= D i [ 1+n i ( n-1 )] → Throughput equation X 0 (n)= n /  K r=1 R ’ i (n) → Queue lenght equation n i (n) = X 0 (n) R ’ i (n) 19

  20. Mean Value Analysis (Single class) Iterative procedure: 1. We know that n i (n) = 0 for n =0: if no users is in the queuing network, then no users (requests) will be in every single queue. Given n i (0) it’s possible to evaluate all R ’ 2. i (1) Given all R ’ 3. i (1 ) it’s possible to evaluate all n i (1) and X 0 (1) Given all n i (1) it’s possible to evaluate all R ’ 4. i (2) The procedure continues until all n i (n), R ’ 5. i (n) and X 0 (n) are found, where n is the total number of users (requests) inside the network. 20

  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 D CPU = S CPU = 15 msec CPU service demand D DISK = S DISK * V DISK = 9 * 5 = 45 msec Disk service demand 21

  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 R 0 = 0; Average response time X 0 = 0; Throughput n CPU = 0; Queue lenght at CPU n DISK = 0 Queue lenght at disk n = 1; R’ CPU = D CPU (1+ n CPU (0)) = D CPU = 15 msec; R’ DISK = D DISK (1+ n DISK (0)) = D DISK = 45 msec; R 0 = R’ CPU + R’ DISK = 60 msec; X 0 = n/ R 0 = 0,0167 tx/msec n CPU = X 0 * R’ CPU = 0,250 n DISK = X 0 * R’ DISK = 0,750 22

  23. DB Server (example 2) n = 1; R’ CPU = D CPU (1+ n CPU (0)) = D CPU = 15 msec; R’ DISK = D DISK (1+ n DISK (0)) = D DISK = 45 msec; R 0 = R’ CPU + R’ DISK = 60 msec; X 0 = 1 / R 0 = 0,0167 tx/msec n CPU = X 0 * R’ CPU = 0,250 n DISK = 0,750 n = 2 ; R’ CPU = D CPU (1 + n CPU (1)) = 15 * 1,25 = 18,75 msec; R’ DISK = D DISK (1 + n DISK (1)) = 45 * 1,750 = 78,75 msec; R 0 = R’ CPU + R’ DISK = 97,5 msec; X 0 = 2 / R 0 = 0,0205 tx/msec n CPU = X 0 * R’ CPU = 0,38 n DISK = X 0 * R’ DISK = 1,62 23

  24. The related Markov process 1/Z 50/Z 49/Z . . . 1 2 0 49 50 X 0 (1) X 0 (2) X 0 (50) 24

  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.   1 _ → in open networks: max k i=1 D i and replacing  with X 0 (n): X 0 (n)  1 _ max k i=1 D i 25

  26. Closed networks (Single Class) - Bounds Bottleneck identification (2/3)  from throughput equation of MVA, remembering that R’ i (n) = D i [1 + n i (n-1)] i  D i for every queue i , R ’ → then we have (from Little’s formula): X 0 (n) = n  n _  K i  K r=1 R ’ r=1 D i 26

Recommend


More recommend