Table of Contents
Fetching ...

DemoTuner: Efficient DBMS Knobs Tuning via LLM-Assisted Demonstration Reinforcement Learning

Hui Dou, Lei Jin, Yuxuan Zhou, Jiang He, Yiwen Zhang

TL;DR

DemoTuner tackles slow offline RL convergence in DBMS knobs tuning by mining runtime-aware tuning hints from manuals and forums using a structured LLM-driven condition-aware extraction, then training with a novel HA-DDPGfD framework. It pre-trains on demonstrations derived from hints and refines through a hint priority-aware prioritized experience replay and hint-guided reward shaping. Empirical results on MySQL and PostgreSQL across RH/RW/WH workloads show substantial gains (up to about 44% over default) and reduced online tuning costs, with strong adaptability to unknown workloads. The work demonstrates a principled fusion of domain knowledge, demonstrations, and LLM capabilities to accelerate and stabilize automated DBMS knob tuning.

Abstract

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.

DemoTuner: Efficient DBMS Knobs Tuning via LLM-Assisted Demonstration Reinforcement Learning

TL;DR

DemoTuner tackles slow offline RL convergence in DBMS knobs tuning by mining runtime-aware tuning hints from manuals and forums using a structured LLM-driven condition-aware extraction, then training with a novel HA-DDPGfD framework. It pre-trains on demonstrations derived from hints and refines through a hint priority-aware prioritized experience replay and hint-guided reward shaping. Empirical results on MySQL and PostgreSQL across RH/RW/WH workloads show substantial gains (up to about 44% over default) and reduced online tuning costs, with strong adaptability to unknown workloads. The work demonstrates a principled fusion of domain knowledge, demonstrations, and LLM capabilities to accelerate and stabilize automated DBMS knob tuning.

Abstract

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.

Paper Structure

This paper contains 39 sections, 11 equations, 17 figures, 3 tables, 1 algorithm.

Figures (17)

  • Figure 1: Current best performance achieved by DB-BERTtrummer2023db and CDBTunezhang2019CDBTune along with their RL agents training steps.
  • Figure 2: The system overview of DemoTuner.
  • Figure 3: Prompt construction for condition-aware tuning hints extraction.
  • Figure 4: MySQL RH
  • Figure 5: MySQL RW
  • ...and 12 more figures