QTune: A Query-Aware Database Tuning System with Deep Reinforcement Learning

Database knob tuning is important to achieve high performance (e.g., high throughput and low latency). However, knob tuning is an NP-hard problem and existing methods have several limitations. First, DBAs cannot tune a lot of database instances on different environments (e.g., different database vendors). Second, traditional machine-learning methods either cannot find good configurations or rely on a lot of high-quality training examples which are rather hard to obtain. Third, they only support coarse-grained tuning (e.g., workload-level tuning) but cannot provide fine-grained tuning (e.g., query-level tuning). To address these problems, we propose a query-aware database tuning system QTune with a deep reinforcement learning (DRL) model, which can efficiently and effectively tune the database configurations. QTune first featurizes the SQL queries by considering rich features of the SQL queries. Then QTune feeds the query features into the DRL model to choose suitable configurations. We propose a Double-State Deep Deterministic Policy Gradient (DS-DDPG) model to enable query-aware database configuration tuning, which utilizes the actor-critic networks to tune the database configurations based on both the query vector and database states. QTune provides three database tuning granularities: query-level, workload-level, and cluster-level tuning. We deployed our techniques onto three real database systems, and experimental results show that QTune achieves high performance and outperforms the state-of-the-art tuning methods.

[1]  Gerhard Weikum,et al.  Self-tuning Database Technology and Information Services: from Wishful Thinking to Viable Engineering , 2002, VLDB.

[2]  Shivnath Babu,et al.  Tuning Database Configuration Parameters with iTuned , 2009, Proc. VLDB Endow..

[3]  Hans-Peter Kriegel,et al.  A Density-Based Algorithm for Discovering Clusters in Large Spatial Databases with Noise , 1996, KDD.

[4]  Yuval Tassa,et al.  Continuous control with deep reinforcement learning , 2015, ICLR.

[5]  Stéphane Bressan,et al.  Regularized Cost-Model Oblivious Database Tuning with Reinforcement Learning , 2016, Trans. Large Scale Data Knowl. Centered Syst..

[6]  Zuohua Ding,et al.  Self-tuning Performance of Database Systems with Neural Network , 2014, ICIC.

[7]  Sang Ho Lee,et al.  Resource Selection for Autonomic Database Tuning , 2005, 21st International Conference on Data Engineering Workshops (ICDEW'05).

[8]  Byung-Seo Kim,et al.  Deep Reinforcement Learning Paradigm for Performance Optimization of Channel Observation–Based MAC Protocols in Dense WLANs , 2019, IEEE Access.

[9]  G. G. Stokes "J." , 1890, The New Yale Book of Quotations.

[10]  Yuqing Zhu,et al.  BestConfig: tapping the performance potential of systems via automatic configuration tuning , 2017, SoCC.

[11]  Guoliang Li,et al.  Approximate Query Processing: What is New and Where to Go? , 2018, Data Science and Engineering.

[12]  Shane Legg,et al.  Human-level control through deep reinforcement learning , 2015, Nature.

[13]  Guoliang Li,et al.  An End-to-End Learning-based Cost Estimator , 2019, Proc. VLDB Endow..

[14]  Tim Brys,et al.  A Gentle Introduction to Reinforcement Learning , 2016, SUM.

[15]  Christian S. Jensen,et al.  A Reinforcement Learning Approach for Adaptive Query Processing , 2008 .

[16]  Geoff Holmes,et al.  Classifier chains for multi-label classification , 2009, Machine Learning.

[17]  Juan José del Coz,et al.  Binary relevance efficacy for multilabel classification , 2012, Progress in Artificial Intelligence.

[18]  Peter Dayan,et al.  Technical Note: Q-Learning , 2004, Machine Learning.

[19]  Benoît Dageville,et al.  Self-Tuning for SQL Performance in Oracle Database 11g , 2009, 2009 IEEE 25th International Conference on Data Engineering.

[20]  Peter Henderson,et al.  An Introduction to Deep Reinforcement Learning , 2018, Found. Trends Mach. Learn..

[21]  Shamim Nemati,et al.  A Deep Deterministic Policy Gradient Approach to Medication Dosing and Surveillance in the ICU , 2018, 2018 40th Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC).

[22]  Geoffrey J. Gordon,et al.  Automatic Database Management System Tuning Through Large-scale Machine Learning , 2017, SIGMOD Conference.

[23]  Sanjay Krishnan,et al.  Hierarchical Deep Reinforcement Learning For Robotics and Data Science , 2018 .

[24]  Guoliang Li,et al.  Human-in-the-loop Data Integration , 2017, Proc. VLDB Endow..

[25]  Genoveva Vargas-Solar,et al.  Big Data Management: What to Keep from the Past to Face Future Challenges? , 2017, Data Science and Engineering.

[26]  Margo I. Seltzer,et al.  Using probabilistic reasoning to automate software tuning , 2004, SIGMETRICS '04/Performance '04.

[27]  Tim Kraska,et al.  SageDB: A Learned Database System , 2019, CIDR.

[28]  Jimmy Ba,et al.  Adam: A Method for Stochastic Optimization , 2014, ICLR.

[29]  Eugene Wu Crazy Idea! Databases ⨝ Reinforcement-learning Research (CIDR2) , 2019, CIDR.

[30]  Patrick van der Smagt,et al.  Introduction to neural networks , 1995, The Lancet.

[31]  Peter Dayan,et al.  Q-learning , 1992, Machine Learning.

[32]  Ke Zhou,et al.  An End-to-End Automatic Cloud Database Tuning System Using Deep Reinforcement Learning , 2019, SIGMOD Conference.

[33]  Olga Papaemmanouil,et al.  Deep Reinforcement Learning for Join Order Enumeration , 2018, aiDM@SIGMOD.

[34]  Abien Fred Agarap Deep Learning using Rectified Linear Units (ReLU) , 2018, ArXiv.

[35]  Hado van Hasselt,et al.  Double Q-learning , 2010, NIPS.

[36]  Andrew W. Moore,et al.  Variable Resolution Discretization in Optimal Control , 2002, Machine Learning.

[37]  Zuohua Ding,et al.  Self-tuning performance of database systems based on fuzzy rules , 2014, 2014 11th International Conference on Fuzzy Systems and Knowledge Discovery (FSKD).

[38]  Haibo He,et al.  Reinforcement learning control based on multi-goal representation using hierarchical heuristic dynamic programming , 2012, The 2012 International Joint Conference on Neural Networks (IJCNN).

[39]  Dries Naudts,et al.  A Q-Learning Scheme for Fair Coexistence Between LTE and Wi-Fi in Unlicensed Spectrum , 2018, IEEE Access.