CS147 2015-06-15 CS 147: Computer Systems Performance Analysis Networks of Queues CS 147: Computer Systems Performance Analysis Networks of Queues 1 / 18
Overview CS147 Overview 2015-06-15 Types of Networks Queues in Computer Systems Operational Quantities Operational Laws Bottleneck Analysis Overview Tricks for Solving Networks Mean Value Analysis Hierarchical Decomposition Limitations Types of Networks Queues in Computer Systems Operational Quantities Operational Laws Bottleneck Analysis Tricks for Solving Networks Mean Value Analysis Hierarchical Decomposition Limitations 2 / 18
Types of Networks Networks of Queues CS147 Networks of Queues 2015-06-15 Types of Networks ◮ Many systems consist of interconnected queueing systems ◮ CPU → disk → network ◮ Web client → Web server → Web client ◮ Network of freeways ◮ Fortunate property: M/M/m queues have Poisson departures ⇒ Next queue is M/*/m Networks of Queues ◮ Usually, we assume Poisson service times to make everything simple ◮ Many systems consist of interconnected queueing systems ◮ CPU → disk → network ◮ Web client → Web server → Web client ◮ Network of freeways ◮ Fortunate property: M/M/m queues have Poisson departures ⇒ Next queue is M/*/m ◮ Usually, we assume Poisson service times to make everything simple 3 / 18
Types of Networks Open and Closed Networks CS147 Open and Closed Networks 2015-06-15 Types of Networks ◮ Closed network recirculates jobs ◮ Open network has external arrivals and departures ◮ May also allow recycling ◮ Mixed networks also possible Open and Closed Networks ◮ Closed network recirculates jobs ◮ Open network has external arrivals and departures ◮ May also allow recycling ◮ Mixed networks also possible 4 / 18
Types of Networks An Example Closed Network CS147 An Example Closed Network 2015-06-15 Types of Networks Disk CPU An Example Closed Network Network A closed network can be converted into Disk an open one by cutting any arbitrary flow path; see next slide. CPU Network 5 / 18
Types of Networks An Example Closed Network CS147 An Example Closed Network 2015-06-15 Types of Networks Disk In Out CPU An Example Closed Network Network A closed network can be considered as Disk In Out an open network in which jobs leaving “Out” immediately reenter “In”, i.e., an equilibrium network in which µ Out = λ In . CPU Network 5 / 18
Types of Networks Product-Form Networks CS147 Product-Form Networks 2015-06-15 Types of Networks ◮ We are interested in P ( n 1 , n 2 , . . . , n k ) , i.e., the probability that there are n 1 customers in the first queue, n 2 in the second, etc. ◮ Consider simple linear network: ... µ µ 2 µ k 1 Product-Form Networks ◮ Arrival rate for each queue is λ (why?) ◮ Utilization ρ i = λ/µ i ◮ P( n i jobs in i th queue = p i ( n i ) = ( 1 − ρ i ) ρ n i i ◮ P ( n 1 , n 2 , . . . , n k ) = p 1 ( n 1 ) p 2 ( n 2 ) · · · p k ( n k ) ◮ We are interested in P ( n 1 , n 2 , . . . , n k ) , i.e., the probability that there are n 1 customers in the first queue, n 2 in the second, etc. ◮ Consider simple linear network: ... µ µ 2 µ k 1 ◮ Arrival rate for each queue is λ (why?) ◮ Utilization ρ i = λ/µ i ◮ P( n i jobs in i th queue = p i ( n i ) = ( 1 − ρ i ) ρ n i i ◮ P ( n 1 , n 2 , . . . , n k ) = p 1 ( n 1 ) p 2 ( n 2 ) · · · p k ( n k ) 6 / 18
Types of Networks Generalizing Product-Form Networks CS147 Generalizing Product-Form Networks 2015-06-15 Types of Networks ◮ General form of equilibrium probability: 1 � P ( n 1 , n 2 , . . . , n k ) = kf i ( n i ) G ( N ) i = 1 ◮ G ( N ) is normalizing constant, function of total jobs in system ◮ f i ( n i ) is function of (only) system parameters and n i Generalizing Product-Form Networks ◮ Not always true that each queue behaves as M/M/1 . . . But analysis of each queue is separable ◮ Surprisingly large classes of networks are product-form ◮ General form of equilibrium probability: 1 � P ( n 1 , n 2 , . . . , n k ) = kf i ( n i ) G ( N ) i = 1 ◮ G ( N ) is normalizing constant, function of total jobs in system ◮ f i ( n i ) is function of (only) system parameters and n i ◮ Not always true that each queue behaves as M/M/1 . . . But analysis of each queue is separable ◮ Surprisingly large classes of networks are product-form 7 / 18
Queues in Computer Systems Computer Systems as Queueing Networks CS147 Computer Systems as Queueing Networks 2015-06-15 Queues in Computer Systems Three general types of queues appear in computer systems: Fixed-capacity service center Service time doesn’t depend on number of jobs; i.e., single server with queueing Delay center Service time is random but no queueing; i.e. infinite number of servers (sometimes called IS ) Computer Systems as Queueing Networks Load-dependent service center Service rate depends on load; e.g., M/M/m with m > 1 (runs faster as more servers used) Three general types of queues appear in computer systems: Fixed-capacity service center Service time doesn’t depend on number of jobs; i.e., single server with queueing Delay center Service time is random but no queueing; i.e. infinite number of servers (sometimes called IS ) Load-dependent service center Service rate depends on load; e.g., M/M/m with m > 1 (runs faster as more servers used) 8 / 18
Queues in Computer Systems Operational Quantities Operational Quantities CS147 Operational Quantities 2015-06-15 Queues in Computer Systems ◮ An operational quantity is something that can be observed ◮ Necessarily over some period of time ◮ If period is long enough, approximates a system parameter ◮ Examples: Operational Quantities ◮ Arrival rate λ i = number of arrivals = A i T ≈ λ time ◮ Throughput X i = number of completions = C i T ≈ λ time Operational Quantities ◮ Utilization U i = busy time total time = B i T ≈ ρ ◮ Mean service time S i = total time served number served = B i ≈ µ C i ◮ An operational quantity is something that can be observed ◮ Necessarily over some period of time ◮ If period is long enough, approximates a system parameter ◮ Examples: ◮ Arrival rate λ i = number of arrivals = A i T ≈ λ time ◮ Throughput X i = number of completions = C i T ≈ λ time ◮ Utilization U i = busy time total time = B i T ≈ ρ ◮ Mean service time S i = total time served number served = B i ≈ µ C i 9 / 18
Queues in Computer Systems Operational Quantities Other Useful Quantities CS147 Other Useful Quantities 2015-06-15 Queues in Computer Systems ◮ Number of devices M ◮ Visits per job V i = Number of requests each job makes for device i (can be fractional) Operational Quantities ◮ Demand D i = Seconds of service needed from device i by each job = V i S i ◮ Overall system throughput X = jobs completed = C 0 total time T Other Useful Quantities ◮ Queue length at i : Q i ◮ Response time at i : R i ◮ Think time in interactive systems: Z ◮ Number of devices M ◮ Visits per job V i = Number of requests each job makes for device i (can be fractional) ◮ Demand D i = Seconds of service needed from device i by each job = V i S i ◮ Overall system throughput X = jobs completed = C 0 total time T ◮ Queue length at i : Q i ◮ Response time at i : R i ◮ Think time in interactive systems: Z 10 / 18
Queues in Computer Systems Operational Laws Operational Laws CS147 Operational Laws 2015-06-15 Utilization Law U i = B i T = C i T × B i C i = X i S i Queues in Computer Systems Forced Flow Law X i = XV i ◮ In other words, device i ’s throughput had better be V i times the system throughput or it won’t be Operational Laws able to handle the load Little’s Law Q i = X i R i M General Response Time Law R = � R i V i Operational Laws i = 1 Utilization Law U i = B i T = C i T × B i Interactive Response Time Law For N users, R = ( N / X ) − Z C i = X i S i ◮ Not very profound, since R includes queueing effects: response time is round trip minus what you wasted on your own Forced Flow Law X i = XV i ◮ In other words, device i ’s throughput had better be V i times the system throughput or it won’t be able to handle the load Little’s Law Q i = X i R i M � General Response Time Law R = R i V i i = 1 Interactive Response Time Law For N users, R = ( N / X ) − Z ◮ Not very profound, since R includes queueing effects: response time is round trip minus what you wasted on your own 11 / 18
Queues in Computer Systems Bottleneck Analysis Bottleneck Analysis CS147 Bottleneck Analysis 2015-06-15 ◮ Note that device demands D i are total seconds of service Queues in Computer Systems needed from device i ◮ Some device (or devices) will be the max: D max ◮ This device is the bottleneck device ◮ Improving other device performances can still improve Bottleneck Analysis response time, but most benefit will happen at bottleneck ◮ Asymptotic bounds on performance, as functions of N : � 1 N � Bottleneck Analysis ◮ Note that device demands D i are total seconds of service X ( N ) ≤ min , D max D + Z R ( N ) ≥ max { D , ND max − Z } where D = � D i needed from device i ◮ Some device (or devices) will be the max: D max ◮ This device is the bottleneck device ◮ Improving other device performances can still improve response time, but most benefit will happen at bottleneck ◮ Asymptotic bounds on performance, as functions of N : � � 1 N X ( N ) ≤ min , D max D + Z R ( N ) ≥ max { D , ND max − Z } where D = � D i 12 / 18
Recommend
More recommend