《计算机应用》唯一官方网站

• •    下一篇

基于蒙特卡洛树搜索的参数调优方法

高锦涛,胡志远,姜璐璐   

  1. 宁夏大学
  • 收稿日期:2025-08-04 修回日期:2025-10-03 发布日期:2025-11-05 出版日期:2025-11-05
  • 通讯作者: 高锦涛

Parameter tuning method based on monte carlo tree search

  • Received:2025-08-04 Revised:2025-10-03 Online:2025-11-05 Published:2025-11-05

摘要: 出于与整体性能的直接关联,数据库管理系统(DBMS)的参数配置与优化被系统性研究。默认参数设置被发现难以达到最优性能。基于经验的人工调优被评估,因无法持续捕捉系统状态与数据分布,常产生次优结果。贝叶斯优化(BO)作为主流方案被审视,但在复杂目标函数下被观察到易陷入局部最优,限制了对全局最优配置的发现能力。为此,提出了一种基于蒙特卡洛树搜索的参数调优方法MTune,该方法被构建在蒙特卡洛树搜索(MCTS)之上。在 MTune 中,策略树被用于将多维旋钮空间划分为若干区域;每个树节点被定义为一个独立的子空间。MCTS 的目标函数被通过向 BO 发送旋钮配置并接收评估指标来构建;基于该目标,树节点被置信区间上界(UCB)准则进行评分。初始节点被 k-means 算法迭代地划分以生长策略树,从而逐步收缩搜索空间,并在分区引导下平衡探索与利用。通过区域的逐步细化,局部最优风险被有效缓解,全局最优的发现能力被增强。在 YCSB-A 与 YCSB-B 工作负载下,MTune 具有优于先进基线的方法学表现。在 PostgreSQL-v9.6版本上,MTune(最佳 HeSBO)相对基线:事务延迟率平均最大降幅 97.13%~97.91%,吞吐量升幅24.83%~48.56%,系统开销降低1.62%~16.26%。在 PostgreSQL-v13.6版本上,MTune 延迟降幅约95%、吞吐量提升10~25%,系统开销对 DDPG 基本持平或小幅更优,对 SMAC 在 HeSBO-16 下最佳。方法能够识别高质量区域,并产出近似最优的旋钮配置;在实际应用场景中表现出稳定性与有效性。

Abstract: Database Management System (DBMS) configuration and optimization are directly tied to overall performance. Default settings rarely achieve optimal performance. Experience-driven manual tuning is constrained by the inability to continuously track system state and data distribution, often yielding suboptimal outcomes. Bayesian optimization (BO), while widely used, tends to fall into local optima on complex objectives, limiting global search. To address this, MTune was proposed, an MCTS-based method for DBMS configuration tuning. A policy tree was used to partition the multidimensional knob (parameter) space into regions, with each node representing a distinct subspace. The MCTS objective was defined by submitting knob configurations to BO and receiving evaluation metrics; nodes were scored with the Upper Confidence Bound (UCB) criterion derived from this objective. K-means clustering was used to iteratively split the initial node to grow the policy tree, progressively shrinking the search space and balancing exploration and exploitation. Continuous region refinement mitigated local-optimum risk and enhanced global search capability. Results show that MTune outperforms strong baselines under YCSB-A and YCSB-B workloads. On PostgreSQL v9.6 with HeSBO-optimal settings, average transaction latency decreases by 97.13%–97.91%, throughput increases by 24.83%–48.56%, and system overhead decreases by 1.62%–16.26%. On PostgreSQL v13.6, latency decreases by about 95% and throughput increases by about 10%–25%; system overhead is on par with or slightly better than DDPG, and MTune is best against SMAC under HeSBO-16. MTune identifies high-quality regions and yields near-optimal knob configurations, and it is robust and effective in practice.

中图分类号: