Skip to content

A customized and efficient database tuning system [VLDB'22]

License

Notifications You must be signed in to change notification settings

ZhengtongYan/DBTune

 
 

Repository files navigation

DBTune: Customized and Efficient Database Tuning System

DBTune is a customized and efficient database tuning system that can automatically find good configuration knobs for a database system. It supports multiple tuning scenarios, including performance tuning, resource-oriented tuning or multiple-objective tuning defined by the users. DBTune is equipped with state-of-the-art techniques for tuning a database. DBTune is designed and developed by the database team from the DAIR Lab at Peking University.

Why DBTune?

  • Optimized for database tuning: DBTune has customized functions and user-friendly interfaces for tuning the DBMSs. Users can conduct performance tuning, resource tuning or multiple-objective tuning by simply setting their tuning objectives.

  • Comprehensive technique supports and automatic selection: DBTune is equipped with state-of-the-art tuning techniques. It automatically chooses the proper algorithms for a specific tuning task to separate algorithm selection complexity away from the user.

  • Performance boosted by transfer learning: DBTune extracts knowledge from historical tuning tasks to speed up the current tuning. The more users utilize DBTune, the faster the tuning will be.

Overview of Supported Techniques

DBTune e supports the whole pipeline of configuration tuning, including knob selection, configuration tuning and knowledge transfer. Each module is equipped with multiple algorithm choices. For a given tuning task, DBTune automatically selects a proper solution path among the choices.

Installation

Installation Requirements:

  • Python >= 3.6

Manual Installation from Source

To install the newest DBTune package, type the following scripts on the command line:

  git clone git@github.com:Blairruc-pku/DBTuner.git && cd DBTune
  pip install -r requirements.txt
  pip install .

Preparation

Workload Preparation

DBTune currently supports three database benchmarks: OLTP-Bench, SYSBENCH and JOB. Please reffer to the details instuction for preparing the workloads.

Database Connection Setup

To provide the database connection information, the users need to edit the config_auto.ini.

db = mysql
host = 127.0.0.1
port = 3306
user = root
passwd =

DBTune currently supports to be deployed on MySQL and PostgreSQL using an integrated framework. It provides several settings for database connections, including remote/local database connection, tuning non-dynamic knobs with restarts, and tuning with resource isolation. Please reffer to the details configurations for more information.

Quick Start

  1. Specify the tuning objective in config_auto.ini. Here are some examples.

    Performance tuning, e.g., maximizing throughputs.

    task_id = performance1
    performance_metric = ['tps']

    Resource-oriented tuning, e.g., minimizing cpu resource while throughputs > 200 txn/s and 95th percentile latency < 60 sec.

    task_id = resource1
    performance_metric = ['-cpu']
    #constraints: Non-positive constraint values (”<=0”) imply feasibility.
    constraints = ["200 - tps", "latency - 60"]

    Multiple objective tuning, e.g., maximizing throughput and minimizing I/O.

    task_id = mutiple1
    performance_metric = ['tps', '-cpu]
    reference_point = [0, 100]
  2. Conduct Tuning.

    cd scripts
    python optimize.py  --config=config_performance.ini

    For more information, please refer to the specific tuning settings .

Related Publications

Facilitating Database Tuning with Hyper-Parameter Optimization: A Comprehensive Experimental Evaluation[PDF]
Xinyi Zhang, Zhuo Chang, Yang Li, Hong Wu, Jian Tan, Feifei Li, Bin Cui.
The 48th International Conference on Very Large Data Bases .
VLDB 2022, CCF-A

Towards Dynamic and Safe Configuration Tuning for Cloud Databases[PDF]
Xinyi Zhang, Hong Wu, Yang Li, Jian Tan, Feifei Li, Bin Cui.
ACM Conference on Management of Data .
SIGMOD 2022, CCF-A

ResTune: Resource Oriented Tuning Boosted by Meta-Learning for Cloud Databases[PDF]
Xinyi Zhang, Hong Wu, Zhuo Chang, Shuowei Jin, Jian Tan, Feifei Li, Tieying Zhang, and Bin Cui.
ACM Conference on Management of Data .
SIGMOD 2021, CCF-A

Contact

If you have any technical questions, please submit new issues.

If you have any other questions, please contact Xinyi Zhang[zhang_xinyi@pku.edu.cn] and Zhuo Chang[z.chang@pku.edu.cn].

License

The entire codebase is under MIT license.

About

A customized and efficient database tuning system [VLDB'22]

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.6%
  • Shell 0.4%