OtterTune. Automatic Database Management System Tuning Through Large-scale Machine Learning

Similar documents
Part #1 Part #2 Part #3. Background Engineering Oracle Rant

Automated Database Workload Characterization, Mapping, and Tuning through Machine Learning. Abstract

Part #1 Part #2 Part #3. Background Engineering Oracle Rant

Agenda. Cassandra Internal Read/Write path.

Vamsidhar Thummala. Joint work with Shivnath Babu, Songyun Duan, Nedyalkov Borisov, and Herodotous Herodotou Duke University 20 th May 2009

E-Store: Fine-Grained Elastic Partitioning for Distributed Transaction Processing Systems

DATABASES IN THE CMU-Q December 3 rd, 2014

Accelerating OLTP performance with NVMe SSDs Veronica Lagrange Changho Choi Vijay Balakrishnan

Application-Specific Configuration Selection in the Cloud: Impact of Provider Policy and Potential of Systematic Testing

VERITAS Storage Foundation 4.0 for Oracle

VOLTDB + HP VERTICA. page

STORAGE LATENCY x. RAMAC 350 (600 ms) NAND SSD (60 us)

A Predictive Load Balancing Service for Cloud-Replicated Databases

Which technology to choose in AWS?

Quantifying Load Imbalance on Virtualized Enterprise Servers

Architecture and Performance characteristics of a PostgreSQL implementation of the TPC-E and TPC-V workloads

Trade- Offs in Cloud Storage Architecture. Stefan Tai

Practical MySQL Performance Optimization. Peter Zaitsev, CEO, Percona July 02, 2015 Percona Technical Webinars

Anti-Caching: A New Approach to Database Management System Architecture. Guide: Helly Patel ( ) Dr. Sunnie Chung Kush Patel ( )

davidklee.net gplus.to/kleegeek linked.com/a/davidaklee

Adaptive Self-tuning : A Neuro-Fuzzy approach

Cloud Monitoring as a Service. Built On Machine Learning

Capacity Planning for Application Design

ArcGIS Server Architecture Considerations. Andrew Sakowicz

Nomad: Mitigating Arbitrary Cloud Side Channels via Provider-Assisted Migration

Join Processing for Flash SSDs: Remembering Past Lessons

HANA Performance. Efficient Speed and Scale-out for Real-time BI

Oracle Database 10g The Self-Managing Database

Highly Available Database Architectures in AWS. Santa Clara, California April 23th 25th, 2018 Mike Benshoof, Technical Account Manager, Percona

Measuring HEC Performance For Fun and Profit

VERITAS Storage Foundation 4.0 for Oracle

Scalability Testing with Login VSI v16.2. White Paper Parallels Remote Application Server 2018

Copyright 2018, Oracle and/or its affiliates. All rights reserved.

Performance Best Practices Paper for IBM Tivoli Directory Integrator v6.1 and v6.1.1

Anastasia Ailamaki. Performance and energy analysis using transactional workloads

Scalable Transaction Processing on Multicores

Database Services at CERN with Oracle 10g RAC and ASM on Commodity HW

RAC Performance Monitoring and Diagnosis using Oracle Enterprise Manager. Kai Yu Senior System Engineer Dell Oracle Solutions Engineering

Final Lecture. A few minutes to wrap up and add some perspective

Leveraging Lock Contention to Improve Transaction Applications. University of Washington

Introduction to Database Services

Database Architecture 2 & Storage. Instructor: Matei Zaharia cs245.stanford.edu

DETECTING RESOLVERS AT.NZ. Jing Qiao, Sebastian Castro DNS-OARC 29 Amsterdam, October 2018

Performance Extrapolation for Load Testing Results of Mixture of Applications

Postgres in Amazon RDS. Denish Patel Lead Database Architect

Architecture of a Real-Time Operational DBMS

How to Fulfill the Potential of InnoDB's Performance and Scalability

MySQL Performance Tuning

A Database System Performance Study with Micro Benchmarks on a Many-core System

Parallels Remote Application Server. Scalability Testing with Login VSI

Performance Evaluation of NoSQL Databases

PostgreSQL Performance The basics

Enlightening the I/O Path: A Holistic Approach for Application Performance

Architecture-Conscious Database Systems

Qlik Sense Performance Benchmark

Nomad: Mitigating Arbitrary Cloud Side Channels via Provider-Assisted Migration

Database Learning: Toward a Database that Becomes Smarter Over Time

1. Introduction. 2. Setup

White Paper. Major Performance Tuning Considerations for Weblogic Server

Fast and Accurate Load Balancing for Geo-Distributed Storage Systems

An Analysis of the Amount of Global Level Redundant Computation in the SPEC 95 and SPEC 2000 Benchmarks

VCAP5-DCD. Vmware. VMware Certified Advanced Professional 5 - Data Center Design

What is. Thomas and Lori Duncan

Jyotheswar Kuricheti

