lightning talks percona live mysql_2012

221
Lightning talks Giuseppe Maxia Continuent, Inc April 11, 2012 Wednesday, April 11, 12

Upload: giuseppe-maxia

Post on 12-May-2015

2.296 views

Category:

Technology


0 download

DESCRIPTION

Lightning talks at Percona Live MySQL Conference and Expo 2012

TRANSCRIPT

Page 1: Lightning talks percona live mysql_2012

Lightning talksGiuseppe MaxiaContinuent, Inc

April 11, 2012

Wednesday, April 11, 12

Page 2: Lightning talks percona live mysql_2012

LineupStewart Smith The 5 minutes tour of Drizzle

Jeff Mace What can possibly go wrong?

Nicolai Plum MAKE.DATABASES.FAST

Bill Karwin Schemadoc

Robert Hodges It's the application, stupid!

Robert Buck NuoDB overview

David Holoboff Diagnosis and possible fixes

Lawrence Schwartz OLTP and OLAP

Baron Schwartz Building a scalable system

Sheeri Cabral How to become a rock star DBA

Giuseppe Maxia Cruelty on database clusters

Wednesday, April 11, 12

Page 3: Lightning talks percona live mysql_2012

The 5 minutes tour of DrizzleStewart Smith

Wednesday, April 11, 12

Page 4: Lightning talks percona live mysql_2012

Wednesday, April 11, 12

Page 5: Lightning talks percona live mysql_2012

2008...

Wednesday, April 11, 12

Page 6: Lightning talks percona live mysql_2012

http://www.flickr.com/photos/shaylor/53819053/

Wednesday, April 11, 12

Page 7: Lightning talks percona live mysql_2012

2011...

Wednesday, April 11, 12

Page 8: Lightning talks percona live mysql_2012

Drizzle7

Wednesday, April 11, 12

Page 9: Lightning talks percona live mysql_2012

2012...

Wednesday, April 11, 12

Page 10: Lightning talks percona live mysql_2012

Drizzle7.1

Wednesday, April 11, 12

Page 11: Lightning talks percona live mysql_2012

What is Drizzle?

Wednesday, April 11, 12

Page 12: Lightning talks percona live mysql_2012

Modular architecture

Wednesday, April 11, 12

Page 13: Lightning talks percona live mysql_2012

Pluggable

Wednesday, April 11, 12

Page 14: Lightning talks percona live mysql_2012

Infrastructure Aware

Wednesday, April 11, 12

Page 15: Lightning talks percona live mysql_2012

Community Developed

Wednesday, April 11, 12

Page 16: Lightning talks percona live mysql_2012

Multicore

Wednesday, April 11, 12

Page 17: Lightning talks percona live mysql_2012

Concurrency

Wednesday, April 11, 12

Page 18: Lightning talks percona live mysql_2012

Web focus

Wednesday, April 11, 12

Page 19: Lightning talks percona live mysql_2012

UTF-8

Wednesday, April 11, 12

Page 20: Lightning talks percona live mysql_2012

EBCDIC!=

Wednesday, April 11, 12

Page 21: Lightning talks percona live mysql_2012

Enable others

Wednesday, April 11, 12

Page 22: Lightning talks percona live mysql_2012

Modern codebase

Wednesday, April 11, 12

Page 23: Lightning talks percona live mysql_2012

C++

Wednesday, April 11, 12

Page 24: Lightning talks percona live mysql_2012

STL

Wednesday, April 11, 12

Page 25: Lightning talks percona live mysql_2012

Boost

Wednesday, April 11, 12

Page 26: Lightning talks percona live mysql_2012

Nolinked-list innovation

Wednesday, April 11, 12

Page 27: Lightning talks percona live mysql_2012

Collaboration

Wednesday, April 11, 12

Page 28: Lightning talks percona live mysql_2012

Participation

Wednesday, April 11, 12

Page 29: Lightning talks percona live mysql_2012

Build businesses

Wednesday, April 11, 12

Page 30: Lightning talks percona live mysql_2012

Support & Consulting

Wednesday, April 11, 12

Page 31: Lightning talks percona live mysql_2012

Testing

Wednesday, April 11, 12

Page 32: Lightning talks percona live mysql_2012

Transactional

Wednesday, April 11, 12

Page 33: Lightning talks percona live mysql_2012

Logging

Wednesday, April 11, 12

Page 34: Lightning talks percona live mysql_2012

Replication

Wednesday, April 11, 12

Page 35: Lightning talks percona live mysql_2012

Multi-sourceReplication

Wednesday, April 11, 12

Page 36: Lightning talks percona live mysql_2012

Auth

Wednesday, April 11, 12

Page 37: Lightning talks percona live mysql_2012

LDAP

Wednesday, April 11, 12

Page 38: Lightning talks percona live mysql_2012

PAM

Wednesday, April 11, 12

Page 39: Lightning talks percona live mysql_2012

In database tables

Wednesday, April 11, 12

Page 40: Lightning talks percona live mysql_2012

No bad data

Wednesday, April 11, 12

Page 41: Lightning talks percona live mysql_2012

strict_mode

Wednesday, April 11, 12

Page 42: Lightning talks percona live mysql_2012

