The performance of modern DBMSs such as MySQL and PostgreSQL heavily depends on the configuration of performance-critical knobs. Manual tuning these knobs is laborious and inefficient due to the complex and high-dimensional nature of the configuration space. Among the automated tuning methods, reinforcement learning (RL)-based methods have recently sought to improve the DBMS knobs tuning process from several different perspectives. However, they still encounter challenges with slow convergence speed during offline training. In this paper, we mainly focus on how to leverage the valuable tuning hints contained in various textual documents such as DBMS manuals and web forums to improve the offline training of RL-based methods. To this end, we propose an efficient DBMS knobs tuning framework named DemoTuner via a novel LLM-assisted demonstration reinforcement learning method. Specifically, to comprehensively and accurately mine tuning hints from documents, we design a structured chain of thought prompt to employ LLMs to conduct a condition-aware tuning hints extraction task. To effectively integrate the mined tuning hints into RL agent training, we propose a hint-aware demonstration reinforcement learning algorithm HA-DDPGfD in DemoTuner. As far as we know, DemoTuner is the first work to introduce the demonstration reinforcement learning algorithm for DBMS knobs tuning. Experimental evaluations conducted on MySQL and PostgreSQL across various workloads demonstrate the significant advantages of DemoTuner in both performance improvement and online tuning cost reduction over three representative baselines including DB-BERT, GPTuner and CDBTune. Additionally, DemoTuner also exhibits superior adaptability to application scenarios with unknown workloads.
翻译:现代数据库管理系统(如MySQL和PostgreSQL)的性能在很大程度上取决于性能关键参数的配置。由于配置空间具有复杂性和高维特性,手动调整这些参数既费力又低效。在自动化调优方法中,基于强化学习的方法最近试图从多个不同角度改进数据库管理系统参数调优过程。然而,这些方法在离线训练期间仍面临收敛速度缓慢的挑战。本文主要研究如何利用数据库管理系统手册和网络论坛等各种文本文档中包含的宝贵调优提示,以改进基于强化学习方法的离线训练。为此,我们通过一种新颖的LLM辅助演示强化学习方法,提出了一个名为DemoTuner的高效数据库管理系统参数调优框架。具体而言,为了全面准确地从文档中挖掘调优提示,我们设计了一种结构化思维链提示,利用大语言模型执行条件感知的调优提示提取任务。为了将挖掘的调优提示有效集成到强化学习智能体训练中,我们在DemoTuner中提出了提示感知的演示强化学习算法HA-DDPGfD。据我们所知,DemoTuner是首个将演示强化学习算法引入数据库管理系统参数调优的工作。在MySQL和PostgreSQL上针对多种工作负载进行的实验评估表明,与DB-BERT、GPTuner和CDBTune这三个代表性基线方法相比,DemoTuner在性能提升和在线调优成本降低方面均具有显著优势。此外,DemoTuner对未知工作负载的应用场景也表现出卓越的适应性。