MixApart: Decoupled Analytics for Shared Storage Systems. Madalin Mihailescu, Gokul Soundararajan, Cristiana Amza University of Toronto and NetApp

Seagate Enterprise SATA SSD with DuraWrite Technology Competitive Evaluation

Enhanced Performance of Database by Automated Self-Tuned Systems

Design Patterns for the Cloud. MCSN - N. Tonellotto - Distributed Enabling Platforms 68

Using MySQL in a Virtualized Environment. Scott Seighman Systems Engineer Sun Microsystems

Exadata Implementation Strategy

Lies, Damn Lies and Performance Metrics. PRESENTATION TITLE GOES HERE Barry Cooks Virtual Instruments

Designing Fault-Tolerant Applications

QLIKVIEW SCALABILITY BENCHMARK WHITE PAPER

Using Bad Learners to find Good Configurations

Performance Lab Report & Architecture Overview Summary of SnapVDI Features and Performance Testing Using Login VSI

Squall: Fine-Grained Live Reconfiguration for Partitioned Main Memory Databases

Discovering Dependencies between Virtual Machines Using CPU Utilization. Renuka Apte, Liting Hu, Karsten Schwan, Arpan Ghosh

Acceleration of Virtual Machine Live Migration on QEMU/KVM by Reusing VM Memory

Oracle NoSQL Database

Benchmarking Cloud Serving Systems with YCSB 詹剑锋 2012 年 6 月 27 日

VMware vrealize Code Stream Reference Architecture. 12 APRIL 2018 vrealize Code Stream 2.4

BlackBerry AtHoc Networked Crisis Communication Capacity Planning Guidelines. AtHoc SMS Codes

2013 AWS Worldwide Public Sector Summit Washington, D.C.

Flash Storage Complementing a Data Lake for Real-Time Insight

Scaling DreamFactory

CIS 601 Graduate Seminar. Dr. Sunnie S. Chung Dhruv Patel ( ) Kalpesh Sharma ( )

SELF-TUNING HTM. Paolo Romano

BenchPress: Dynamic Workload Control in the OLTP-Bench Testbed

ArcGIS Enterprise Performance and Scalability Best Practices. Andrew Sakowicz

Toward timely, predictable and cost-effective data analytics. Renata Borovica-Gajić DIAS, EPFL

Demystifying SQL Tuning: Tips and Techniques for SQL Experts

Eric Bollengier Director of Engineering Bacula Systems. Bacula Performance & Tuning

HYRISE In-Memory Storage Engine

YCSB++ benchmarking tool Performance debugging advanced features of scalable table stores

Oracle VM 3.3. Planning and Implementing

January 28-29, 2014 San Jose

Last Class Carnegie Mellon Univ. Dept. of Computer Science /615 - DB Applications

Real Time: Understanding the Trade-offs Between Determinism and Throughput

The 7 deadly sins of cloud computing [2] Cloud-scale resource management [1]

Fast Approximations for Analyzing Ten Trillion Cells. Filip Buruiana Reimar Hofmann

Transcription:

OtterTune Automatic Database Management System Tuning Through Large-scale Machine Learning Dana Van Aken, Andrew Pavlo, Geoffrey J. Gordon, Bohan Zhang [image source]

2 DBMS Tuning Tuning a DBMS s configuration knobs knobs for the application s workload and hardware is critical for performance Tuning even one DBMS deployment is hard

3 Challenge #1: Dependencies MySQL v5.6, YCSB: update-heavy workload VM - 2GB RAM, 2 vcpus 2.0 99th %-tile latency (sec) lower is better 1.0 0.0 0.2 0.4 0.6 0.8 Log file size (GB) 1.0 2.5 2.0 1.5 1.0 0.5 Buffer pool size (GB)

4 Challenge #2: Continuous Settings MySQL v5.6, YCSB: update-heavy workload VM - 2GB RAM, 2 vcpus 3.0 2.0 99th %-tile latency (sec) lower is better 1.0 0.0 0.0 1.0 2.0 Buffer pool size (GB) 3.0

5 Challenge #3: Non-reusable Configs MySQL v5.6, 3 different YCSB workloads Workload #1 Workload #2 Workload #3 6.0 30x 99th %-tile latency (sec) lower is better 4.0 2.0 0.0 8x Config #1 Config #2 Config #3

6 Challenge #4: Tuning Complexity Number of configuration knobs in MySQL and Postgres releases over the last 16 years Number of knobs 600 400 200 MySQL Postgres 539 291 7x 5x 0 2000 2004 2008 2012 2016

7 Existing Solutions Auto-tuners Heuristic-based; DBMS-specific; Smart Auto-tuners Research only; no data reuse;

8 OtterTune Reuse historical performance data from tuning past DBMS deployments to tune new DBMS deployments Train ML models to: 1. Identify the most impactful knobs 2. Find past workloads that are similar to the new workload 3. Recommend knob settings that improve a target objective (e.g., latency, throughput)