No GOTCHAs

Wednesday, April 11, 12

Page 43: Lightning talks percona live mysql_2012

No implicit COMMIT

Wednesday, April 11, 12

Page 44: Lightning talks percona live mysql_2012

BSD Client Libraries

Wednesday, April 11, 12

Page 45: Lightning talks percona live mysql_2012

New in 7.1

Wednesday, April 11, 12

Page 46: Lightning talks percona live mysql_2012

Multi-source Replication

Wednesday, April 11, 12

Page 47: Lightning talks percona live mysql_2012

XtraBackup

Wednesday, April 11, 12

Page 48: Lightning talks percona live mysql_2012

IPv6 data type

Wednesday, April 11, 12

Page 49: Lightning talks percona live mysql_2012

ZeroMQ

Wednesday, April 11, 12

Page 50: Lightning talks percona live mysql_2012

Syslog is default

Wednesday, April 11, 12

Page 51: Lightning talks percona live mysql_2012

query_log plugin

Wednesday, April 11, 12

Page 52: Lightning talks percona live mysql_2012

Auth from tables

Wednesday, April 11, 12

Page 53: Lightning talks percona live mysql_2012

Server-side Javascript

Wednesday, April 11, 12

Page 54: Lightning talks percona live mysql_2012

HTTP JSON API

Wednesday, April 11, 12

Page 55: Lightning talks percona live mysql_2012

Percona InnoDB Patches

Wednesday, April 11, 12

Page 56: Lightning talks percona live mysql_2012

Wednesday, April 11, 12

Page 57: Lightning talks percona live mysql_2012

What could possibly go wrong?

Jeff Mace

Wednesday, April 11, 12

Page 58: Lightning talks percona live mysql_2012

©Continuent 2012.

What Could Possibly Go Wrong?

Je! Mace

Wednesday, April 11, 12

Page 59: Lightning talks percona live mysql_2012

©Continuent 2012 59

http://mingle2.com/blog/view/web-developer-mind

Wednesday, April 11, 12

Page 60: Lightning talks percona live mysql_2012

©Continuent 2012 60

http://www.flickr.com/photos/brhefele/4026340146/

Wednesday, April 11, 12

Page 61: Lightning talks percona live mysql_2012

©Continuent 2012 61

http://www.flickr.com/photos/themoly/4336260658/

Wednesday, April 11, 12

Page 62: Lightning talks percona live mysql_2012

©Continuent 2012 62

Wednesday, April 11, 12

Page 63: Lightning talks percona live mysql_2012

©Continuent 2012 62

Wednesday, April 11, 12

Page 64: Lightning talks percona live mysql_2012

©Continuent 2012

What can I possibly do?

• Relax

• Have a plan

• Keep it simple

63

Wednesday, April 11, 12

Page 65: Lightning talks percona live mysql_2012

©Continuent 2012 64

http://www.flickr.com/photos/devenlaney/5767271943

Wednesday, April 11, 12

Page 66: Lightning talks percona live mysql_2012

MAKE.DATABASES.FASTNicolai Plum

Wednesday, April 11, 12

Page 67: Lightning talks percona live mysql_2012

Booking.com, part of priceline.com (Nasdaq: PCLN), headquartered in Amsterdam, 50+ offices worldwide. www.booking.com/offices

MAKE.DATABASES.FAST

Nicolai Plum

Wednesday, April 11, 12

Page 68: Lightning talks percona live mysql_2012

Booking.com, part of priceline.com (Nasdaq: PCLN), headquartered in Amsterdam, 50+ offices worldwide. www.booking.com/offices

The business

• Booking.com–Leading online hotel reservation agency–Part of the Priceline Group of Companies–Sustained rapid business growth–All powered by MySQL

Wednesday, April 11, 12

Page 69: Lightning talks percona live mysql_2012

Booking.com, part of priceline.com (Nasdaq: PCLN), headquartered in Amsterdam, 50+ offices worldwide. www.booking.com/offices

The challenge

Wednesday, April 11, 12

Page 70: Lightning talks percona live mysql_2012

Booking.com, part of priceline.com (Nasdaq: PCLN), headquartered in Amsterdam, 50+ offices worldwide. www.booking.com/offices

The problem…

• Hundreds of database servers• Many replication slaves• Few DBAs, some more sysadmins• Need to make tens of servers each day

Wednesday, April 11, 12

Page 71: Lightning talks percona live mysql_2012

Booking.com, part of priceline.com (Nasdaq: PCLN), headquartered in Amsterdam, 50+ offices worldwide. www.booking.com/offices

If you do this manuallyYou are doing it wrong

Wednesday, April 11, 12

Page 72: Lightning talks percona live mysql_2012

Booking.com, part of priceline.com (Nasdaq: PCLN), headquartered in Amsterdam, 50+ offices worldwide. www.booking.com/offices

Among our weapons are…

• Network OS installation• Puppet configuration management• Database cloning• and a fanatical devotion to automation!

Wednesday, April 11, 12

Page 73: Lightning talks percona live mysql_2012

Booking.com, part of priceline.com (Nasdaq: PCLN), headquartered in Amsterdam, 50+ offices worldwide. www.booking.com/offices

Server installation

• Server Database• PXE netboot• CentOS kickstart

Wednesday, April 11, 12

Page 74: Lightning talks percona live mysql_2012

Booking.com, part of priceline.com (Nasdaq: PCLN), headquartered in Amsterdam, 50+ offices worldwide. www.booking.com/offices

System configuration

• Now we have a server that can run Puppet• Puppet does

–OS setup–Software installation–LVM setup and filesystem creation (tailored by role)

• Prefer ongoing configuration management tools to single perfect installation tools

Wednesday, April 11, 12

Page 75: Lightning talks percona live mysql_2012

Booking.com, part of priceline.com (Nasdaq: PCLN), headquartered in Amsterdam, 50+ offices worldwide. www.booking.com/offices

Database cloning

• Now we have a server ready to run a database• Copying databases based on LVM snapshots• create_clone program

–Copy via SSH and rsync–LVM snapshot–Fix my.cnf (server id!) automatically

Wednesday, April 11, 12

Page 76: Lightning talks percona live mysql_2012

Booking.com, part of priceline.com (Nasdaq: PCLN), headquartered in Amsterdam, 50+ offices worldwide. www.booking.com/offices

Things we learned

• Waiting for actions to complete takes a lot of person time – automate batches of work as much as possible

• You really need a Server Database, and drive everything from it

• Most hardware can’t support being a clone source and in service, you need spares

• Online snapshots break in subtle ways; best stop the database.

Wednesday, April 11, 12

Page 77: Lightning talks percona live mysql_2012

Booking.com, part of priceline.com (Nasdaq: PCLN), headquartered in Amsterdam, 50+ offices worldwide. www.booking.com/offices

Things we learned

DBAs are toolsmiths, not database installers

Wednesday, April 11, 12

Page 78: Lightning talks percona live mysql_2012

Booking.com, part of priceline.com (Nasdaq: PCLN), headquartered in Amsterdam, 50+ offices worldwide. www.booking.com/offices

Thank you

• … if you like the way we work, we are hiring• http://www.booking.com/jobs

Wednesday, April 11, 12

Page 79: Lightning talks percona live mysql_2012

SchemadocBill Karwin

Wednesday, April 11, 12

Page 80: Lightning talks percona live mysql_2012

SchemadocBill Karwin, Percona Inc.

Wednesday, April 11, 12

Page 81: Lightning talks percona live mysql_2012

www.percona.com

Schema Can Be Unclear

CREATE TABLE AccountActivity ( Id INT PRIMARY KEY, Name VARCHAR(100), Status VARCHAR(20), EntityNum INT, Order INT);

Wednesday, April 11, 12

Page 82: Lightning talks percona live mysql_2012

www.percona.com

Schema Can Be Unclear

CREATE TABLE AccountActivity ( Id INT PRIMARY KEY, Name VARCHAR(100), Status VARCHAR(20), EntityNum INT, Order INT);

whose name?

Wednesday, April 11, 12

Page 83: Lightning talks percona live mysql_2012

www.percona.com

Schema Can Be Unclear

CREATE TABLE AccountActivity ( Id INT PRIMARY KEY, Name VARCHAR(100), Status VARCHAR(20), EntityNum INT, Order INT);

whose name?

what are the values?

Wednesday, April 11, 12

Page 84: Lightning talks percona live mysql_2012

www.percona.com

Schema Can Be Unclear

CREATE TABLE AccountActivity ( Id INT PRIMARY KEY, Name VARCHAR(100), Status VARCHAR(20), EntityNum INT, Order INT);

whose name?

what are the values?

what’s an entity?what’s a number?

Wednesday, April 11, 12

Page 85: Lightning talks percona live mysql_2012

www.percona.com

Schema Can Be Unclear

CREATE TABLE AccountActivity ( Id INT PRIMARY KEY, Name VARCHAR(100), Status VARCHAR(20), EntityNum INT, Order INT);

whose name?

what are the values?

what’s an entity?what’s a number?

commerce, or ordinal?

Wednesday, April 11, 12

Page 86: Lightning talks percona live mysql_2012

www.percona.com

Comments!

CREATE TABLE AccountActivity ( Id INT PRIMARY KEY, Name VARCHAR(100) COMMENT ‘person who placed the order’, Status VARCHAR(20) COMMENT ‘new, open, or closed’, EntityNum INT COMMENT ‘how many items in the order’, Order INT COMMENT ‘reference to the Orders table’) COMMENT ‘any change to e-commerce orders’;

Wednesday, April 11, 12

Page 87: Lightning talks percona live mysql_2012

www.percona.com

Length

• Limits increased in MySQL 5.5.3:• Per column: 1024 characters• Per index: 1024 characters• Per table: 2048 characters• Per partition: 80 characters

(MySQL 5.6 increases this to 1024)

Wednesday, April 11, 12

Page 88: Lightning talks percona live mysql_2012

www.percona.com

“Is there a tool for MySQL like javadoc for Java code?”

Wednesday, April 11, 12

Page 89: Lightning talks percona live mysql_2012

www.percona.com

developmentdba

documentation

Wednesday, April 11, 12

