Download presentation
Presentation is loading. Please wait.
Published byJared Ball Modified over 9 years ago
1
1 Components performance modelling - Outline of queue networks - Mean Value Analisys (MVA) for open and close queue networks
2
2 Open queue network DISK TAPE outgoing requests incoming requests CPU DISK TAPE CPU M clients Closed queue network (number finite of users)
3
3 Kind of resources in a queue network Load independent Load dependent Delay S(n) R(n) S(n) R(n) S(n) R(n) n n n
4
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 answer time in the queue i R i = S i + W i
5
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 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 time (request goes out from the system if open network) D i = V i S i
6
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 : average request answer 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
7
7 Open queue network DISK TAPE outgoing requests incoming requests CPU
8
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 _ (1-U i ) R i = S i (1 + n i ) = S i + S i X i R i R i (1- U i ) = S i
9
9 Open networks (Single Class) Equations: Then:. R ’ i = V i R i = D i _ (1-U i ) Besides:. n i = U i _ (1-U i ) Because U i = X i S i
10
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. Because:U i = X i S i = V i S i then: = U i / D i because D i = V i S i U i = 1 for the greatest use of the queue i, then we can calculate the greatest that doesn’t make unstable the system: 1 _ max k i=1 D i
11
11 DB Server (example 1) 10.800 request per hour = 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 CPU DISK1 DISK2
12
12 DB Server (example 1). 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 CPU DISK1 DISK2
13
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)
14
14 DISK TAPE CPU M clients Closed queue network (number finite of users)
15
15 Closed networks (Mean Value Analysis) Allows calculating the performance indexes (average response time, throughput, average queue lenght, etc…) for a closed network Iterative method based on the consideration that a queue network results can be calculated from the same network results with a population reduced by one unit. Useful also for hybrid queue networks Definitions. X 0 : average queue 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 stay time for a request at the queue i.
16
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 queue network. Equal to the sum of the R ’ i. n i a : average number of the requests found by a request incoming in the queue. Forced Flow Law Then we have:. X i = X 0 V i
17
17 Mean Value Analysis (Single class) Equations: R i (n) = S i + W i (n) = S i + n i a (n) S i = S i (1+ n i a (n) ) Arrival Theorem: the average number of requests (n i a ) in a queue i that an incoming request find in the same queue, is equal to the average number of requests in the queue i if n-1 requests are in the queue network (n i (n-1) that is n minus what wants the service on the i-th queue) in other words: n i a (n) = n i (n-1) 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))
18
18 Mean Value Analysis (Single class) Equations: Applying Little’s Law to the whole “queue 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)
19
19 Mean Value Analysis (Single class) Three equations: → Residence Time equation R ’ i = D i [1+n i (n-1)] → Throughput equation X 0 = n / K r=1 R ’ i (n) → Queue lenght equation n i (n) = X 0 (n) R ’ i (n)
20
20 Mean Value Analysis (Single class) Iterative procedure: 1.We know that n i (n) = 0 for n=0: if no message is in the queue network, then no message will be in every single queue. 2.Given n i (0) it’s possible to evaluate all R ’ i (1) 3.Given all R ’ i (1) it’s possible to evaluate all n i (1) and X 0 (1) 4.Given all n i (1) it’s possible to evaluate all R ’ i (2) 5.The procedure continues until all n i (n), R ’ i (n) and X 0 (n) are found, where n is the number of requests inside the network.
21
21 DB Server (example 2) 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
22
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 = 0Queue 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 = 0,750
23
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,0333 tx/msec n CPU = X 0 * R’ CPU = 0,625 n DISK = X 0 * R’ DISK = 2,625
24
24 Closed networks (Single Class) - Bounds Bottleneck identification (1/3) Usually the queue 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 _ max k i=1 D i and replacing with X 0 (n): X 0 (n) 1 _ max k i=1 D i
25
25 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)] →R ’ i D i for every queue i, then we have: X 0 (n) = n n _ K r=1 R ’ i K r=1 D i
26
26 Closed networks (Single Class) - Bounds Bottleneck identification (3/3) Combining the preceding two equations we obtain: → X 0 (n) min n _, 1 _ K r=1 D i max k i=1 D i For little n the throughput will increase at the most in a linear way with n, then becomes flat around the value 1/ max k i=1 D i X0X0 n
27
27 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: R 0 (n) n _ max throughput Then for n big the response time increases in a linear way with n: → R 0 (n) n max k i=1 D i On the contrary, for small values of n (n near to 1) the average response time will be: → R 0 (n) = K r=1 D i considering that all waiting times are null.
28
28 Closed networks (Single Class) - Bounds Average response time (2/2) We can establish a lower bound on average response time equal to: → R 0 (n) max K i=1 D i, n ∙ max k i=1 D i
29
29 DB Server (Example 3) New scenarios with regard to preceding 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) ScenarioService demand D CPU Service demand D DISK Di Di 1/ max D i Bottleneck a152,5 * 9 = 22,537,50,044disk b155*5,63 = 28,1543,150,036disk c15/2 = 7,54552,50,022disk a+b152,55*5,63 = 14,0829,080,067CPU a+c15/2 = 7,52,5 * 9 = 22,530,00,044disk
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.