Manuscript Offprint

arXiv:2610.09276

CATune: Structural Constraint-Aware Bayesian Optimization for DBMS Configuration Tuning

Fangping Lan, Qi Zhang, Eduard Dragut

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

Modern DBMSs expose hundreds of configuration knobs, resulting in a high-dimensional and heterogeneous search space that makes automated tuning costly. Existing ML-based tuning systems typically treat the configuration domain as box-constrained and rely on workload feedback to implicitly capture inter-knob relationships. However, DBMS documentation specifies deterministic knob dependency constraints—particularly ordering constraints—that characterize structurally valid regions of the configuration space. We present CATUNE, a constraint-aware Bayesian optimization (BO) framework that models deterministic inter-knob ordering constraints as structural components of the search domain. Instead of learning feasibility boundaries through sampled violations, CATUNE performs optimization within a constraint-consistent subspace. We develop a topology-aware sampling strategy that respects dependency structure during exploration and avoids the inefficiencies of post-hoc constraint handling. To enable automated constraint discovery, we further design a precision-first extraction pipeline that combines LLM-based parsing with reliability safeguards to mitigate hallucinated dependencies. Experiments on PostgreSQL and MySQL using TPC-C and TPC-H workloads show that CATUNE substantially improves both sample efficiency and final tuning quality across surrogate models and BO frameworks. Under default ranges, CATUNE reaches the baseline optimum up to 12.5×12.5\times faster and improves throughput by up to 63.37%. The improvements persist under knowledge-guided reduced ranges and alternative optimization implementations. These results demonstrate that explicitly modeling system-defined deterministic ordering constraints enhances optimization robustness and system stability.

PVLDB Reference Format:

Fangping Lan, Qi Zhang, and Eduard Dragut. CATUNE: Structural Constraint-Aware Bayesian Optimization for DBMS Configuration Tuning. PVLDB, 19(13): 5286 - 5299, 2026.

doi:10.14778/3849398.3849421

PVLDB Artifact Availability:

The source code, data, and/or other artifacts have been made available at https://github.com/lanfangping/CATune.

1 INTRODUCTION

Modern Database Management Systems (DBMSs) expose hundreds of configuration knobs that govern memory allocation, concurrency control, logging behavior, and query execution strategies [36]. While this flexibility enables performance optimization across diverse workloads, it creates a high-dimensional and heterogeneous configuration space that is difficult to navigate [50]. For example, PostgreSQL v13 provides 263 knobs spanning continuous, integer, and categorical domains. In cloud environments, where workloads and hardware configurations vary widely, manual tuning by database administrators (DBAs) becomes increasingly infeasible [55].

To address this challenge, prior work has proposed automated and ML-based tuning methods. Existing approaches broadly fall into two categories: (1) offline transfer-based methods that pre-train models on benchmark workloads and transfer knowledge to new deployments [49, 54, 64], and (2) online search-based methods that iteratively select configurations using search algorithms, reinforcement learning (RL) [5, 28, 46, 55], or Bayesian optimization (BO) techniques such as SMAC [10, 20, 27, 30, 49, 62, 63].

Although these methods can eventually identify high-performing configurations, they incur significant tuning cost [18, 20]. State-of-the-art systems often require hundreds of iterations to stabilize performance [61], and each iteration may execute expensive workloads. This cost arises from two challenges: the large number of knobs requiring exploration and the broad vendor-provided ranges associated with each knob. These ranges are intentionally conservative to ensure generality but substantially enlarge the search space and may include unstable or invalid regions [37, 50].

Meanwhile, human DBAs rarely rely on blind trial-and-error. Instead, they use domain knowledge documented in manuals and community discussions. Recent knowledge-aware tuners leverage Large Language Models (LLMs) to extract suggested values or reduce search regions [24–26, 46, 47]. However, these approaches primarily focus on identifying promising value ranges.

An under-exploited form of knowledge lies in system-defined deterministic knob dependency constraints, i.e., relationships among knobs that define structurally invalid or suboptimal regions (e.g., ordering constraints such as A≤BA \leq B). These dependencies are documented in manuals and forums (Table 1); to our knowledge, they are not explicitly encoded in existing ML-based tuning systems. As a result, current tuners treat the configuration space as box-constrained and implicitly learn such relationships through trial-and-error feedback, leading to wasted evaluations of invalid configurations. In contrast, we explicitly encode deterministic inter-knob ordering constraints as structural components of the search domain.