Page 90: Lightning talks percona live mysql_2012

www.percona.com

schemadoc

Wednesday, April 11, 12

Page 91: Lightning talks percona live mysql_2012

www.percona.com

Usage

$ schemadoc -v h=dbserver,D=EcommerceDB,u=root,p=xxxxLoading metadata...Running online analysis...done.Outputting to html.Rendering pages for tables. done.Rendering pages for views done.Rendering pages for procedures done.Rendering pages for triggers done.Rendering page for schema summary... done.Rendering page for schema link... done.Rendering page for deprecated-list... done.Rendering page for all-index... done.Rendering page for help-doc... done.Rendering page for allschema-frame... done.Rendering page for index... done.

Wednesday, April 11, 12

Page 92: Lightning talks percona live mysql_2012

Wednesday, April 11, 12

Page 93: Lightning talks percona live mysql_2012

www.percona.com

hooray.

Wednesday, April 11, 12

Page 94: Lightning talks percona live mysql_2012

www.percona.com

But Wait, There’s More

•Parses SQL dump file•Reads from a live MySQL instance•Document many schemas•Update one schema at a time

Wednesday, April 11, 12

Page 95: Lightning talks percona live mysql_2012

www.percona.com

Schema Analysis

•Number of indexes and columns per data type•Columns with same name but different type•ENUM columns that aren’t NOT NULL•Use of FLOAT or DOUBLE• Tables with one index per column• Tables with one index over all columns• Tables with no indexes• INT(N) other than default N• Lack of INT UNSIGNED columns

Wednesday, April 11, 12

Page 96: Lightning talks percona live mysql_2012

www.percona.com

Schema Analysis

• Tables that look like Entity-Attribute-Value• Tables that look like Polymorphic Associations•Superfluous primary key•Report table with least / most indexes• IP addresses stored in VARCHAR•Excessive use of VARCHAR(255),

report actual max string length• ...And supports plugins for other checks!

Wednesday, April 11, 12

Page 97: Lightning talks percona live mysql_2012

www.percona.com

yes, we get it.

Wednesday, April 11, 12

Page 98: Lightning talks percona live mysql_2012

www.percona.com

Future of Schemadoc

• Integrate with Percona Toolkit library•Read extra metadata (foreign keys)•Show table sizes and growth rates•Show SQL privileges (who has access?)•CLI for adding / updating comments•Batch-mode output•Redesign HTML output with modern look & feel

Wednesday, April 11, 12

Page 99: Lightning talks percona live mysql_2012

Wednesday, April 11, 12

Page 100: Lightning talks percona live mysql_2012

www.percona.com

Future of Schemadoc

Wednesday, April 11, 12

Page 101: Lightning talks percona live mysql_2012

www.percona.com

launchpad.net/schemadoc

Wednesday, April 11, 12

Page 102: Lightning talks percona live mysql_2012

It's the application, stupid!Robert Hodges

Wednesday, April 11, 12

Page 103: Lightning talks percona live mysql_2012

©Continuent 2012.

It’s the Application, Stupid!

(Or: Multi-Master Enlightenment in 5 Minutes or Less)

Robert Hodges, Continuent CEO

Wednesday, April 11, 12

Page 104: Lightning talks percona live mysql_2012

©Continuent 2012 99

Multi-Master Replication Is This Easy

tungsten-sandbox-2.0.4 -m 5.1.54 \ -i $RELDIR/tungsten-replicator-2.0.5 \ -n 3 --topology=star --hub=2

HubSpoke Spoke

Wednesday, April 11, 12

Page 105: Lightning talks percona live mysql_2012

©Continuent 2012 100

Multi-Master Apps Not So Much

Airline Reservations

Airline Reservations

Airline Reservations

HubSpoke Spoke

Wednesday, April 11, 12

Page 106: Lightning talks percona live mysql_2012

©Continuent 2012 101

Who Is in Which Seat on Flight 3523?

Book Bobin Seat 11E

Airline Reservations

Airline Reservations

Airline Reservations

HubSpoke Spoke

Book Suein Seat 11E

Bump Bob from Flight 3523

Wednesday, April 11, 12

Page 107: Lightning talks percona live mysql_2012

©Continuent 2012 102

Rules for Multi-Master Apps

1. Isolate destructive changes to a single master to avoid harmful con!icts

➡ “Change gate for !ight 3523 to C28”

2. Use non-destructive INSERTs for everything else

➡ “Please assign Sue to seat 11A”

Wednesday, April 11, 12

Page 108: Lightning talks percona live mysql_2012

©Continuent 2012 103

Rules for Multi-Master Apps

3. Coordinate across masters to aggregate results

➡ “Generate "nal passenger manifest for !ight 3523”

4. Be prepared to apologize

➡ “Add 5000 frequent !yer miles to Bob’s account”

Wednesday, April 11, 12

Page 109: Lightning talks percona live mysql_2012

©Continuent 2012 104

Multi-Master Enlightenment

Scalable multi-master applications are eventually consistent

1. Think through the whole problem: Business processes are often eventually consistent already

2. Follow design rules for eventually consistent applications

3. Use appropriate replication technology for MySQL*

* As in Tungsten :)

