Table of Contents
Fetching ...

λ-Tune: Harnessing Large Language Models for Automated Database System Tuning

Victor Giannankouris, Immanuel Trummer

Abstract

We introduce λ-Tune, a framework that leverages Large Language Models (LLMs) for automated database system tuning. The design of λ-Tune is motivated by the capabilities of the latest generation of LLMs. Different from prior work, leveraging LLMs to extract tuning hints for single parameters, λ-Tune generates entire configuration scripts, based on a large input document, describing the tuning context. λ-Tune generates alternative configurations, using a principled approach to identify the best configuration, out of a small set of candidates. In doing so, it minimizes reconfiguration overheads and ensures that evaluation costs are bounded as a function of the optimal run time. By treating prompt generation as a cost-based optimization problem, λ-Tune conveys the most relevant context to the LLM while bounding the number of input tokens and, therefore, monetary fees for LLM invocations. We compare λ-Tune to various baselines, using multiple benchmarks and PostgreSQL and MySQL as target systems for tuning, showing that λ-Tune is significantly more robust than prior approaches.

λ-Tune: Harnessing Large Language Models for Automated Database System Tuning

Abstract

We introduce λ-Tune, a framework that leverages Large Language Models (LLMs) for automated database system tuning. The design of λ-Tune is motivated by the capabilities of the latest generation of LLMs. Different from prior work, leveraging LLMs to extract tuning hints for single parameters, λ-Tune generates entire configuration scripts, based on a large input document, describing the tuning context. λ-Tune generates alternative configurations, using a principled approach to identify the best configuration, out of a small set of candidates. In doing so, it minimizes reconfiguration overheads and ensures that evaluation costs are bounded as a function of the optimal run time. By treating prompt generation as a cost-based optimization problem, λ-Tune conveys the most relevant context to the LLM while bounding the number of input tokens and, therefore, monetary fees for LLM invocations. We compare λ-Tune to various baselines, using multiple benchmarks and PostgreSQL and MySQL as target systems for tuning, showing that λ-Tune is significantly more robust than prior approaches.

Paper Structure

This paper contains 25 sections, 3 theorems, 2 equations, 8 figures, 5 tables, 4 algorithms.

Key Result

Theorem 4.1

The total tuning time (excluding reconfiguration overheads) is in $O(k\cdot \alpha\cdot C_{best})$, where $C_{best}$ is the execution time of the best configuration returned by the LLM, for $\alpha \ge 2$.

Figures (8)

  • Figure 1: $\lambda$-Tune Architecture
  • Figure 2: $\lambda$-Tune Configuration Evaluation
  • Figure 3: Scenario 1: Baselines do not Create Indexes (Pure Parameter Tuning), Default Indexes Available
  • Figure 4: Scenario 2: Baselines Create Indexes, no Indexes are Created by Default
  • Figure 5: Query Execution Times (TPC-H 1GB, Postgres): $\lambda$-Tune vs Default Configuration
  • ...and 3 more figures

Theorems & Definitions (3)

  • Theorem 4.1
  • Theorem 5.1
  • Theorem 5.2