用文档提示加速数据库调优,性能提升超40%
DemoTuner: Automatic Performance Tuning for Database Management Systems Based on Demonstration Reinforcement Learning
- 用大模型从手册论坛提取调优建议,生成可训练的示范数据
- 在MySQL和PostgreSQL上实现最高44.01%性能提升
- 调优成本最低,适合不熟悉数据库的开发者使用
现代数据库管理系统(如MySQL、PostgreSQL)的性能高度依赖于关键参数配置。手动调优因配置空间复杂且维度高而效率低下。现有基于强化学习的自动化调优方法虽有进展,但仍面临离线训练收敛慢的问题。本文提出DemoTuner框架,首次引入示范强化学习,利用数据库手册、技术论坛等文本中的调优经验提升训练效率。通过结构化思维链提示,大模型精准提取条件感知的调优建议;再设计提示感知的示范强化学习算法HA-DDPGfD,将这些提示融入训练。在MySQL与PostgreSQL上,跨多种工作负载的实验表明,相比默认配置,性能分别提升高达44.01%和39.95%。相较于三种基线方法,其执行时间最多缩短10.03%,且在线调优开销最小,对未知工作负载也表现出良好适应性。
原文摘要 · Abstract (English)
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 that DemoTuner achieves performance gains of up to 44.01% for MySQL and 39.95% for PostgreSQL over default configurations. Compared with three representative baseline methods, DemoTuner is able to further reduce the execution time by up to 10.03%, while always consuming the least online tuning cost. Additionally, DemoTuner also exhibits superior adaptability to application scenarios with unknown workloads.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。