using mysql enterprise monitor for continuous performance improvement

39
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Using MEM for Continuous Performance Improvement Copyright © 2014, Oracle and/or its affiliates. All rights reserved. Mark Matthews, Consulting Member Technical Staff

Upload: mark-matthews

Post on 28-Nov-2014

159 views

Category:

Software


0 download

DESCRIPTION

MySQL Enterprise Monitor is built from the ground up to support DevOps DBAs and developers. From five scenarios based on real-world issues encountered by customers, learn how you can use the power features of query analysis and statistical visualization in MySQL Enterprise Monitor to diagnose and fix MySQL performance problems. Then learn how to apply these features in a continuous fashion as a valuable addition to your DevOps toolbox.

TRANSCRIPT

Page 1: Using MySQL Enterprise Monitor for Continuous Performance Improvement

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

Using MEM for Continuous Performance Improvement

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

Mark Matthews, Consulting Member Technical Staff

Page 2: Using MySQL Enterprise Monitor for Continuous Performance Improvement

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

Safe Harbor Statement

The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle.

2

Page 3: Using MySQL Enterprise Monitor for Continuous Performance Improvement

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Agenda

• Getting to Know You • Getting to Know MySQL Enterprise Monitor • The Create, Test, Deploy, Tune Feedback Loop • Key Performance Issues Exposed Via Monitoring • Integrating MySQL Enterprise Monitor Into the Loop • Q & A

Page 4: Using MySQL Enterprise Monitor for Continuous Performance Improvement

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Getting to Know You

• DBAs in the room • Developers in the room • Continuous delivery in use • Monitoring, what, who uses

Page 5: Using MySQL Enterprise Monitor for Continuous Performance Improvement

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Getting to Know MySQL Enterprise Monitor

• Why did we build it? • What is it? • How do I get it?

Page 6: Using MySQL Enterprise Monitor for Continuous Performance Improvement

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

We Built it to Facilitate Blame Between DBAs and Developers

Page 7: Using MySQL Enterprise Monitor for Continuous Performance Improvement

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

We Built it to Facilitate Blame Between DBAs and Developers

Page 8: Using MySQL Enterprise Monitor for Continuous Performance Improvement

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

We Built it to Facilitate Conversations Between DBAs and Developers

Page 9: Using MySQL Enterprise Monitor for Continuous Performance Improvement

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

MySQL Enterprise Monitor

• Start monitoring MySQL in 10 minutes

• Real-time MySQL monitoring • Performance & Availability

• Dynamically adjusts to changes in your environment

• Aware of relationships between metrics and assets

9

Page 10: Using MySQL Enterprise Monitor for Continuous Performance Improvement

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

MySQL Enterprise Monitor Architecture

Host/Container

Agent

MySQL

Agent

Service Manager

MySQL

Host/Container

Host/Container

MySQL

Host/Container

Agent

Host/Container

MySQL

Page 11: Using MySQL Enterprise Monitor for Continuous Performance Improvement

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

“Standard” Deployment

Host/Container

Agent

MySQL

Agent

Service Manager

MySQL

Host/Container

• Broadest Performance Data (CPU, Memory, I/O) • Host Availability Information • Slightly More Complex • Doesn’t Work for DBAAS

Page 12: Using MySQL Enterprise Monitor for Continuous Performance Improvement

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Containerized Development Stack

Agent

Service Manager

MySQL

Host/Container

Host/Container

MySQL

Host/Container

Agent

• Only MySQL Performance Data • Flexible Setup/Tear Down • Small, Isolated Workloads

Page 13: Using MySQL Enterprise Monitor for Continuous Performance Improvement

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

“Agent-less” - DBAAS/Cloud

Agent

Service Manager

MySQL

Host/Container

Host/Container

MySQL

• Only MySQL Performance Data • Fewest Moving Pieces • Simplest Configuration

Page 14: Using MySQL Enterprise Monitor for Continuous Performance Improvement

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

How Do I Get it?

• Part of the MySQL Enterprise Subscription • Trial Licenses • Oracle Software Delivery Cloud

• https://edelivery.oracle.com/ • “MySQL Database Product Pack”

Page 15: Using MySQL Enterprise Monitor for Continuous Performance Improvement

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

The Create, (Test, Deploy), Tune Feedback Loop

Page 16: Using MySQL Enterprise Monitor for Continuous Performance Improvement

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Do you know your application’s performance profile?

• Historically? • What to expect with code changes?

Page 17: Using MySQL Enterprise Monitor for Continuous Performance Improvement

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Throughput

Page 18: Using MySQL Enterprise Monitor for Continuous Performance Improvement

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Concurrency

Page 19: Using MySQL Enterprise Monitor for Continuous Performance Improvement

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Workload Specifics

Page 20: Using MySQL Enterprise Monitor for Continuous Performance Improvement

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

The Experimental Method

• Historical performance data is the control • Developers should have predictions about effects of change • Verify the hypothesis with metrics • If the results don’t match the hypothesis, figure out why

Page 21: Using MySQL Enterprise Monitor for Continuous Performance Improvement

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Key Storage Tier Performance Issues Exposed Via Monitoring

• Unplanned configuration values • Going to disk too often (wasted IOPs) • Inefficient query plans • Statements issued too often

Page 22: Using MySQL Enterprise Monitor for Continuous Performance Improvement

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Wrong/Poor Configuration

• MySQL version in use • InnoDB buffer pool size • InnoDB transaction log

and log buffer sizes • Thread cache

