Handling Decisions and Traffic Dependencies in Layered
Total Page:16
File Type:pdf, Size:1020Kb
Handling Decisions and Traffic Dependencies in Layered Queueing Networks by Lianhua Li, B.A.Eng., M.Sc. A thesis submitted to the Faculty of Graduate Studies and Postdoctoral Affairs in partial fulfillment of the requirements for the degree of Doctor of Philosophy in Electrical and Computer Engineering Carleton University Ottawa, Ontario, Canada c 2016 Lianhua Li ii Abstract A Layered Queueing Network (LQN) is a recognized performance modelling technique for performance prediction and evaluation of distributed systems. However, at present LQNs do not handle models with state-based behaviour such as timeouts and aborts, called ‘decisions’ here. This research extends LQNs by incorporating decisions into the model. The XML input language used to describe LQNs has been extended to handle these decisions. Both the LQN simulator, lqsim, and analytic solver, lqns, were then modified to solve models with decisions. The analytic solver uses decomposition and mean value analysis to solve models. Unfortunately, mean value analysis cannot be used to solve models with state-based behaviour. To overcome this limitation, a new approach called Dynamic Parameter Substitution (DPS) is used where intermediate results found while solving the model are used to alter the input parameters for subsequent iterations of the solution. To accomplish this goal, Layered Queueing eXperiment (LQX) language functions were derived to handle timeout and retry decisions and to handle fair-share queueing. The results from solving models using DPS were compared to results found from hybrid modelling, simulation, and where feasible, Petri nets. This research also improves the accuracy of the LQN analytic solver when solv- ing models with traffic dependencies, namely interlocking and sub-chain dependent behaviour. Interlocking occurs from the decomposition of the model into submodels; a single customer from an upper submodel may appear as two or more customers in lower level submodels. Some forms of interlocks were handled by the previous solu- tions, but with some limitations. Sub-chain dependencies are hidden more deeply in LQN models, and are handled for the first time. Sub-chain dependencies occur when traffic from multiple independent clients share a common intermediate server then diverges to lower level servers when this server is acting as a source of customers. This research presents a generalized solution to handle more general cases of inter- iii locks and sub-chain dependencies. The results of the improved solution have good accuracy compared with simulation results and the problems of the extraneous delays and infeasible utilizations are eliminated. iv Acknowledgements I would like to dedicate this thesis to my parents who gave me endless love and encouragement. I would like to express my sincere gratitude to my supervisor, Professor Greg Franks, for his support and advice throughout the years. His guidance is essential in success of this work. I would like to thank my family and friends for their moral support. In particular, I would like to thank my husband, Park, and my son, Tom, for their support and encouragement. I would like to thank Jennifer Poll for her support and timely information. I would also like to thank Naren Mehta, Jerry Buburuz, Kong Chiv, Danny Lemay and Daren Russ for their support and keeping everything in the lab running smoothly. Contents 1 Introduction 1 1.1 Motivation . 2 1.1.1 Making Decisions . 3 1.1.1.1 Methodologies Comparison . 3 1.1.1.2 Method of Dynamic Parameter Substitutions . 6 1.1.1.3 LQN Decision Patterns . 8 1.1.2 Traffic Dependencies . 8 1.2 Contributions . 10 1.2.1 Traffic Dependencies . 10 1.2.2 Decision Making . 11 1.2.3 Published Papers . 12 1.3 Thesis Organization . 13 2 Background 15 2.1 Model-Based Performance Analysis and Techniques . 15 2.1.1 Model-Based Performance Analysis . 16 2.1.2 Model-Driven Performance Engineering . 16 2.2 Analytic Performance Modelling Techniques . 18 2.2.1 Queueing Networks . 18 2.2.2 Extended Queueing Networks . 20 v CONTENTS vi 2.2.3 State-Based Solution Techniques . 21 2.2.4 Stochastic Process Algebra . 22 2.3 Mean Value Analysis . 22 2.3.1 Exact MVA . 23 2.3.2 Bard-Schweitzer AMVA . 23 2.3.3 Linearizer AMVA . 24 2.3.4 Variants of AMVA . 26 2.4 Layered Queueing Networks . 27 2.4.1 LQN Components . 27 2.4.2 Layered Queueing Networks Solver: LQNS . 30 2.4.3 PARASOL: LQN Simulation Engine . 33 2.4.4 LQN Simulation Tool: LQSIM . 35 2.4.4.1 LQSIM Tasks . 35 2.4.4.2 Multi-Server Tasks . 37 2.4.5 Layered Queueing Experiment Language: LQX . 38 2.5 Hybrid Performance Modelling . 40 2.5.1 Hybrid Simulation/Analytic Modelling . 40 2.5.2 Multi-Formalism Hybrid Performance Modelling . 41 2.5.3 Hybrid Modelling Related to LQN . 42 2.6 Modelling Exception Handling Decisions in Resource Allocations . 43 2.6.1 Wu’s HPMM for Handling Decisions . 44 2.7 Summary ................................. 46 3 Interlocks 47 3.1 Interlocking Phenomenon . 47 3.1.1 Problems in the Current Solver . 50 3.1.1.1 Incorrect Distribution of Waiting Time . 51 3.1.1.2 Interlock With External Contention . 52 CONTENTS vii 3.2 Improved Interlock Calculation . 53 3.2.1 The Lower-Level Adjustment . 54 3.2.1.1 Interlocking Probability . 54 3.2.1.2 Interlocking Ratio and Interlocking Relationship . 57 3.2.1.3 The Lower-Level Adjustment . 59 3.2.2 The Upper-Level Adjustment . 61 3.2.2.1 Calculating Upper-Level Adjustment . 63 3.2.2.2 Existence of Mixed Interlocked Flows . 64 3.2.3 Testing the Improved Solution . 65 3.2.3.1 Split Interlocks . 66 3.2.3.2 Split Interlock with External Contention . 67 3.2.3.3 External Contention to a Common Entry . 68 3.3 Sending Interlocks . 69 3.3.1 Types of Sending Interlocks . 70 3.3.2 Improvements on Sending Interlocks . 72 3.3.2.1 T ype1 and T ype2 Sending Interlocks . 72 3.3.2.2 Sending Interlocks with External Contentions . 74 3.3.2.3 Type3 Sending Interlocks . 75 3.4 Interlocking Effects on Second-Phase Servers . 79 3.4.1 Second-Phase Technique . 79 3.4.1.1 Performance Advantages of Second-Phase Technique 79 3.4.2 Interlocking Effects . 81 3.4.2.1 Multi-Phase Clients . 82 3.4.2.2 Multi-Phase Interlocked Server . 83 3.4.2.3 Multi-Phase Intermediate Server . 84 3.4.3 Improvements . 86 3.4.3.1 Multi-Phase Interlocked Server . 87 CONTENTS viii 3.4.3.2 Multi-Phase Intermediate Servers . 88 3.4.4 Results . 91 3.4.4.1 Multi-Phase Interlocked Server . 91 3.4.4.2 Multi-Phase Intermediate Server . 95 3.4.4.3 Randomized Model with Second-Phase Services . 95 3.5 Verification . 97 3.5.1 The Combined Model . 99 3.5.2 Deeply Layered Interlocking Model . 100 3.6 Summary . 101 4 Sub-Chain Dependencies 103 4.1 Sub-Chain Dependencies . 103 4.1.1 Impacts of Sub-Chain Dependencies . 104 4.2 Improved Chain Calculation . 108 4.2.1 The Maximum Number of Customers . 108 4.2.2 Applying MC to Approximate MVA Solutions . 110 4.2.2.1 Applying MC to Bard-Schweitzer AMVA Solutions . 112 4.2.2.2 Linearizer AMVA Solution . 116 4.2.3 Verification . 117 4.3 Sub-Chain Dependency in Parallel Executions . 122 4.3.1 LQN Activities and Their Precedences . 123 4.3.2 Improvements and Results . 125 4.4 Summary . 126 5 Case Study: An Online Bookstore 128 5.1 RADSBookStore . 128 5.1.1 Traffic Dependencies in RADSbookstore . 129 5.1.1.1 Sub-chain dependency . 129 CONTENTS ix 5.1.1.2 Interlocks . 131 5.1.2 Evaluation . 132 5.2 Conclusions . 133 6 Modelling Decisions in LQN 135 6.1 Decisions in LQN . 135 6.2 LQN Decision Patterns . 138 6.2.1 Queue Pattern . 138 6.2.2 Abort Decision Pattern . 139 6.2.3 Infinite-Retry Decision Pattern . 140 6.2.4 Finite-Retry Decision Pattern . 141 6.2.5 Timeout Decision Pattern . 142 6.2.6 LQN Decision Schema . 143 6.2.6.1 Pattern Template in LQN Input Model . 145 6.3 Decisions in LQSIM . 146 6.3.1 Timeout/Abort Decisions . 147 6.3.2 Retry Decisions . 149 6.3.3 LQSIM Results Verification . 153 6.3.3.1 Verification Through GreatSPN . 153 6.3.3.2 Verification Through CSIM . 159 6.4 Dynamic Parameter Substitutions Using LQX . 164 6.4.1 Method of Dynamic Parameter Substitutions . 164 6.4.2 Abort Decision Pattern . 165 6.4.3 Timeout Decision Pattern . 168 6.4.3.1 Algorithm 1 . 168 6.4.3.2 Algorithm 2 . 172 6.4.3.3 Discussions . 173 6.4.4 Infinite-Retry Decision Pattern . 175 CONTENTS x 6.4.5 DPS Demonstration . 178 6.4.5.1 Abort Pattern . 179 6.4.5.2 Infinite-retry Pattern . 179 6.4.5.3 Timeout Pattern . 182 6.5 Summary . 183 7 Analytic Solution of Fair Share Scheduling 185 7.1 Fair Share Scheduling . 185 7.1.1 Group Shares . 187 7.2 Dynamic Parameter Substitution Using LQX . 188 7.2.1 FS Processor Transformation . 189 7.2.2 Mappings to Dynamic Parameters . 190 7.2.3 Redistributing Surplus Shares . ..