计算机科学 ›› 2024, Vol. 51 ›› Issue (6): 104-110.doi: 10.11896/jsjkx.231000156
李雨航1,3, 谭睿雄2, 柴云鹏2,3
LI Yuhang1,3, TAN Ruixiong2, CHAI Yunpeng2,3
摘要: 云数据库中存在许多配置项,包括数据库内部的配置参数以及部署环境的虚拟机资源配置,这些配置项共同决定了数据库的读写性能和资源消耗。在资源弹性伸缩的云环境下,用户关注数据库的服务性能和资源消耗成本。然而,由于配置项众多且负载变化快速,寻找最优的配置项组合变得困难。文中针对负载动态变化的在线调优场景提出了CoTune,一种协同调节云数据库资源与参数的快速调优方法。该方法针对OLTP型动态负载,通过迭代调节云虚拟机资源配置和数据库参数配置,在保障服务质量的前提下降低资源消耗。该方法的创新点如下:首先,在每个调优周期内,采用三阶段方案对资源配额和数据库参数进行调节,优先保障服务质量;其次,根据数据库参数对不同资源的影响进行分类,减小搜索空间,快速调节参数;最后,在数据库参数调节的强化学习模型中,设计特定的奖励函数,快速获取奖励值,加快调节频率。实验结果表明,该方法相比同时调节资源和参数、单独调节资源等方法,能够在保障服务质量的前提下降低资源消耗。通过快速迭代调优,能够应对负载变化的挑战,并在动态负载环境中实现更高效的资源利用。
中图分类号:
[1]RENOUARD J.MySQLTuner[OL].https://github.com/major/MySQLTuner-perl. [2]KWAN E,LIGHTSTONE S,STORM A,et al.Automatic configuration for IBM DB2 universal database[J].Proceedings of IBM Perf Technical Report,2002,1(1):1-13. [3]ZHU Y,LIU J,GUO M,et al.Bestconfig:tappingthe perfor-mance potential of systems via automatic configuration tuning[C]//Proceedings of the 2017 Symposium on Cloud Computing.2017:338-350. [4]DUAN S,THUMMALA V,BABU S.Tuning database configuration parameters with ituned[J].Proceedings of the VLDB Endowment,2009,2(1):1246-1257. [5]ZHANG B,VAN AKEN D,WANG J,et al.A demonstration of the ottertune automatic database management system tuning service[J].Proceedings of the VLDB Endowment,2018,11(12):1910-1913. [6]SIEGMUND N,GREBHAHN A,APELS,et al.Performance-influence models for highly configurable systems[C]//Procee-dings of the 2015 10th Joint Meeting on Foundations of Software Engineering.2015:284-294. [7]NAIR V,MENZIES T,SIEGMUND N,et al.Using bad lear-ners to find good configurations[C]//Proceedings of the 2017 11th Joint Meeting on Foundations of Software Engineering.2017:257-267. [8]ZHANG J,LIU Y,ZHOU K,et al.An end-to-end automatic cloud database tuning system using deep reinforcement learning[C]//Proceedings of the 2019 International Conference on Ma-nagement of Data.2019:415-432. [9]LI G,ZHOU X,LI S,et al.Qtune:A query-aware database tu-ning system with deep reinforcement learning[J].Proceedings of the VLDB Endowment,2019,12(12):2118-2130. [10]ZHANG X,WU H,CHANG Z,et al.Restune:Resource oriented tuning boosted by meta-learning for cloud databases[C]//Proceedings of the 2021 International Conference on Management of Data.2021:2102-2114. [11]Google Inc.Kubernetes[EB/OL].(2023-02-14)[2023-03-15].https://kubernetes.io. [12]Amazon Inc.Amazon Elastic Compute Cloud[EB/OL].(2023-01-29)[2023-03-15].https://aws.amazon.com/cn/ec2/. [13]Flexera Software.RightScale Cloud Management[EB/OL].(2022-12-05)[2023-03-15].http://docs.rightscale.com. [14]RAO J,BU X,XU C Z,et al.VCONF:a reinforcement learning approach to virtual machines auto-configuration[C]//Procee-dings of the 6th International Conference on Autonomic Computing.2009:137-146. [15]BARRETT E,HOWLEY E,DUGGAN J.Applying reinforce-ment learning towards automating resource allocation and application scalability in the cloud[J].Concurrency and Computation:Practice and Experience,2013,25(12):1656-1674. [16]KLIMOVIC A,LITZ H,KOZYRAKIS C.Selecta:Heterogeneous cloud storage configuration for data analytics[C]//2018 {USENIX} Annual Technical Conference({USENIX}{ATC} 18).2018:759-773. [17]MAHGOUB A,MEDOFF A,KUMAR R,et al.OPTIMUS-CLOUD:Heterogeneous configuration optimization for distributed databases in the cloud[C]//Proceedings of the 2020 USENIX Conference on Usenix Annual Technical Conference.2020:189-204. [18]LI G L,ZHOU X H,SUN J,et al.A Survey of Database Technologies Based on Machine Learning[J].Chinese Journal of Computers,2020,43(11):2019-2049. [19]LILLICRAP T P,HUNT J J,PRITZEL A,et al.Continuouscontrol with deep reinforcement learning[J].arXiv:1509.02971,2015. [20]B2W Digital 2017.B2W Digital[OL].https://www.b2wdigi-tal.com. |
|