Page 23: Using MySQL Enterprise Monitor for Continuous Performance Improvement

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Query AnalyzerProxy Connector Plugin 5.6 Performance

Schema

Supported Server Versions

Any Any > 5.6.14

Supported Clients Any JDBC, PHP, ADO.Net Any

Complexity High Medium Low

Value/Richness of Data

Low Medium High

Page 24: Using MySQL Enterprise Monitor for Continuous Performance Improvement

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Why Aren’t You Using MySQL 5.6 Yet?

Page 25: Using MySQL Enterprise Monitor for Continuous Performance Improvement

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Missing Indexes

Page 26: Using MySQL Enterprise Monitor for Continuous Performance Improvement

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

On-Disk Temporary Tables

Page 27: Using MySQL Enterprise Monitor for Continuous Performance Improvement

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

New, Un-optimized Statements

Page 28: Using MySQL Enterprise Monitor for Continuous Performance Improvement

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

High Rate of Low Latency Statements

Page 29: Using MySQL Enterprise Monitor for Continuous Performance Improvement

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Make Changes, Re-deploy, Re-measure

• Realtime feedback on performance impact of changes • Frictionless with MySQL-5.6 and MySQL Enterprise Monitor-3.0 • Straightforward options with earlier MySQL versions

Page 30: Using MySQL Enterprise Monitor for Continuous Performance Improvement

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Integrating MEM Into your Continuous I/D Environment

• MEM is a standard web application • Links for retrieving/exporting data work from wget/curl • MEM supports HTTP Basic Authentication over SSL

Page 31: Using MySQL Enterprise Monitor for Continuous Performance Improvement

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Command-line Retrieval of Metric Data

• curl --user user:pass --insecure https://etools-stable.no.oracle.com:30000/v2/rest/[asset-selection]?format=CSV -o throughput.csv

Page 32: Using MySQL Enterprise Monitor for Continuous Performance Improvement

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Command-Line Retrieval of Query Analyzer Data

• This one is a bit trickier (we’ll fix it) • curl --user user:pass --insecure https://etools-

stable.no.oracle.com:30000/BrowseQueriesCsv.action?assetSelection=gunk&graph=gunk&graphTime_interval=00%3A30&graphTime_type=INTERVAL&noDefaults=false&showAllAssets_control=True&time_interval=&exportType=allpages -o queries-by-exec-count.csv

Page 33: Using MySQL Enterprise Monitor for Continuous Performance Improvement

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Creating Events Representing Deployments

• Deploy a custom SQL collection at the agent !<class> <namespace>mysql</namespace> <classname>anonymous_user</classname> <query><![CDATA[SELECT COUNT(*) AS deploy_count FROM foo WHERE timestamp >= NOW() - INTERVAL 1 MINUTE]]></query> </class>

Page 34: Using MySQL Enterprise Monitor for Continuous Performance Improvement

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Creating Events Representing Deployments (cont)

• Reference in a custom rule • Schedule on appropriate groups/instances on the “Advisors” tab • When event is raised, find in “Events” tab, time scales are sticky

across the application !

• See • http://dev.mysql.com/doc/mysql-monitor/3.0/en/mem-

customdata-collection.html • http://dev.mysql.com/doc/mysql-monitor/3.0/en/mem-

creating-advisors-overview.html

Page 35: Using MySQL Enterprise Monitor for Continuous Performance Improvement

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Take Aways

• Monitor All MySQL Servers - Production, Stage, Dev • Predict Impact of Changes • Measure • Analyze • Fix What You Find • Rinse, Lather, Repeat (Automate If Possible) • Why Aren’t You Using MySQL-5.6 Yet?

Page 36: Using MySQL Enterprise Monitor for Continuous Performance Improvement

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Questions?

Page 37: Using MySQL Enterprise Monitor for Continuous Performance Improvement

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

MySQL Community Reception @ Oracle OpenWorld!Mingle with the MySQL community and the MySQL team from Oracle for a fun and informative evening! !• Time: September 30 (Tue) @ 7pm • Jillian’s at Metreon 175 Fourth Street, San Francisco, CA

At the corner of Howard and 4th st.; only 2-min walk from Moscone Center !

!!!

!

Page 38: Using MySQL Enterprise Monitor for Continuous Performance Improvement

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |

Oracle University MySQL Training ServicesPrepare Your Organization to Enable Reliable and High-Performance Web-Based Database Applications

“Training and team skill have the most significant impact on overall performance of technology and success of technology projects.” - IDC, 2013

Premier Support customers eligible to save 20% on learning credits.

Benefits

▪ Expert-led training to support your MySQL learning needs ▪ Flexibility to train in the classroom or online ▪ Hands-on experience to gain real world experience ▪ Key skills needed for database administrators and developers !!

• MySQL for Beginners ▪MySQL for Database Administrators ▪MySQL Performance Tuning ▪MySQL Cluster – NEW - Register Your Interest! ▪MySQL and PHP - Developing Dynamic Web Applications ▪MySQL for Developers ▪MySQL Developer Techniques !!▪MySQL 5.6 Database Administrator ▪MySQL 5.6 Developer !To find out more about available MySQL Training & Certification offerings, go to: education.oracle.com/mysql

Top Courses for Administrators and Developers

Top Certifications

RECENTLY RELEASED ALL NEW! MySQL Cluster Training To Register your interest to influence the

schedule on this newly released course – go to education.oracle.com/mysql and click on

the MySQL Cluster Course

Page 39: Using MySQL Enterprise Monitor for Continuous Performance Improvement

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

Thank You!

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