Wednesday, April 11, 12

Page 110: Lightning talks percona live mysql_2012

NuoDB overviewRobert Buck

Wednesday, April 11, 12

Page 111: Lightning talks percona live mysql_2012

Copyright © 2012 NuoDB

The Elastically Scalable Database™

Wednesday, April 11, 12

Page 112: Lightning talks percona live mysql_2012

Copyright © 2012 NuoDB 107

‣ SQL/ACID: Emergent Architecture

‣ Elastically Scale: Demand-driven, auto-balancing

‣ Single Logical Database: No sharding, no partitioning

‣ Run Anywhere: On-Premises / Private, Public, or Hybrid Cloud

‣ Store Anywhere: KV-Store backend (flexible, e.g. Files, S3, HDFS)

‣ Multi-Tenant: DBs share machines dynamically

‣ Geo-Distributed: Active/active across several data centers

‣ Extreme Availability: Massively redundant, permitting live upgrade

‣ Minimal Admin: No knobs, auto everything

NuoDB Summary

Wednesday, April 11, 12

Page 113: Lightning talks percona live mysql_2012

Copyright © 2012 NuoDB

Emergent Database Architecture

“An emergent behavior can

appear when a number of simple agents operate in an environment,

forming more complex behaviors

as a collective.”

- Wikipedia

108

Wednesday, April 11, 12

Page 114: Lightning talks percona live mysql_2012

Copyright © 2012 NuoDB

Instantly Elastic

Second Machine Instant Performance Increase

‣ Second machine more than doubles TPS due to caching effects

‣ Second machine is added to live database while it is running at 1,000’s of TPS

‣ Performance increase is immediate

‣ BTW - you can take either machine away and the database keeps running without data loss

109

Wednesday, April 11, 12

Page 115: Lightning talks percona live mysql_2012

Copyright © 2012 NuoDB

Number of Nodes

TPS

Linearly Scalable

110

Technical Details:‣ 2-9 Tx engines‣ 1 storage manager‣ Best sustained TPS and #

clients combination‣ 50% updates

Nodes TPS

MySQL 1 3,000

NuoDB 1 4,500

NuoDB 9 27,000

NuoDB running on 9 nodes was approx. 9x faster than MySQL running on 1 node.

0"

5000"

10000"

15000"

20000"

25000"

30000"

1" 2" 3" 4" 5" 6" 7" 8" 9"

Wednesday, April 11, 12

Page 116: Lightning talks percona live mysql_2012

Copyright © 2012 NuoDB

... even on Amazon EC2

111

0"

2000"

4000"

6000"

8000"

10000"

12000"

1" 2" 3" 4" 5" 6" 7" 8" 9"

Number of EC2 Nodes

TPS

‣ NuoDB scales linearly on EC2

‣ EC2 performance bound by AMZ TCP/IP traffic shaping

‣ Linearly scales at 50% of rate for physical commodity hardware

‣ Whereas, Amazon RDS runs on 1 node, and gets overloaded at 10+ connections

Wednesday, April 11, 12

Page 117: Lightning talks percona live mysql_2012

Copyright © 2012 NuoDB

We Work with Your SQL Tools

SQuirreLSQL

MS Excel (and other MS tools)

DbVisualizer

112

Wednesday, April 11, 12

Page 118: Lightning talks percona live mysql_2012

Copyright © 2012 NuoDB

NuoDB System Architecture

TM1

Application(JDBC, ODBC, SQL) NuoDB Storage

ManagerNuoDB Transaction

Engines

NuoDB Brokers

Tx Scalability Add as many of B, TE, or SM as you like

I/O Scalability Distributed IO, e.g. Hadoop HDFS

100% Uptime No single point of failure, geo-distributed

Optimal Utilization Multiple Databases on finite resources

Low People Costs Single Console Management

B1

TM1TM1TM1TM1TM1TM1TM1TM1TM1TM1TM1TM1TM1TM1TE

B1B1B

SM

SM

SM

113

Wednesday, April 11, 12

Page 119: Lightning talks percona live mysql_2012

Copyright © 2012 NuoDB 114

‣ 100% SQL

‣ 100% ACID

‣ 100% Elastic Scaling

‣ If you have more questions...

‣ Prove it to yourself. Try it out!

‣ Download it at: www.nuodb.com

‣ Chat with us afterward

NuoDB Summary

Wednesday, April 11, 12

Page 120: Lightning talks percona live mysql_2012

Copyright © 2012 NuoDB

NuoDBThe Elastically Scalable Database™

Wednesday, April 11, 12

Page 121: Lightning talks percona live mysql_2012

Diagnosis and possible fixes

David Holoboff

Wednesday, April 11, 12

Page 122: Lightning talks percona live mysql_2012

DIAGNOSIS ANDPOSSIBLE FIXES:

A MULTIPLE CHOICE PRIMERFOR BEGINNING DBAS

Wednesday, April 11, 12

Page 123: Lightning talks percona live mysql_2012

This talk is for entertainment value only. Any perceived similarity between what you will hear in the next five minutes and true life scenarios are merely coincidental, with

no intent of harm or liability.

Wednesday, April 11, 12

