HNHacker News
TopNewBestAskShowJobs

apavlo

696 karma · joined November 4, 2020

https://www.cs.cmu.edu/~pavlo/
submissionscomments
apavlo··on Show HN: OtterTune – Automated Database Tuning Service for RDS MySQL/Postgres
Reach out to us and we'll make sure you get notified: https://ottertune.com/contact
apavlo··on Show HN: OtterTune – Automated Database Tuning Service for RDS MySQL/Postgres
> I see you can setup using CloudFormation. Any chance terraform is on the roadmap?

Yes, we will be adding support for TerraForm by next month.

> On a personal note, thanks for everything you do.

You're welcome! But database research is probably keeping me out of jail. That's why I have to keep going.

> I’m a subscriber to the CMU Database Group channel and advocate of keeping it real.

Don't thank me. Thank the Steven Moy Foundation for Keeping it Real (https://stevenmoyfoundation.org).

apavlo··on Show HN: OtterTune – Automated Database Tuning Service for RDS MySQL/Postgres
Alvaro! Good to hear from you. We really like the Ongres conf management tool. We just haven't come across anybody using it for on-prem DBs in the wild.

As I said above, everyone that we've talked to rolls their conf management tools because they are doing more than just DBMS confs (proxies, networking, kernel params, middleware, etc). Lots of Terraform.

apavlo··on Show HN: OtterTune – Automated Database Tuning Service for RDS MySQL/Postgres
Lots to unpack here.

> I'm a little curious why AWS is free/cheap, but anything other than AWS ends up in the "Enterprise, contact us for pricing" bucket. It might simply be based on your costs. I don't know if the on-prem stuff is expensive since your software needs to be in the same datacenter or if it's just a pricing differentiator.

The expensive part for us about on-prem is the amount of custom code that we have to write for the agent to deal with how the organization maintains their config files. For example, one customer that we talked maintained TerraForm files for their MySQL confs in Github. So we had to modify the Github repo, push to main, that would then trigger a Github action that then pushed the update to database. Then we had to know when the updated config was deployed so that we could bounce the system (if it required a restart). Restarting the DBMS is tricky too, since everybody does it differently.

> I'm also wondering if you've thought of going the DBaaS route.

There is a lot to running a DBaaS (backups, configs, upgrades). At this point I think it would be very difficult to compete with Amazon/MSFT/Google/Oracle/etc if it was just stock Postgres/MySQL. You need a killer feature

> Speaking of ongoing benefit, would there be a lot of benefit to paying for more than one month?

You are asking about a floating license. This is a potential for enterprise customers. For now we track RDS databases by their ARN. So if you try to switch that on OtterTune, it treats it as a new database. This is necessary to make sure that the ML models don't freak out if there is a dramatic change all of a sudden.

The demo video was with TPC-C. The workload is stable. We've seen workloads that evolve a lot over the course of months, so it is unlikely that the same configuration would be optimal during this entire period.

> I guess it's just hard to try if, like me, you're not on AWS.

Reach out to us and I'm happy to talk to you about your setup: https://ottertune.com/contact

> Really cool and congrats on VLDB!

The science comes first.

apavlo··on Show HN: OtterTune – Automated Database Tuning Service for RDS MySQL/Postgres
Good catch. Fixed!
apavlo··on Show HN: OtterTune – Automated Database Tuning Service for RDS MySQL/Postgres
Our expected usage for the current version of OtterTune is that you will enable tuning and then let the ML algorithms figure out your workload patterns. The models will then converge with an optimal config and then you switch it back into monitoring mode. How long this takes depends on your workload patterns.

We are working on the ability for OtterTune to alert you during monitoring mode when it thinks your workload/database have changed enough that it merits turning the tuning mode back on. We could also have it show the recommendations when this occurs as you suggest.

