Introducing Human-in-the-Loop Control Over Automatic Database Tuning

December 17, 2021
  • Neal Kaviratna

Everybody loves “Otter-Mation” when it removes everyday drudgery. But sometimes there’s also a need for oversight. OtterTune already has safeguards to restrict OtterTune’s ML algorithms to ensure that your database operates correctly. And today we’re pleased to announce that we’re now offering “Human in the Loop” features that give you even more control over OtterTune’s automatic database tuning process.

Why Some Humans Want to Keep Otters Under Control

The new features provide more control and human oversight over what gets deployed to the database — an especially important consideration when making changes to live production databases. Human in the Loop features are also crucial for organizations with specific policies requiring comprehensive documentation and formal approval of any infrastructure changes, including the parameter groups OtterTune automatically recommends changing.

How Human in the Loop Control Works
Human in the Loop control gives PostgreSQL and MySQL users the ability to review OtterTune-generated config recommendations (2) and accept or reject the changes (3). Rejected configs are discarded. Accepted configs are applied to the database (4) and perpetuate the machine learning feedback loop (1).

New Human in the Loop Features

The first iteration of OtterTune Human in the Loop features includes:

  • Email notifications — OtterTune’s tuning service will alert you when it has a series of recommended knob changes for a specific database.
  • Tuning Recommendations — When you log into the OtterTune dashboard, the Database Overview page has a new tab that shows the recommended changes for your database. You can either skip or approve them. Currently, OtterTune lets you accept or reject the full list of recommended knob changes.

    Review database config change recommendation details and choose to apply or reject them.
  • Custom Knob Value Ranges — You can control which knobs OtterTune is permitted to consider tuning and what knob value ranges are acceptable for those knobs. These affect OtterTune whether or not a human is in the loop.

    OtterTune allows you to control which knobs OtterTune can configure and what settings values are acceptable.
  • Configuration Version History — OtterTune keeps the complete history of all the configurations it has recommended. You can manually apply them at any time to revert the database back to a previous configuration if you need to do so.

No Changes, No Learning. Some Changes, Some Learning

OtterTune is designed to get smarter over time as it observes the behavior of your database. If OtterTune recommends a configuration change but you choose not to apply it to your database, then OtterTune will not learn whether those changes improve your database. If you do choose to apply OtterTune’s recommended configuration changes, then that information gets fed back to the service and its algorithms get smarter. The improvements may not be included in the next iteration, but the recommended knob changes will get better over time.

Caveats & What’s Coming Next

Currently, for each configuration recommendation that OtterTune generates for your database, you must accept or reject the changes to all the knobs in the recommendation. If you wish to accept only a portion of the recommended changes or edit the configurations before applying them, then you must manually make those config changes to the database. For example, if the recommendation changes knobs related to PostgreSQL’s checkpoint operations (checkpoint_completion_target) and background writer (bgwriter_lru_maxpages) but you only want to apply the change for the former, you have to manually apply the change to database using Amazon’s Parameter Group interface. As soon as you do that, OtterTune will detect the configuration change in the database, discard the recent configuration recommendation and begin analyzing database performance with its machine learning models.

In future releases, we may allow you to accept or reject recommended changes one by one and edit the values before applying them, depending on your feedback. We’re also considering adding the ability to export configurations to external applications like Jira, so OtterTune can become more integrated with DevOps workflows.

Getting Started

If you’d like to give Human + Otter tuning a whirl, the first step is to sign up for a free account. Once you’ve set up your database, or if you’ve already got one connected, edit the tuning options of that database and set Approval Method to Manual. Congratulations, you’re now working together with OtterTune! For more information check out the OtterTune documentation.

Toggle Human in the Loop control on or off. If disabled, OtterTune will apply new configuration recommendations automatically.

Find Out More

Find out how our new Human in the Loop features work. I’ll also be hosting a webinar to answer your questions:

And please, we want to know what you and your organization need in terms of Human in the Loop features, so reach out to us with your feedback on how we can improve. If you haven’t signed up yet, create your free OtterTune account and join us on Slack to let us know how it’s going.


Ready to put your database optimization on autopilot?

Use OtterTune to automatically check the health of your Amazon RDS MySQL and PostgreSQL databases.

Connect your first database for free