Page 124: Lightning talks percona live mysql_2012

Wednesday, April 11, 12

Page 125: Lightning talks percona live mysql_2012

Wednesday, April 11, 12

Page 126: Lightning talks percona live mysql_2012

Wednesday, April 11, 12

Page 127: Lightning talks percona live mysql_2012

Wednesday, April 11, 12

Page 128: Lightning talks percona live mysql_2012

Are you being asked the right question?

Wednesday, April 11, 12

Page 129: Lightning talks percona live mysql_2012

Wednesday, April 11, 12

Page 130: Lightning talks percona live mysql_2012

Wednesday, April 11, 12

Page 131: Lightning talks percona live mysql_2012

Wednesday, April 11, 12

Page 132: Lightning talks percona live mysql_2012

Wednesday, April 11, 12

Page 133: Lightning talks percona live mysql_2012

Wednesday, April 11, 12

Page 134: Lightning talks percona live mysql_2012

What do you do with a slow database server?

Wednesday, April 11, 12

Page 135: Lightning talks percona live mysql_2012

Wednesday, April 11, 12

Page 136: Lightning talks percona live mysql_2012

What do you do if swap memory is always being used up?

Wednesday, April 11, 12

Page 137: Lightning talks percona live mysql_2012

Wednesday, April 11, 12

Page 138: Lightning talks percona live mysql_2012

Wednesday, April 11, 12

Page 139: Lightning talks percona live mysql_2012

Wednesday, April 11, 12

Page 140: Lightning talks percona live mysql_2012

Wednesday, April 11, 12

Page 141: Lightning talks percona live mysql_2012

Wednesday, April 11, 12

Page 142: Lightning talks percona live mysql_2012

Wednesday, April 11, 12

Page 143: Lightning talks percona live mysql_2012

Wednesday, April 11, 12

Page 144: Lightning talks percona live mysql_2012

Wednesday, April 11, 12

Page 145: Lightning talks percona live mysql_2012

Wednesday, April 11, 12

Page 146: Lightning talks percona live mysql_2012

Wednesday, April 11, 12

Page 147: Lightning talks percona live mysql_2012

Wednesday, April 11, 12

Page 148: Lightning talks percona live mysql_2012

Wednesday, April 11, 12

Page 149: Lightning talks percona live mysql_2012

Wednesday, April 11, 12

Page 150: Lightning talks percona live mysql_2012

Wednesday, April 11, 12

Page 151: Lightning talks percona live mysql_2012

Wednesday, April 11, 12

Page 152: Lightning talks percona live mysql_2012

Wednesday, April 11, 12

Page 153: Lightning talks percona live mysql_2012

Wednesday, April 11, 12

Page 154: Lightning talks percona live mysql_2012

OLTP and OLAPLawrence Schwartz

Wednesday, April 11, 12

Page 155: Lightning talks percona live mysql_2012

OLTP and OLAPHave Your Cake and Eat it Too!

Lawrence Schwartz

Wednesday, April 11, 12

Page 156: Lightning talks percona live mysql_2012

Avoiding the B-tree Valley of Death

Read-intensive Write-intensive

Usa

ge

OLAP OLTP

B-treeValley of

Death

Columnar DBs HadoopMongoDB

However, Today’s database categories - OLAP, OLTP are compromises to get around dated, rigid indexing technology

“The real end-game for Big Data is to have transactional and analytic data on the same database.”

Wednesday, April 11, 12

Page 157: Lightning talks percona live mysql_2012

B-trees Perform Poorly on Disk

• Random Workloads Lead To Frequent Drive Head Movement

• MySQL Can’t Take Advantage of Full Drive I/O Potential

MySQL + InnoDB

• Continuous Rebalancing and Aggregation at Nodes

• Eliminates Fragmentation, Maximizes Disk I/O

MySQL + TokuDBBased on B-Tree Indexes Based on Fractal Tree Indexes

Wednesday, April 11, 12

Page 158: Lightning talks percona live mysql_2012

B-trees Can’t Handle Big Data

• Performance Drops to a Trickle above 50-100M Rows

• Delayed Checkpoints Diminish Performance

• 20x Insertion Rates at One Billion Rows

• Stand Up More Indexes for Better Query Performance

MySQL + TokuDBMySQL + InnoDB

Wednesday, April 11, 12

Page 159: Lightning talks percona live mysql_2012

B-trees Aren’t Agile

• Big Database Schema Changes Take Hours To Complete

• Changes Have to Wait for Scheduled Downtime

• Changes Complete in Seconds

• Allows Business' Data Models to Immediately Adapt

MySQL + TokuDBMySQL + InnoDB

Wednesday, April 11, 12

Page 160: Lightning talks percona live mysql_2012

B-trees Don’t Compress Well

• Compression ~2x to ~2.5x Typical

• Compression Impacts Performance

• High Compression

• No Impact to Performance

MySQL + TokuDBMySQL + InnoDB

Wednesday, April 11, 12

Page 161: Lightning talks percona live mysql_2012

TokuDB Eliminates Death Valley

Read-intensive Write-intensive

Usa

ge“While TokuDB® is effectively an operational database technology, it does blur the lines between operations and analytics”

