Skip to content

DaSECandyLab/Rabbit

Repository files navigation

Rabbit

Rabbit is a database tool for knob tuning with RAG.

1. Environment Setup

To set up the environment for Rabbit, follow these steps:

  1. Create a conda virtual environment named Rabbit:

    conda create -n Rabbit python=3.10
  2. Activate the virtual environment:

    conda activate Rabbit
  3. Install the required dependencies using requirements.txt:

    pip install -r requirements.txt
  4. Make a copy of the example environment variables file and modify the OPENAI_API_KEY, PROXY, LLM_MODEL:

    cp .env.template .env
  5. Add your API key to the newly created .env file.

Now, you have successfully set up the environment for Rabbit. You can proceed with using the tool for knob tuning with RAG.

2. Benchmark

  1. Install PostgreSQL and MySQL

  2. Install BenchBase with our scripts/

    cd ./scripts
    sh install_benchbase.sh mysql
  3. Set up specific benchmark (e.g., TPC-C).

Note: modify ./benchbase/target/benchbase-mysql/config/mysql/sample_{your_target_benchmark}_config.xml to customize your tuning setting first

sh build_benchmark.sh mysql tpcc

3. Using Rabbit

  1. modify configs/mysql.ini to determine the target DBMS first, the restart and recover commands depend on the environment

  2. Structure the document information into a diagram and generate a knob knowledge graph

Note: The input document needs to be placed in ./knowledge/mysql/graph/input/ Modify ./knowledge/mysql/graph/settings.yaml for your enviroment and run:

sh build_graph.sh

The graph knowledge will output in ./knowledge/mysql/graph/output/.

  1. Run Rabbit like this:

    python run.py
  2. Observe the output of the command line, and its results will exist in the optimization_results/ folder.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published