-
Notifications
You must be signed in to change notification settings - Fork 311
Running the Tuner
The Automated Tuner component is the only part of OtterTune's ML pipeline that is actively executed during a tuning session. New tuning sessions proceed as follows:
-
The user specifies the target objective when creating the new tuning session (right now this always defaults to the throughput)
-
The controller starts the first observation period, which is a period of time where it observes the application's workload while it is being executed/replayed. When the observation period ends, the controller collects the current knob configuration and internal runtime metrics from the DBMS and sends them to the server.
-
The server stores the knob/metric data it receives from the controller in its repository and then uses its internal ML models to choose which DBMS knob configuration the user should run next. The next knob configuration is returned to the user.
-
This process continues until the user is satisfied with the performance improvement achieved when running the workload with OtterTune's best configuration (so far) compared to the DBMS's initial knob configuration.
The tasks in the Automatic Tuner component are implemented as asynchronous Celery tasks. That is, a new Celery task is scheduled to execute in the background whenever the user uploads new knob/metric data from the previous observation period. The user then must poll the webpage that displays information about the new data result to check on the Celery task's status. When the task finishes, the next DBMS knob configuration is ready for the user, and a link to download the next configuration will appear on the webpage.
This section discusses how to run the automated tuner. These directions assume that:
- You followed the Quick Setup with Vagrant steps and are currently SSH'd into the VM
- The website's database has been preloaded with the
test_website
fixture (see Getting Started) - You are executing the commands from the website's root directory
Create one knob/metric sample and upload it to the test user's tuning_session
repository:
python script/controller_simulator/data_generator.py 1 1
python script/controller_simulator/upload_data.py script/controller_simulator/generated_data 0987654321
See Data Generation to learn how to generate/load data into the website.
Follow the link to the user's tuning_session
session. Then click on the Result ID (link) of the newest result provided in the Filtered Results table (this is probably the result with the highest ResultId). The overall status of the Celery tasks is listed in the Result Info table as Status
. Following the link provided in the Status
row displays the debug output for each Celery task that was executed.
Now follow the Status link to re the status of the Celery tasks. If the