OLAP OLTP

Fractal Tree® Indexesare the Solution

eCommercePersonalization

Cloud Assets

Logfile analysis

SocialNetworks

Real Time OLAP

Analytic OLTP

Wednesday, April 11, 12

Page 162: Lightning talks percona live mysql_2012

Wednesday, April 11, 12

Page 163: Lightning talks percona live mysql_2012

Building a scalable systemBaron Schwartz

Wednesday, April 11, 12

Page 164: Lightning talks percona live mysql_2012

Wednesday, April 11, 12

Page 165: Lightning talks percona live mysql_2012

Wednesday, April 11, 12

Page 166: Lightning talks percona live mysql_2012

Wednesday, April 11, 12

Page 167: Lightning talks percona live mysql_2012

How to become a rock star DBA

Sheeri Cabral

Wednesday, April 11, 12

Page 168: Lightning talks percona live mysql_2012

How to Become a Rock Star DBA

Sheeri Cabral, MozillaOracle ACE Director

MySQL Community Award Winner^2

Wednesday, April 11, 12

Page 169: Lightning talks percona live mysql_2012

Do what you love....

Wednesday, April 11, 12

Page 170: Lightning talks percona live mysql_2012

What you really love

Wednesday, April 11, 12

Page 171: Lightning talks percona live mysql_2012

Have a Twin Brother

Wednesday, April 11, 12

Page 172: Lightning talks percona live mysql_2012

Code

Wednesday, April 11, 12

Page 173: Lightning talks percona live mysql_2012

Write

forums.mysql.com

Tutorials / HOW-TOs

MariaDB/Percona Documentation

#irc

Wednesday, April 11, 12

Page 174: Lightning talks percona live mysql_2012

Make MisteaksMistakes

Wednesday, April 11, 12

Page 175: Lightning talks percona live mysql_2012

Teach others

Wednesday, April 11, 12

Page 176: Lightning talks percona live mysql_2012

Teach others

You know more than you think you do!

Wednesday, April 11, 12

Page 177: Lightning talks percona live mysql_2012

Keep Learning

Wednesday, April 11, 12

Page 178: Lightning talks percona live mysql_2012

Share

Wednesday, April 11, 12

Page 179: Lightning talks percona live mysql_2012

Organize

User Group

UnconferenceIgnite Event

Magazine

Wednesday, April 11, 12

Page 180: Lightning talks percona live mysql_2012

Connect People

Wednesday, April 11, 12

Page 181: Lightning talks percona live mysql_2012

Avoid burnout

Wednesday, April 11, 12

Page 182: Lightning talks percona live mysql_2012

Have a hobby

Wednesday, April 11, 12

Page 183: Lightning talks percona live mysql_2012

Have Support

Wednesday, April 11, 12

Page 184: Lightning talks percona live mysql_2012

Be tall...or not

Wednesday, April 11, 12

Page 185: Lightning talks percona live mysql_2012

Find Ways Others Can Help You

Wednesday, April 11, 12

Page 186: Lightning talks percona live mysql_2012

Some Help You Can Get

MySQL Community TeamVolunteers – UG video: Richard Laskey“What can I help you do?”Technocation for grants - meetup.com fees - Open SQL/DB Camp - Postgres Open - Open Source Bridge - Drizzle Day

(donate to www.technocation.org!)

Wednesday, April 11, 12

Page 187: Lightning talks percona live mysql_2012

It Takes a Community

Permission to use pictures granted by:

Ronald BradfordFrancesca Simon-Carboni PhotographyColin CharlesJeremy ColeJames Duncan DavidsonKeith LarsonGerry Narvaja

Wednesday, April 11, 12

Page 188: Lightning talks percona live mysql_2012

Cruelty on database clustersGiuseppe Maxia

Wednesday, April 11, 12

Page 189: Lightning talks percona live mysql_2012

©Continuent 2012.

Cruel things that you can inflict on your replicated

cluster ... and get away with it!Giuseppe MaxiaContinuent, Inc

Wednesday, April 11, 12

Page 190: Lightning talks percona live mysql_2012

©Continuent 2012

I must confess

185

Wednesday, April 11, 12

Page 191: Lightning talks percona live mysql_2012

©Continuent 2012

I must confess

185

I am a serial killer

Wednesday, April 11, 12

Page 192: Lightning talks percona live mysql_2012

©Continuent 2012

I kill

186

Wednesday, April 11, 12

Page 193: Lightning talks percona live mysql_2012

©Continuent 2012

I kill

•database servers

186

Wednesday, April 11, 12

Page 194: Lightning talks percona live mysql_2012

©Continuent 2012

I kill

•database servers

•client connections

186

Wednesday, April 11, 12

Page 195: Lightning talks percona live mysql_2012

©Continuent 2012

I kill

•database servers

•client connections

•transactions

186

Wednesday, April 11, 12

Page 196: Lightning talks percona live mysql_2012

©Continuent 2012

I kill

•database servers

•client connections

•transactions

•"lesystems

186

Wednesday, April 11, 12

Page 197: Lightning talks percona live mysql_2012

©Continuent 2012

I am armed and dangerous

187

+

= "class 2" weapon

