Apr 5, 2023

OtterTune v2.0: Fresh look and killah features

Andy Pavlo

dj ot ottertune v2 announcement
dj ot ottertune v2 announcement

Prepare for your dome piece to be rocked because we’re dropping OtterTune v2.0 today! This release culminates three years of slinging since we forked the company out of Carnegie Mellon University in 2020.

Building on our previous research on using machine learning (ML) to optimize databases, the latest version of OtterTune goes beyond just trying to maximize efficiency and performance. It expands our use of ML to provide better visibility into database health over long periods.

OtterTune v2.0 is a completely different way of managing and tuning databases. It’s not just about coming in and getting the quick win one database at a time. That’s nice and all, but there’s so much more people need help with.

Instead, OtterTune now takes a holistic view of how PostgreSQL and MySQL databases (and their applications) evolve over time and how they interact with other databases in an organization. We provide the same AI-powered automated knob tuning but now expand our recommendations to indexes and cloud settings.

We are also releasing a preview version of our automated query tuning feature to select customers. The goal of this major update is to provide better visibility into database health and performance.

Why the new version?

A lot of the feedback we’ve gotten from customers is that they see a massive improvement in their database’s performance when they first start using OtterTune through its automated tuning. But then they don’t know whether to leave it on forever or turn it off.

The truth is your mileage with OtterTune will vary based on how your application changes over time. Most applications are not static. Developers add new features and functionality, which then hits up your database with new queries and data. As an application evolves, so do the tuning needs for the database. The more the application changes, the more drastic the config updates. And these changes add up over time.

p99 query latency graph for ottertune

Query Performance over time for OLTP workload on Amazon RDS PostgreSQL v13 using OtterTune.

You can see above one of our customers who initially ran OtterTune, then stuck with those settings without re-tuning for a while. The performance slowly declined (and increased costs) over time because their workload changed, but they did not update their database configuration. After they enabled OtterTune’s automatic tuning again, the customer’s database copped another 68% reduction in their P99 query latency.

This scenario happens a lot. It is rare for organizations not to update their application regularly in a way that requires re-examining their database configuration. The only organization we’ve ever talked to that does not need to constantly worry about tuning its databases is the US Patent Office.

Dana and I spoke to them in 2018 after our Amazon Machine Learning blog article came out. They told us they hadn’t changed their MySQL database in the last three years! For the rest of us, we got to keep the lookout for our databases and re-up when needed.

But nobody can babysit a database 24/7 to ensure it is running with the best practices. Even if you have a full-time DBA on your team (spoiler: most companies do not!), they have many other important responsibilities than checking that each DBMS is configured correctly. The problem is even more challenging if you have multiple databases running in production: OtterTune customers have an average of ten RDS instances per AWS organization.

This is what the new version of OtterTune is aiming to solve. It is more than just a performance and optimization service for individual MySQL and PostgreSQL databases running on Amazon RDS. Yes, we still do that. But now OtterTune’s more lofty goal is to provide users with “peace of mind” about their entire database fleet.

This means helping people sleep better at night, knowing that our algorithms always watch your database’s behavior. And then, when things change, it will tell you what has changed and whether your database is still running with the best practices.

The idea is simple. We see a lot of databases at OtterTune, and we know what’s best for them because we see how they react to all sorts of changes (e.g., workloads, query patterns, schema migrations, and version upgrades). Our algorithms learn from these experiences from other databases to ensure your database is running the best it possibly can.

New features

We are excited to announce the following new bangers in this release. We have also restructured OtterTune’s internal architecture for how it tracks individual databases. Existing users won’t notice a difference, but it enables several more features we’re working on back in the cut that we can share with everyone soon.

Health Score

Starting in v2.0, OtterTune computes a Health Score for each database to give you a quick overview of how well it is running. Before this, OtterTune’s algorithms only considered raw database metrics like throughput, latency, and CPU utilization. Although these numbers are important, they don’t show the complete picture. Databases are fickle beasts.

ottertune dashboard fleet level health

Things can look fine one minute, and then connections start hanging suddenly because your database is bleeding out due to a bad setting or errant index. Our Health Score captures the big picture of how your database is doing, keeping in mind best practices for production databases and key indicators like cost and speed.

Knob Configuration

This new version expands on the ML algorithms we developed at Carnegie Mellon for automatic database configuration tuning. OtterTune v2.0’s knob tuning feature now blends ML-generated and heuristics-based recommendations. This improvement helps guide the ML models to the optimal solution more quickly. OtterTune also allows you to apply them to your database in three ways.

ottertune knob recommendations

In addition to manual and automated review, you can now copy + paste the command lines and use them themselves, in case you do not want to give OtterTune the necessary AWS permissions to apply changes automatically. And it’s highly customizable. OtterTune tunes your eight most impactful knobs for MySQL and PostgreSQL by default and allows you to customize your tuning experience by enabling additional knobs.

Index Tuning

The number one requested feature we got from customers last year is for OtterTune to provide automatic index tuning. This is, of course, a hard but essential task. Tuning a database’s indexes can reduce costs and memory/storage usage so your database runs faster and more efficiently.

OtterTune identifies if your database has too many unused or duplicate indexes and recommends which ones to drop. It does this by periodically examining the access patterns of queries inside the DBMS instance. It then provides copyable commands to drop the indexes you select.

Query Tuning

We are most excited about this new feature in OtterTune v2.0! The service now identifies problematic queries and provides helpful recommendations for fixing them. Unfortunately, OtterTune cannot automatically fix them because it requires changing application code (we will eventually be able to do this, just not yet). But OtterTune now tracks anonymized query digests and database schemas to provide a centralized view of the bad queries in your database.

OtterTune then uses this data to make query recommendations to improve performance and avoid SQL anti-patterns. We are still working on the final polish for OtterTune’s query tuning recommendations (this problem is hard, and we want to make sure we get it right), so it is currently not enabled for new customers.

Hit us up to try this feature for your database after you sign up for an account and connect your database.

Improved UX and UI

We designed the initial version of OtterTune in 2020 based on our experiences as scientists that needed to keep track of experiments for research papers. But in OtterTune v2.0, we designed it for software developers and engineers with better stuff to do than watch performance charts.

When you log into OtterTune, it provides an overview page where you can see all of your databases at a glance, ranked recommendations by the severity of impact (i.e., what’s most important to fix). OtterTune also makes it easy to switch between multiple AWS accounts. We see a lot of customers have one AWS account for testing/dev databases and then another AWS account for production databases.

What’s next?

I’m not trying to die in these database streets alone. This is why the OtterTune team has been hard at work turning out this new release for the last year since we pulled up our series A funding last year. We now have a backend platform and a fancy frontend that makes it easier for us to deploy new database recommendations.

Our improved agility means that if you sign up for OtterTune today and see that your health score is satisfactory, you might get an alert from us in two weeks telling you that your database health is now dangerous because our new checks found something wrong with it. And this is the way it should be if you want the confidence that your database is always on point like Kobe in his prime.

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.