Journal of Computer Applications ›› 2026, Vol. 46 ›› Issue (7): 2139-2151.DOI: 10.11772/j.issn.1001-9081.2025070884

• Data science and technology • Previous Articles    

Parameter tuning method based on Monte Carlo tree search

Jintao GAO(), Zhiyuan HU, Lulu JIANG   

  1. School of Information Engineering,Ningxia University,Yinchuan Ningxia 750021,China
  • Received:2025-08-04 Revised:2025-10-03 Accepted:2025-10-09 Online:2025-11-05 Published:2026-07-10
  • Contact: Jintao GAO
  • About author:HU Zhiyuan, born in 2001, M. S. His research interests include AI for database, causal discovery.
    JIANG Lulu, born in 2001, M. S. Her research interests include AI for database, database performance optimization.
  • Supported by:
    National Natural Science Foundation of China(62462051)

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

高锦涛(), 胡志远, 姜璐璐   

  1. 宁夏大学 信息工程学院,银川 750021
  • 通讯作者: 高锦涛
  • 作者简介:胡志远(2001—),男,山东日照人,硕士,主要研究方向:智能数据库、因果发现
    姜璐璐(2001—),女,山东德州人,硕士,主要研究方向:智能数据库、数据库性能优化。
  • 基金资助:
    国家自然科学基金资助项目(62462051)

Abstract:

DataBase Management System (DBMS) configuration and optimization are directly related to overall performance, but default settings of DBMS make it difficult to achieve optimal performance. The evaluation of experience-driven manual tuning shows that it is constrained by the inability to continuously capture the system state and data distribution, often resulting in suboptimal results. Bayesian Optimization (BO), as the mainstream scheme, tends to fall into local optimum on complex objective functions, limiting the ability to discover the global optimal configuration. Therefore, a Monte Carlo Tree Search (MCTS) -based method for DBMS parameter tuning (MTune) was proposed. In MTune, the strategy tree is adopted to divide the multi-dimensional knob space into multiple regions, where each tree node is defined as an independent subspace. The objective function of Monte Carlo Tree Search (MCTS) is constructed by sending knob configurations to Bayesian Optimization (BO) and receiving corresponding evaluation metrics. With this objective function, each tree node is scored based on the Upper Confidence Bound (UCB) criterion. Besides, the root node is iteratively partitioned via the k-means algorithm to realize the growth of the strategy tree. In this way, the search space is gradually narrowed down, and a balance between exploration and exploitation can be maintained under the guidance of spatial partitioning. By refining search regions step by step, the risk of falling into local optima is effectively alleviated, and the capability of finding the global optimum is improved significantly. Experimental results show that MTune outperforms advanced baselines under YCSB-A and YCSB-B workloads. On PostgreSQL v9.6, MTune with optimal HeSBO (Hashing-enhanced Subspace Bayesian Optimization) has reduced transaction latency rate by 97.13%-97.91%, increased throughput by 24.83%-48.56%, and decreased system overhead by 1.62%-16.26%. On PostgreSQL v13.6, MTune has decreased latency by about 95% and increased throughput by 10%-25%. The system overhead is equal to or slightly better than Deep Deterministic Policy Gradient (DDPG), and is the best compared to SMAC (Sequential Model-based Algorithm Configuration) under HeSBO-16. The proposed method can identify high-quality regions and generate approximately optimal knob configurations, and is robust and effective in practice.

Key words: DataBase Management System (DBMS), configuration tuning, Monte Carlo Tree Search (MCTS), Bayesian Optimization (BO), policy tree, k-means, Upper Confidence Bound (UCB) criterion, workload

摘要:

数据库管理系统(DBMS)的参数配置与优化与系统整体性能直接相关,但DBMS的默认参数设置难以达到最优性能。评估基于经验的人工调优结果表明,因无法持续捕捉系统状态与数据分布,这种调优常产生次优结果。作为主流方案的贝叶斯优化(BO)在复杂目标函数下易陷入局部最优,限制了对全局最优配置的发现能力。因此,提出一种基于蒙特卡洛树搜索(MCTS)的DBMS参数调优方法MTune。在MTune框架中,策略树主要用于对多维旋钮参数空间进行区域拆分,策略树的每一个节点均对应一个独立的参数子空间。该方案首先向贝叶斯优化(BO)模块输入旋钮配置参数,同步接收对应的性能评价指标,以此完成蒙特卡洛树搜索(MCTS)目标函数的构建。在目标函数确立后,算法采用置信区间上界(UCB)准则,完成对所有树节点的打分评估;同时依托k-means聚类算法对根初始节点开展迭代划分,实现策略树的自主生长。整个迭代过程能够持续收缩参数搜索空间,并且依托空间分区机制,动态平衡算法的探索能力与利用能力。最终通过逐层细化参数搜索区域,有效规避算法陷入局部最优解的问题,进一步提升模型搜寻全局最优解的能力。在YCSB-A与YCSB-B工作负载下的实验结果表明, MTune优于对比的先进基线。在PostgreSQL v9.6上,MTune (最佳HeSBO(Hashing-enhanced Subspace Bayesian Optimization))相较于基线的事务延迟率降低97.13%~97.91%,吞吐量提高24.83%~48.56%,系统开销降低1.62%~16.26%;在PostgreSQL v13.6上,MTune的延迟降低约为95%,吞吐量提高10%~25%,系统开销相较于DDPG(Deep Deterministic Policy Gradient)基本持平或小幅更优,相较于SMAC(Sequential Model-based Algorithm Configuration)在HeSBO-16下最佳。本文方法能够识别高质量区域,并产出近似最优的旋钮配置,在实际应用场景中表现有效且稳定。

关键词: 数据库管理系统, 配置调优, 蒙特卡洛树搜索, 贝叶斯优化, 策略树, k-means, 置信区间上界准则, 工作负载

CLC Number: