Dec 17, 2021

Introducing human-in-the-loop control over automatic database tuning

Neal Kaviratna

otters human-in-the-loop
otters human-in-the-loop

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.

ottertune human-in-the-loop

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.

ottertune tuning recommendations
  • 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 knob value ranges
  • 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 an 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.

ottertune approval methods

Try OtterTune for free. Start using AI to optimize your PostgreSQL or MySQL databases running on Amazon RDS or Aurora.

Try OtterTune for free. Start using AI to optimize your PostgreSQL or MySQL databases running on Amazon RDS or Aurora.

Get Started

Subscribe to blog updates.