Controller Tuning Manager 4 3 1 2 DBMS ML Models Data Repository 1 User specifies the target objective 2 Controller starts the first observation period - Measures external metrics, then collects DBMS-specific internal metrics - Returns: metrics, current knob configuration 3 Tuning manager saves the data and computes the next configuration - Returns: next configuration, expected improvement 4 Controller installs next configuration on DBMS

10 Assumptions & Limitations All DBMS instances run on the same hardware Blacklist for knobs that should NOT be tuned

11 Machine Learning Pipeline Workload Characterization Knob Identification Samples Metrics Distinct Metrics Samples Knobs Knobs Importance Automatic Tuner

12 Workload Characterization Goal: find a set of metrics that best characterize an application s workload Method: Use the metrics stored in OtterTune s data repository

Internal DBMS Metrics: - Directly affected by the knobs settings... Buffer pool size is too small: # buffer pool misses total # buffer pool requests - Problem: redundancy - Same but different units - Highly correlated... - Solution: prune them - Factor analysis to capture correlation patterns - K-means to group correlated metrics

14 Sample Metric Clusters MySQL (v5.6) innodb_data_reads innodb_buffer_pool_reads innodb_pages_read Postgres (v9.3) blks_read heap_blks_read idx_blks_read questions table_locks_immediate table_open_cache_hits buffers_backend blk_write_time buffers_clean

15 Knob Identification Goal: identify which knobs affect the DBMS s performance Method: feature selection technique to order the knobs by importance

Configuration Knobs: - Knobs have varying degrees of impact on the DBMS s performance - Some have high impact... - Some have no impact - For many, it depends on the workload - Problem: which knobs matter? - Solution: Lasso to determine the order of importance...... - Problem: how many to tune? - Solution: Incremental knob selection to gradually increase the number of knobs tuned during a session

17 Top 5 Configuration Knobs MySQL (v5.6) Postgres (v9.3) 1. innodb_buffer_pool_size 2. innodb_flush_method 3. innodb_log_file_size 4. innodb_thread_concurrency 5. innodb_max_dirty_pages- _pct_lwm 1. shared_buffers 2. checkpoint_segments 3. effective_cache_size 4. bgwriter_lru_maxpages 5. bgwriter_delay

18 Automated Tuning Step 1: Workload Mapping Step 2: Configuration Recommendation

19 Step 1: Workload Mapping Goal: Match the target DBMS s workload to the most similar known workload in the data repository Method: For each known workload, compute a similarity score by comparing the performance measurements

Similarity score: average distance in performance measurements over all metrics - Problem: computing the score with raw metrics would be unfair - Solution: compute deciles, bin values - Problem: little overlap in the configurations tried between workloads - Solution: for each metric, train statistical model to predict performance Target DBMS s Workload Known Workloads Target Workload Workload A Workload B Bin metric values Knob Config X f(x) f(x) p99 latency throughput innodb_data_writes handler_read_key 792 512 46044 526784 4 5 7 5 8 2 9 3 3 5 8 4

21 Step 2: Recommendation Goal: recommend configurations in order to optimize the target metric over the entire tuning session Method: Reuse data from the similar workload in step #1 to train a statistical model and use it to optimize the next configuration to try

22 Recommendation Steps Use similar historical data & new data to train a Gaussian Process model Predict the latency & variance for a sample set of possible configurations 0.0 0.2 0.4 0.6 0.8 1.5 2.5 2.0 1.0 0.5 Optimize the next configuration to try, trading off: - Exploration: gathering information to improve the model - Exploitation: greedily trying to do well on the target objective 99th %-tile latency (s) 2.0 1.0 Log file size (GB) Buffer pool size (GB)

23 Experimental Setup DBMSs: MySQL (v5.6), Postgres (v9.3) Training data collection: 15 YCSB workload mixtures ~30k trials per DBMS Experiments conducted on Amazon EC2

24 99th %-tile latency (sec) lower is better Data vs. No Data OtterTune ituned MySQL (v5.6) Postgres (v9.3) 36% 34% TPC-C 46% TPC-C 30% 47% Wikipedia 42% 2 hours of tuning time 40% 42% Wikipedia

25 MySQL: Efficacy Comparison Default OtterTune Tuning Script DBA RDS Config 1.5 1.64 750 686 736 1.0 0.5 0.74 0.71 500 OtterTune generates a knob configuration comparable to the DBA! 250 508 562 0.30 0.32 165 0.0 99th percentile latency (sec) (lower is better) 0 Throughput (txn/sec) (higher is better)

26 Postgres: Efficacy Comparison Default OtterTune Tuning Script DBA RDS Config 0.6 0.4 0.2 0.53 0.24 0.25 0.25 0.30 1000 946 750 845 OtterTune generates a knob 500 configuration comparable to the DBA! 250 426 843 714 0.0 99th percentile latency (sec) (lower is better) 0 Throughput (txn/sec) (higher is better)

27 Future Work Automatically detecting the hardware capabilities of the DBMS s host machine Auto-tuning hierarchical components Multi-objective optimization

THE END @danavanaken