MySQL: Cloud vs Bare Metal, Performance and Reliability



Similar documents
Choosing Storage Systems

On- Prem MongoDB- as- a- Service Powered by the CumuLogic DBaaS Platform

Web Application Deployment in the Cloud Using Amazon Web Services From Infancy to Maturity

Best Practices for Using MySQL in the Cloud

Designing Apps for Amazon Web Services

High Performance MySQL Choices in Amazon Web Services: Beyond RDS. Andrew Shieh, SmugMug Operations smugmug.

How To Choose Between A Relational Database Service From Aws.Com

Table of Contents. Overview... 1 Introduction... 2 Common Architectures Technical Challenges with Magento ChinaNetCloud's Experience...

DISTRIBUTED SYSTEMS [COMP9243] Lecture 9a: Cloud Computing WHAT IS CLOUD COMPUTING? 2

Amazon Elastic Beanstalk

Tushar Joshi Turtle Networks Ltd

Cloud Models and Platforms

MySQL Backup and Recovery: Tools and Techniques. Presented by: René Senior Operational DBA

OTM in the Cloud. Ryan Haney

High Availability Solutions for the MariaDB and MySQL Database

TECHNOLOGY WHITE PAPER Jun 2012

Scalable Architecture on Amazon AWS Cloud

Chapter 9 PUBLIC CLOUD LABORATORY. Sucha Smanchat, PhD. Faculty of Information Technology. King Mongkut s University of Technology North Bangkok

Last time. Today. IaaS Providers. Amazon Web Services, overview

Migration Scenario: Migrating Backend Processing Pipeline to the AWS Cloud

TECHNOLOGY WHITE PAPER Jan 2016

How to Optimize the MySQL Server For Performance

AVLOR SERVER CLOUD RECOVERY

Exploring Amazon EC2 for Scale-out Applications

RDBMS in the Cloud: Oracle Database on AWS

MySQL and Virtualization Guide

Alfresco Enterprise on AWS: Reference Architecture

Amazon Relational Database Service. User Guide API Version

Building Success on Acquia Cloud:

How AWS Pricing Works

Amazon EC2 Product Details Page 1 of 5

A Comparison of Clouds: Amazon Web Services, Windows Azure, Google Cloud Platform, VMWare and Others (Fall 2012)

PostgreSQL on Amazon. Christophe Pettus PostgreSQL Experts, Inc.

AWS Performance Tuning

Amazon Web Services Primer. William Strickland COP 6938 Fall 2012 University of Central Florida

Storage and Disaster Recovery

Cloud Computing and Amazon Web Services

This document will list the ManageEngine Applications Manager best practices

Deep Dive: Maximizing EC2 & EBS Performance

Scaling in the Cloud with AWS. By: Eli White (CTO & mojolive) eliw.com - mojolive.com

How AWS Pricing Works May 2015

MySQL performance in a cloud. Mark Callaghan

PostgreSQL Backup Strategies

Dave Stokes MySQL Community Manager

This computer will be on independent from the computer you access it from (and also cost money as long as it s on )

STeP-IN SUMMIT June 18 21, 2013 at Bangalore, INDIA. Performance Testing of an IAAS Cloud Software (A CloudStack Use Case)

The Cloud is Not Enough Why Hybrid Infrastructure is Shaping the Future of Cloud Computing

Scaling Database Performance in Azure

CONNECTRIA MANAGED AMAZON WEB SERVICES (AWS)

Applications Manager Best Practices document

Cloud Computing. Adam Barker

Which Database is Better for Zabbix? PostgreSQL vs MySQL. Yoshiharu Mori SRA OSS Inc. Japan

Drupal in the Cloud. Scaling with Drupal and Amazon Web Services. Northern Virginia Drupal Meetup

Optimizing TYPO3 performance

DBA Tutorial Kai Voigt Senior MySQL Instructor Sun Microsystems Santa Clara, April 12, 2010

KT ucloud storage. Two Years of Life with OpenStack Swift / Jaesuk Ahn, Cloud OS Dev. Team, Korea Telecom

Web Application Hosting in the AWS Cloud Best Practices

High-Availability in the Cloud Architectural Best Practices

PostgreSQL Performance Characteristics on Joyent and Amazon EC2

MySQL Cluster Deployment Best Practices

Agenda. Enterprise Application Performance Factors. Current form of Enterprise Applications. Factors to Application Performance.

Dimension Data Enabling the Journey to the Cloud

Amazon Web Services Student Tutorial

Enabling Database-as-a-Service (DBaaS) within Enterprises or Cloud Offerings

Cloud Based Application Architectures using Smart Computing

Build Your Own Performance Test Lab in the Cloud. Leslie Segal Testware Associate, Inc.

Zero-Downtime MySQL Backups

Are You Ready for the Holiday Rush?

Design for Failure High Availability Architectures using AWS

Scaling Graphite Installations

High Availability and Scalability for Online Applications with MySQL

Amazon Web Services Yu Xiao

DMS Performance Tuning Guide for SQL Server

Percona Server features for OpenStack and Trove Ops

Web Application Hosting in the AWS Cloud Best Practices

OVERVIEW Methodology Objectives Terminology Recommended Test Protocol... 3 CLOUD SERVICES VS. DEDICATED HOSTING...

Backup and Recovery of SAP Systems on Windows / SQL Server

Planning Domain Controller Capacity

Database Administration with MySQL

Amazon Cloud Storage Options

HP OO 10.X - SiteScope Monitoring Templates

Building Fault-Tolerant Applications on AWS October 2011

LARGE-SCALE DATA STORAGE APPLICATIONS

MySQL Backup IEDR