apavlo··on Show HN: OtterTune – Automated Database Tuning Service for RDS MySQL/Postgres
Yes. It's on our roadmap for next year.
apavlo··on Show HN: OtterTune – Automated Database Tuning Service for RDS MySQL/Postgres
We have had very few requests to support GCP. After AWS and on-prem, the next most requested platform is Azure.

If you really want GCP, let us know here: https://ottertune.com/contact

apavlo··on Show HN: OtterTune – Automated Database Tuning Service for RDS MySQL/Postgres
It's play on the word "autotune".

Otters are also vicious animals, which is an important trait to have if you are working with databases: https://youtu.be/J7f6s2g8C0I

apavlo··on Show HN: OtterTune – Automated Database Tuning Service for RDS MySQL/Postgres
We have deployed OtterTune for on-prem databases (baremetal, containers). But we are not offering that to everyone right now because organizations manage their configurations for these deployments in a bunch of different ways (Github actions, Chef/Puppet, Terraform). The nice thing about RDS is that they have a single API for updating configurations (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_...).

As for the Postgres-derivates that you mentioned (Timescale, Citus), we have not tested OtterTune for them yet. But there is no reason they shouldn't also work because they expose the same metrics API (pg_stat_database) and config knobs. There are just way more people using Postgres (RDS, Aurora), so we are focusing on them right now.

apavlo··on Show HN: OtterTune – Automated Database Tuning Service for RDS MySQL/Postgres
It's true that for static workloads/databases, you don't need continuous tuning.

But as you add new app features, grow database size, upgrade DBMS versions, and make other changes, OtterTune tracks your system to make sure you are always using the best config. This is problem is even harder with 1000s of individual database instances. Customers have told us that they want something can tune database continuously in a way that is not possible with DBAs and existing monitoring tools.

Knob tuning is also the first step in the kind of automation that we are working on using OtterTune's ML-based approach.

