Autonomic Workload Execution Control Using Throttling Wendy Powley, Patrick Martin, Mingyi Zhang School of Computing, Queen’s University, Canada Paul Bird, Keith McDonald IBM Toronto Lab, Canada March 1, 2010
Acknowledgements This work is supported by IBM’s Center for Advanced Studies (CAS), IBM Canada Ltd., Toronto, ON, Canada; Natural Science and Engineering Research Council (NSERC) of Canada; Ontario Centers of Excellence for Communication and Information Technology (OCE-CCIT); and Queen's University, Kingston, ON, Canada. 4/4/2019 8:15 AM SMDB 2010
Outline Introduction Query throttling approaches Throttling control mechanisms Step function controller Black-box model controller Experimental validation Conclusions & future research 4/4/2019 8:15 AM SMDB 2010
Introduction In a data server environment, there may be multiple types of workloads simultaneously present On-line transactional processing (OLTP) workloads On-line analytical processing (OLAP) workloads Workloads can come from different sources and have different priorities and performance goals There is an interdependency among the concurrently running workloads Workloads compete for shared system resource Some workloads may miss their performance goals 4/4/2019 8:15 AM SMDB 2010
Introduction (cont) Workload management for database management systems (DBMSs) aims to meet performance objectives for all workloads We previously proposed a workload execution control technique - query throttling [1] It slows down long-running and resource intensive queries to free up shared system resources for more important workloads W. Powley, P. Martin and P. Bird, “DBMS Workload Control Using Throttling: Experimental Insights”. In CASCON ’08: Proc. of the 2008 Conf. of the Center for Advanced Studies on Collaborative Research. Toronto, Canada. October 2008. pp. 1-13. 4/4/2019 8:15 AM SMDB 2010
Query Throttling Approaches Two approaches of the query throttling Constant throttling Interrupt throttling An example query execution time: 100(s) throttle percentage: 50% constant throttle pause length: 1.0(s) then: tw = 100(s) throttle time = 100(s) * 50% = 50(s) tc = 1.0(s) k = 50(s) / 1.0(s) = 50 ti = 50(s) 4/4/2019 8:15 AM SMDB 2010
Autonomic Control Mechanism In this study, we specifically consider Query throttling approaches as a component of a self- managing DBMS We apply autonomic computing principles to dynamically control the amount of throttling We examine two different types of controllers A step function controller A black-box model controller Feedback Loop 4/4/2019 8:15 AM SMDB 2010
Autonomic Control Mechanism (cont) The Analyzer considers a goal achieved when where, Pc is the current performance, Pg is the goal, and ε is the acceptable boundary The Planner determines the amount of throttling Important workloads meet performance goals Less important workloads are not penalized more than necessary An effector implements the constant throttling approach 4/4/2019 8:15 AM SMDB 2010
Step Function Controller The controller determines the amount of throttling in n-th step where, , th0 = 0, and Δ is the adjustment amount for throttling in a step Distance between the goal and the actual performance The adjustment amount of throttling if then where, σ is a defined threshold where, n is the number of steps, and thmax is the maximum amount of throttling A Diminishing Step Function 4/4/2019 8:15 AM SMDB 2010
DBMS Black-box Model A DBMS black-box model: The control input u( k ): the amount of throttling imposed on less important workloads (OLAP) The measured output y( k ): the throughput of important workloads (OLTP) The disturbance input ( d ): system’s mix of workloads DBMS Black-box Model 4/4/2019 8:15 AM SMDB 2010
Black-box Model Controller The relationship between inputs and outputs: where: y( k+1 ): predicted throughput in the (k+1)st time unit y( k ): measured throughput in the k-th time unit u( k ): the amount of throttling in the k-th time unit a and b: the model parameters, which are determined experimentally The model is built for the worst-case scenario The highest ratio of less important to important workloads The mix of workloads is unpredictable and changes over time For other scenarios controller favors more important workloads by over-estimating the level of throttling required 4/4/2019 8:15 AM SMDB 2010
Black-Box Model Validation Comparison Between the Projected and Actual Throughputs In the experiments, the control inputs are in the range [0, 250] percent throttling 4/4/2019 8:15 AM SMDB 2010
Experiments Experiments examine the effectiveness of the two controllers in maintaining the goals set for the important workload Experiments were conducted on a PostgreSQL DBMS Two separate databases with their own running workload Competition for shared physical resources while no lock contention OLTP workload is the important workload, and OLAP workload is the less important workload Throttling OLAP workload in order to make OLTP workload meet its performance goal 4/4/2019 8:15 AM SMDB 2010
Impact of Mixing Workloads The throughput of the important OLTP workload dropped when the workloads compete for share system resources The response time of the OLAP workload doubled when the workloads compete for share system resources The effects of running the two workloads alone and simultaneously 4/4/2019 8:15 AM SMDB 2010
Throughput of the OLTP workload Simple Controller Throughput of the OLTP workload The simple controller is used to adjust the amount of throttling for the OLAP workload 4/4/2019 8:15 AM SMDB 2010
Black-Box Model Controller Throughput of the OLTP workload The black-box model controller is used to adjust the amount of throttling for the OLAP workload 4/4/2019 8:15 AM SMDB 2010
Throughput of the OLTP workload Hybrid Controller Throughput of the OLTP workload A hybrid controller combines the two approaches, where the black-box model controller initially sets the throttle value, and the simple controller fine-tunes performance 4/4/2019 8:15 AM SMDB 2010
Conclusions We illustrate the use of two different types of controllers to control the level of throttling required We verify that the important workload can dynamically meet the performance goals by using the controllers Experimental results show that the hybrid controller is a good choice for query throttle control 4/4/2019 8:15 AM SMDB 2010
Future Work To investigate how the black-box model may be updated dynamically to adapt to the highly varied and frequently changing workloads To investigate possible key identifiers, such as high CPU or high memory usage, that may indicate workloads that are possible candidates for throttling 4/4/2019 8:15 AM SMDB 2010
Thank You 4/4/2019 8:15 AM SMDB 2010
The amount of throttling Simple Controller The amount of throttling The simple controller is used to adjust the amount of throttling for the OLAP workload 4/4/2019 8:15 AM SMDB 2010