Software- as- a- Service (SaaS) on AWS Business and Architecture Overview

MySQL backups: strategy, tools, recovery scenarios. Akshay Suryawanshi Roman Vynar

MAGENTO HOSTING Progressive Server Performance Improvements

CLOUD COMPUTING FOR THE ENTERPRISE AND GLOBAL COMPANIES Steve Midgley Head of AWS EMEA

MySQL Enterprise Backup

Storage Options in the AWS Cloud

Getting Started with Attunity CloudBeam for Azure SQL Data Warehouse BYOL

Transcription:

MySQL: Cloud vs Bare Metal, Performance and Reliability Los Angeles MySQL Meetup Vladimir Fedorkov, March 31, 2014

Let s meet each other Performance geek All kinds MySQL and some Sphinx Working for Blackbird Twitter @vfedorkov Slides will be there: http://astellar.com

Credits and thank yous LAMySQL Meetup Joe Devon Caroline Rose Blackbird, AWS advances tech partner Laine Campbell http://blackbird.io Blackbird s Rsync and EU team

How does it start Startup deciding to go with MySQL Getting successful That server gets slower and slower Now what to do?

Usual ways to grow Buy bigger server (scale up) Buy another server (scale out) Tune up your application Limit functionality

Questions to answer Which server to buy? Where? How long does it take to get new server? How long does it take to make it work? Why it didn t help? Why application is slow?

Which server to get? How much would infrastructure will cost me? Which performance will I get? How easy would be to add more servers? How much would it cost me?

Bare metal vs Cloud

Physical servers Predictable performance Raw infrastructure Takes long to install Old-style operations

Amazon EC2 Virtually provisioned boxes Managed infrastructure Boxes Network Attached disks Web/API bound operations Strong scalability suport Full OS access Flexible performance More your pay more you ll get

Amazon RDS Fully managed MySQL instances (SaaS) Oracle, MSSQL, RedShift, etc. No OS access Same on-demand scalability as EC2 Scripted scaling up/down MySQL-specific operations can be scripted

Resources Bare metal EC2 RDS CPU Physical Virtual, limited Virtual, limited RAM Physical Shared Shared IO Predictable Networkbased, limited Networkbased, limited

Operations

Day-to-day MySQL operations Hardware faults Software bugs Reliable backup and restore Monitoring Upgrading and replication setup Networking and Security

Physical servers vs EC2 vs RDS Bare metal EC2 RDS Provisioning By you Ready-to-go boxes DB instances Monitoring Your own OS-level by amazon All by amazon Backups Your own Or no backups Snapshot-based Manual on MySQL level Automated, no delayed replicas Replication Manual Manual Auto magic Networking All yours Provided by AWS Provided by AWS Hardware faults and software bugs All yours Included Included

Amazon cloud details Several regions (US, Europe, Asia) Several availability zones inside one region Different instance types General Memory optimized Compute-optimized GPU-instances Storage optimized

Storage EBS EC2 / RDS POIPS EC2 / RDS SSD-based backend Ephemeral EC2 only, attached SSD Attached

RDS details Parameter groups instead of my.cnf One click Web interface API available Limited visibility and operations Cloud-specific behavior Upgrade as a Surprise Can be disables in control panel Instance relocation as-a-surprise

How to survive?

Know your application Configure MySQL properly Tune your queries Monitor your system Predict your traffic

EC2 and RDS specific Hardware might be different Even each benchmark run IO is highly relies on network CPU & IO limiters are in place You don t know your cloud neighbors

First step MySQL configuration 5% settings makes 95% performance Which every query could kill What to tune at the first place innodb_buffer_pool_size Set on ¾ memory in RDS by default innodb_file_per_table key_buffer for MyISAM server-id for EC2 and standalone

Second step Network IO skip_name_resolv May affect authentication max_connect_errors FLUSH HOSTS max_allowed_packet innodb_flush_log_at_trx_commit innodb_log_file_size

Changes to avoid (usually) max_join_size sort_buffer_size tx_isolation Remember about 5% settings and 95% performance!

Backups What would you do if your MySQL has gone? Replicas-Replicas-Replicas and binary logs For point-in-time recovery Better to another host expire_logs_days max_binlog_size RDS snapshots Volume snapshots on EC2 Works like LVM backups

Consider worst case Limit InnoDB IO capacity on EBS Affecting replica creation time! Tune flush_log_at_trx_commit Keep tmp_table_size big enough Temporary tables are BAD! There are drawbacks! Know your queries!

Queries Most likely the cause of MySQL slowness Affect application speed Fastest MySQL query is the query that did not MySQL at all Cached Sent to another storage (you name it) Just didn t run Helps in case of overload

Bad queries: full table scans SELECT * FROM table WHERE DAY(FROM_UNIXTIME(`ts`)) = 205 WHERE enabled!= 1 WHERE id NOT IN (1,2,3,,10) WHERE url LIKE %something% LIKE something% is still okay ORDER BY RAND() All time classic

Poor index usage SELECT * / COUNT(*) FROM users WHERE enabled=1 Hello half of the table How to fix? Pre-aggregation Caches! Not in MySQL query cache! Right time to use external storage (Mongo, Redis, Sphinx, etc)

Temporary tables Bad Very bad if they hit the disk When? Will hit if there are TEXT or BLOB fields GROUP BY Sub SELECTS (better in 5.6) DISTINCT + ORDER BY

What else to do? Scale Run heavy queries on reporting replica Rewrite bad queries where possible

When load is really high Query cache (off) Thread cache Table cache Slow query log wait_timeout connection pooling Sharding and replication

Questions!

Thank you! http://blackbird.io, Vladimir Fedorkov, LA MySQL 2014