TL;DR
Traditional database tuning relies on static documentation that tells you what values to set, which quickly becomes stale, context-blind, and error-prone. This paper introduces PerfEvolve, a framework that shifts the paradigm to procedural knowledge—teaching LLM-based tuning agents how to diagnose, profile, and optimize a system dynamically. By translating expert tuning methodologies into executable skills, PerfEvolve improves PostgreSQL performance by up to 35.2% over state-of-the-art documentation-driven baselines.
What Problem Does This Paper Address?
Modern software systems expose hundreds of configurable parameters (knobs) that dictate performance. Historically, database administrators and automated tools have turned to official manuals and community guides to find optimal configurations. Recently, large language model (LLM) tuners have automated this by reading documentation to narrow down the parameter search space.
However, the authors identify a fundamental flaw: documentation records the results of expert tuning (what to set), not the process (how to determine what to set). This leads to three major deficiencies:
- Staleness: Recommendations lag behind hardware evolution (e.g., recommending knob values calibrated for old HDDs on modern NVMe SSDs).
- Context Insensitivity: Guides offer generic, one-size-fits-all defaults regardless of whether the workload is read-heavy, write-heavy, OLTP, or OLAP.
- Correlation Absence: Parameters are documented in isolation, ignoring massive performance variances caused by knob interactions.
When LLM agents blindly ingest this flawed documentation, their tuning performance is fundamentally bounded by its poor quality, often leading to suboptimal performance or system crashes.
Methods
The authors propose PerfEvolve, a tool that replaces static recommendations with a Directed Acyclic Graph (DAG) of executable "skills" for LLM agents. The framework operates in two distinct phases:
1. Offline Profiling (Once per system version)
Instead of relying on human-written text, PerfEvolve automatically extracts procedural knowledge through two automated techniques:
- Dimensionality Reduction via Top-$k$ Sensitivity Analysis: It runs single-parameter sweeps across all knobs to identify the small fraction that actually impact performance, discarding the rest to shrink the search space.
- Correlation Topology Discovery: It uses a two-stage factorial Analysis of Variance (ANOVA) to screen parameter pairs. It calculates interaction strengths and groups highly correlated parameters into low-dimensional "connected components" to be optimized jointly.
2. Online Deployment (Per deployment)
The offline findings are compiled into a structured document of executable skills (including preconditions, procedures, decision rules, and reference data). An LLM-based agent receives this document as a prompt and executes targeted, live profiling on the target system to find the environment-specific optimum.
Datasets
The framework was evaluated on PostgreSQL v16 across 150 virtual machines and a high-end 192-core server. Performance was measured using standard benchmarks via BenchBase:
- TPC-C-r: An OLTP workload configured to be read-heavy.
- TPC-C-w: An OLTP workload configured to be write-heavy.
- TPC-H: An analytical OLAP workload consisting of 22 complex queries.
Key Insights and Ideas
- The Long Tail of Sensitivity: Out of 116 performance-relevant parameters in PostgreSQL, only 15 exceeded the sensitivity threshold. The remaining ~100 parameters account for less than 5% of cumulative performance variation and can be safely left at defaults.
- Structural Sparsity of Interactions: While parameter correlations are pervasive (60% of tested pairs showed strong interactions), the correlation graph naturally decomposes into small, isolated clusters of 3–4 parameters. This makes multi-parameter joint optimization computationally tractable.
- Declarative Knowledge Can Blind LLMs: The authors discovered that giving an LLM specific recommended numbers (declarative knowledge) actually harms performance. The LLM anchors on those numbers and stops exploring the search space, even if the numbers are suboptimal for the current hardware. Providing the steps to find the numbers yields far better results.
Key Results
- Performance Speedups: PerfEvolve improved PostgreSQL throughput by up to 35.2% compared to state-of-the-art documentation-driven tuning frameworks (like GPTuner and E2ETune) within just 30 trials.
- Zero-Crash Reliability: Traditional LLM tuners frequently cause system crashes (a 32% crash rate was observed for GPTuner due to unsafe documentation ranges). PerfEvolve eliminated invalid configurations entirely, achieving a 100% valid trial rate.
- Cross-Hardware Robustness: When transferring knowledge from an 8 GB VM to a 1 TB server (a 96× core gap), traditional documentation-driven approaches suffered catastrophic performance drops. PerfEvolve successfully rescued the LLM optimizer, recovering performance by up to 58.9%.
Limitations and Future Work
- Hardware-Specific Reference Data: While the high-level procedural workflow (the "how-to") transfers perfectly across hardware, the underlying reference data (like specific safe ranges or interaction strengths) remains hardware-dependent. For instance, PerfEvolve struggled to improve the write-heavy TPC-C-w workload on the 1 TB server because the memory pressure profiles were fundamentally different from the profiling cluster.
- Workload Drift: The system assumes that offline profiling workloads are reasonably representative of production. Drastic, unmonitored shifts in production workloads might cause the agent to focus on an incomplete set of parameters.
- Higher-Order Interactions: PerfEvolve currently focuses on pairwise (2D) correlations. While effective, it might underestimate complex dependencies that only emerge when three or more parameters change simultaneously. The authors suggest hierarchical interaction discovery as a future path.
Summary updated