Wednesday, April 11, 12

Page 198: Lightning talks percona live mysql_2012

©Continuent 2012

And of course I carry ...

188

(GASP) Perl!

Wednesday, April 11, 12

Page 199: Lightning talks percona live mysql_2012

©Continuent 2012

I have a criminal mindset

• Like a bank robber

• or an airplane hijacker

• I look around, and watch for weak spots to exploit

189

Wednesday, April 11, 12

Page 200: Lightning talks percona live mysql_2012

©Continuent 2012

Whenever I get a new database cluster

• I open "re

190

$_

@ @

#!

:-)

#!#!#!#!#!

Wednesday, April 11, 12

Page 201: Lightning talks percona live mysql_2012

©Continuent 2012

when a cluster is working just "ne ...

191

Wednesday, April 11, 12

Page 202: Lightning talks percona live mysql_2012

©Continuent 2012

when a cluster is working just "ne ...

• I pull the rug from under its feet

191

Wednesday, April 11, 12

Page 203: Lightning talks percona live mysql_2012

©Continuent 2012

when a cluster is working just "ne ...

• I pull the rug from under its feet

• I switch o# a master's database server

191

Wednesday, April 11, 12

Page 204: Lightning talks percona live mysql_2012

©Continuent 2012

when a cluster is working just "ne ...

• I pull the rug from under its feet

• I switch o# a master's database server

•or I delete its "les191

Wednesday, April 11, 12

Page 205: Lightning talks percona live mysql_2012

©Continuent 2012

I am a Harry Potter fan

192

Wednesday, April 11, 12

Page 206: Lightning talks percona live mysql_2012

©Continuent 2012

So I get carried away, and I use the unforgivable curses

193

$ kill -9

Wednesday, April 11, 12

Page 207: Lightning talks percona live mysql_2012

©Continuent 2012

We have di#erent standpoints

194

Wednesday, April 11, 12

Page 208: Lightning talks percona live mysql_2012

©Continuent 2012

We have di#erent standpoints

•My colleagues say that I am cruel

194

Wednesday, April 11, 12

Page 209: Lightning talks percona live mysql_2012

©Continuent 2012

We have di#erent standpoints

•My colleagues say that I am cruel

• I call it QA

194

Wednesday, April 11, 12

Page 210: Lightning talks percona live mysql_2012

©Continuent 2012

Have you ever reported a bug ...

• about a failure that happens after 9000 switches?

• Or a master that slows down when handling 512 slaves?

195

Wednesday, April 11, 12

Page 211: Lightning talks percona live mysql_2012

©Continuent 2012

Have you ever reported a bug ...

• about a failure that happens after 9000 switches?

• Or a master that slows down when handling 512 slaves?

195

I DIDWednesday, April 11, 12

Page 212: Lightning talks percona live mysql_2012

©Continuent 2012

Things I do that make developers say "it is not fair"

196

Wednesday, April 11, 12

Page 213: Lightning talks percona live mysql_2012

©Continuent 2012

Things I do that make developers say "it is not fair"

• using the installer with wrong options

196

Wednesday, April 11, 12

Page 214: Lightning talks percona live mysql_2012

©Continuent 2012

Things I do that make developers say "it is not fair"

• using the installer with wrong options

• running the installer without a mandatory option

196

Wednesday, April 11, 12

Page 215: Lightning talks percona live mysql_2012

©Continuent 2012

Things I do that make developers say "it is not fair"

• using the installer with wrong options

• running the installer without a mandatory option

• Using the wrong version of Java, or Ruby, or MySQL

196

Wednesday, April 11, 12

Page 216: Lightning talks percona live mysql_2012

©Continuent 2012

Things I do that make developers say "it is not fair"

• using the installer with wrong options

• running the installer without a mandatory option

• Using the wrong version of Java, or Ruby, or MySQL

• running the installer in a system with only 200 MB of free storage

196

Wednesday, April 11, 12

Page 217: Lightning talks percona live mysql_2012

©Continuent 2012

Things I do that make developers say "it is not fair"

• using the installer with wrong options

• running the installer without a mandatory option

• Using the wrong version of Java, or Ruby, or MySQL

• running the installer in a system with only 200 MB of free storage

• Counting the records after a performance test (and "nding that some are missing)

196

Wednesday, April 11, 12

Page 218: Lightning talks percona live mysql_2012

©Continuent 2012

Why do I do cruel things to replication clusters?

197

Wednesday, April 11, 12

Page 219: Lightning talks percona live mysql_2012

©Continuent 2012

Why do I do cruel things to replication clusters?

• Because, most of the time:

• Developers are not users

• Users do what developers can't imagine

197

Wednesday, April 11, 12

Page 220: Lightning talks percona live mysql_2012

©Continuent 2012

Why do I do cruel things to replication clusters?

• Because, most of the time:

• Developers are not users

• Users do what developers can't imagine

•To make a fool-proof system you need to act like a fool

197

Wednesday, April 11, 12

Page 221: Lightning talks percona live mysql_2012

©Continuent 2012

in the end, I get away with cruelty

I am not bad. I am just drawn that way

(Jessica Rabbit)

198

Wednesday, April 11, 12