用大模型引导数据库调优,30步内达成最佳性能
L2T-Tune:LLM-Guided Hybrid Database Tuning with LHS and TD3
- 三阶段流程:采样池预热+大模型提取调优建议+TD3精调
- 平均性能提升37.1%,TPC-C上最高达73%提升
- 支持硬件/负载变化,避免重复训练,适合生产环境
数据库配置调优对性能至关重要。尽管现有方法在吞吐量和延迟优化上取得进展,仍面临三大挑战:庞大参数空间导致直接优化不稳定且收敛慢;强化学习缺乏有效预热,需长时间离线训练;硬件或工作负载变化时迁移能力差,需大量重训。为此,我们提出L2T-Tune,一种基于大语言模型的混合调优框架,包含三阶段:第一阶段生成覆盖参数空间的均匀样本并存入共享池;第二阶段利用大语言模型从手册和社区文档中挖掘并优先排序调优提示,加速收敛;第三阶段使用预热样本池降维参数与状态特征,再通过双延迟深度确定性策略梯度(TD3)算法进行精调。实验表明,相较于最优基线,本方法在所有工作负载上平均提升37.1%,在TPC-C上最高达73%。相比纯强化学习模型,离线调优阶段实现快速收敛,线上调优仅需30步即达最优。
原文摘要 · Abstract (English)
Configuration tuning is critical for database performance. Although recent advancements in database tuning have shown promising results in throughput and latency improvement, challenges remain. First, the vast knob space makes direct optimization unstable and slow to converge. Second, reinforcement learning pipelines often lack effective warm-start guidance and require long offline training. Third, transferability is limited: when hardware or workloads change, existing models typically require substantial retraining to recover performance. To address these limitations, we propose L2T-Tune, a new LLM-guided hybrid database tuning framework that features a three-stage pipeline: Stage one performs a warm start that simultaneously generates uniform samples across the knob space and logs them into a shared pool; Stage two leverages a large language model to mine and prioritize tuning hints from manuals and community documents for rapid convergence. Stage three uses the warm-start sample pool to reduce the dimensionality of knobs and state features, then fine-tunes the configuration with the Twin Delayed Deep Deterministic Policy Gradient algorithm. We conduct experiments on L2T-Tune and the state-of-the-art models. Compared with the best-performing alternative, our approach improves performance by an average of 37.1% across all workloads, and by up to 73% on TPC-C. Compared with models trained with reinforcement learning, it achieves rapid convergence in the offline tuning stage on a single server. Moreover, during the online tuning stage, it only takes 30 steps to achieve best results.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。