apavlo··on Show HN: OtterTune – Automated Database Tuning Service for RDS MySQL/Postgres
It depends on the workload (OLTP vs. OLAP, read-heavy vs. write-heavy). In our original research paper (https://db.cs.cmu.edu/papers/2017/p1009-van-aken.pdf), we came up with an automated way of determining which knobs have the most impact on performance. We've tested up to Postgres v13 in the commercial version of OtterTune.

For most workloads, shared_buffers and work_mem have the most impact. For write-heavy OLTP workloads, tuning the WAL (max_wal_size) and autovacuum knobs (e.g., autovacuum_vacuum_scale_factor) have the most benefit. For read-mostly OLAP workloads, Postgres' parallel knobs (max_parallel_workers_per_gather) provide the most improvement.

But you need to also tune all the other knobs to get the last 15-40% of potential performance improvement. This is what OtterTune can do.

More info about how we select knobs: https://ottertune.com/blog/prevent-machine-learning-from-wre...

apavlo··on Show HN: OtterTune – Automated Database Tuning Service for RDS MySQL/Postgres
Details about our new self-service offering using Fargate is available here: https://ottertune.com/blog/ottertune-2021-10-product-update
apavlo··on Show HN: OtterTune – Automated Database Tuning Service for RDS MySQL/Postgres
We have done two major deployments of OtterTune in Europe. One of them we published a VLDB paper about (https://ottertune.com/blog/vldb-autonomous-database-tuning-i...). Their infosec people looked at the data OtterTune collects and determined that there are no GDPR issues.

We are incrementally expanding the AZs we support in the free tier in order to carefully scale our service. We plan to support EU zones by the end of the year.

apavlo··on You Are Overpaying Jeff Bezos for Your Databases
Yo. It's Andy@OtterTune here.

OtterTune does not need to access user tables or view queries (nor do we want to). OtterTune only collects runtime metrics from the database (e.g., InnoDB stats, pg_stat_database) and CloudWatch. These performance counters are enough of a signal to tell how your application uses the database and how optimize the system accordingly.

Two of our major deployments that we can talk about were at a French bank and Booking.com, both of which are in Europe. Their infosec people looked at what we were sending to our service and said that were no GDPR issues.

The original motivation of the OtterTune project started because when I was a grad student I had trouble getting real workloads and data sets for my experiments. So I decided to purposely work on a database optimization tool that did not need access to the things that you are worried about when I started a new professor.

Let me know if you have any other questions.

apavlo··on A future for SQL on the web
> SQL survived the key/value fad

SQL has survived every fad since the 1970s:

Stonebraker "What Goes Around Comes Around"

https://people.cs.umass.edu/~yanlei/courses/CS691LL-f06/pape...

apavlo··on Benchmark: Using Machine Learning to Optimize Amazon RDS PostgreSQL Performance
OtterTune is something that we have been working on at Carnegie Mellon for several years now. Your overall assessment of our approach is correct. OtterTune uses Bayesian Optimization, either with a GP or DNN as the surrogate model to predicate how the objective function will change for a given set of knob values. We then run GD to find a new set of values.

A lot of the tricky parts in this problem are figuring out what to tune, how to tune, and when to tune.

apavlo··on JIT-Compiling SQL Queries in PostgreSQL Using LLVM
Andy from Carnegie Mellon here. This is impressive work. My PhD student and I have looked into similar methods for autotuning config knobs for MySQL + Postgres: https://db.cs.cmu.edu/projects/ottertune/

One of the many challenges with DB tuning that we have found is that people don't know whether their database, application, or DBMS version has changed enough to warrant another round of tuning. The best values that your tuning produces today may be different two weeks from now. Also, all the knobs that you are tuning don't require restarting the DBMS. Some of the knobs that make the most significant performance difference require you to restart the DBMS first before they take effect, which is not something people want to do often on their production database. None of the knobs that you target require restarting.

This problem is super interesting and our research has shown that it can really improve DB performance for some applications. We are in the process of spinning out OtterTune as a new startup: https://ottertune.com/

apavlo··on TerarkDB, ByteDance's RocksDB replacement
Email me (pavlo@cs.cmu.edu). I don't think you ever had an account.
apavlo··on PostgreSQL Configuration for Humans
We have seen up to a 2x improvement in Postgres' throughput after tuning it with OtterTune over the default Amazon configuration. Here is an overview of how OtterTune's algorithms work: https://aws.amazon.com/blogs/machine-learning/tuning-your-db...

Hit us up to see if we can do the same for you: https://ottertune.com/demo.html

apavlo··on NoisePage – Self-Driving Database Management System
> Does anybody know how you implement multiversion concurrency control?

I have lectures available on Youtube:

Intro DB Class:

* https://15445.courses.cs.cmu.edu/fall2019/schedule.html#nov-...

Advanced DB Class (with reading list):

* Design Decisions: https://15721.courses.cs.cmu.edu/spring2020/schedule.html#ja...

* Protocols: https://15721.courses.cs.cmu.edu/spring2020/schedule.html#ja...

* Garbage Collection: https://15721.courses.cs.cmu.edu/spring2020/schedule.html#ja...

apavlo··on NoisePage – Self-Driving Database Management System
> It seems like "Self-Driving" to the authors means simply that it has a query optimizer using ML.

Nope. Please see this article for my definition of self-driving: http://www.cs.cmu.edu/~pavlo/blog/2018/04/what-is-a-self-dri...

apavlo··on NoisePage – Self-Driving Database Management System
> This is using several buzzwords some database vendors are already using to promote their fully managed solutions, yet the "autonomy" of this dbms appears to be limited to SQL tuning.

This is incorrect. Where did you get this impression? We are trying to support automated physical design, knob configuration tuning, SQL tuning, and capacity planning/scaling.

Please refer to our vision paper: https://db.cs.cmu.edu/papers/2017/p42-pavlo-cidr17.pdf

← PreviousPage 5 of 5