We hypothesize that explicitly encoding deterministic knob dependency constraints into the optimization process can substantially

This work is licensed under the Creative Commons BY-NC-ND 4.0 International License. Visit https://creativecommons.org/licenses/by-nc-nd/4.0/ to view a copy of this license. For any use beyond those covered by this license, obtain permission by emailing info@vldb.org. Copyright is held by the owner/author(s). Publication rights licensed to the VLDB Endowment.

Proceedings of the VLDB Endowment, Vol. 19, No. 13 ISSN 2150-8097. doi:10.14778/3849398.3849421

Table 1: Three examples of knob dependency constraints found in PostgreSQL V13 Documentation

Knobsuperuser_reserved_connections
DescriptionDetermines the number of connection ... The value must be less than max_connections...
Constraintsuperuser_reserved_connections< max_connections
Knobmax_parallel_workers
Description... note that a setting for this value which is higher than max_worker_processes will have no effect, since ...
Constraintmax_parallel_workers ≤ max_worker_processes
Knobmax_parallel_workers_per_gather
DescriptionSets the maximum number of workers ... Parallel workers are taken from the pool of processes established by max_worker_processes, limited by max_parallel_workers ...
Constraintmax_parallel_workers_per_gather< max_worker_processes,max_parallel_workers_per_gather< max_parallel_workers

improve sample efficiency and robustness. By filtering structurally invalid regions prior to evaluation, constraint-aware tuning reduces unnecessary trials and accelerates convergence.

We present CATUNE, a system that encodes ordering constraints directly into the configuration domain and integrates them with BO-based optimizers. Ordering constraints naturally induce a structured dependency graph, which we model as a topology graph. Unlike classical constrained BO methods [11, 12, 38, 41, 62], which model constraints probabilistically and learn feasibility boundaries by sampling infeasible configurations, CATUNE restricts optimization to a constraint-consistent subspace prior to search. Structural constraints are enforced in both exploitation (Section 5.1) and exploration (Section 5.2).

However, post-hoc constraint-handling strategies enforce dependencies only after candidate generation, either by rejecting infeasible configurations [15] or by repairing them into feasible ones. Under multiple dependency constraints, these approaches incur substantial overhead from excessive rejected samples or repeated repair operations. To address this issue, we design a topology-aware sampling strategy that respects the dependency graph during sample generation, ensuring that every sampled configuration is feasible by construction while avoiding rejection and repair overhead.

Extensive experiments demonstrate that CATUNE improves both final tuning quality and convergence speed across workloads, surrogate models, BO implementations, and search-space regimes (Section 7). Compared to penalty-based strategies, proactive constraint filtering yields faster convergence by eliminating infeasible regions prior to optimization. Ablation studies confirm the effectiveness of topology-aware sampling (Section 8.3). Beyond performance gains, we analyze the system-level impact of constraint enforcement (Section 8.1). Correct ordering constraints prevent DBMS startup failures and improve reliability, whereas hallucinated constraints can negatively affect optimization performance.

Although LLMs demonstrate strong capability in extracting tuning knowledge from textual sources [52, 65], they are not immune to hallucination [1, 53]. Our quality analysis in the technical report [22] shows that direct LLM prompting can produce unsupported or incorrectly oriented dependencies even when evidence spans are requested. Notably, two of these hallucinated constraints led to measurable degradation in tuning efficiency (Section 8.1). These findings highlight the risk of incorporating automatically generated constraints. To mitigate this risk, we design a precision-first constraint extraction pipeline that prioritizes correctness when leveraging LLM-based agents for automated dependency discovery.

Contributions. Our contributions are:

(1) We propose CATUNE, a DBMS tuning system that structurally encodes deterministic knob dependency constraints to restrict optimization to a constraint-consistent subspace.

(2) We compare three baseline constraint-handling strategies and show that correcting invalid configurations after sampling adds substantial overhead.

(3) We introduce a topology-aware sampling strategy that avoids low acceptance rates inherent in rejection-based constraint handling.

(4) We design a precision-first LLM-assisted extraction pipeline that automatically discovers and refines knob dependency constraints while mitigating hallucination.

(5) We conduct extensive experiments demonstrating improved convergence speed and final performance across workloads, surrogate models, and BO frameworks.

(6) We provide a systematic analysis of constraint employment strategies, hallucinated constraints, and the system-level impact of constraint enforcement.

References (21)