Datenbank Monitoring mit Oracle MySQL Tools (& kurzes Update von der OOW 2014) Carsten Thalheimer Sales Consultant LVM GBU (Carsten.Thalheimer@Oracle.com)
MySQL Enterprise Monitor: Agenda 1 2 3 4 5 Short update from Oracle Open World 2014 Why Monitoring? MySQL Workbench 6.2 MySQL Enterprise Monitor 3.0 Oracle Enterprise Manager Plugin 12c Plugin for MySQL 2
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. 3
5 Years of Oracle Stewardship More Investment, More Innovation 2x Engineering Staff 3x QA Staff 2x Support Staff Jan 2010 Sept 2014 4
5 Years of Oracle Stewardship More Investment, More Innovation InnoDB Default GIS Performance Schema Improved Throughput Online DDL Full Text Search NoSQL Access EXPLAIN M y S Q L U t i l i t i e s Security O p t i m i z e r : F a s t e r Q u e r y E x e c u t i o n a n d B e t t e r D i a g n o s t i c s Partitioning Replication Lossless Semi-Synchronous GTIDs Crash Safe Time Delayed Multi-threaded Multi-Source 5
Driving MySQL Innovation Year 2010 2013 (from MySQL Release 5.1 to MySQL Release 5.6) MySQL Enterprise Monitor 2.2 MySQL Cluster 7.1 MySQL Cluster Manager 1.0 MySQL Workbench 5.2 MySQL Database 5.5 MySQL Enterprise Backup 3.5 MySQL Enterprise Monitor 2.3 MySQL Cluster Manager 1.1 Oracle VM Template for MySQL Enterprise Edition MySQL Enterprise Oracle Certifications MySQL Windows Installer MySQL Enterprise Security MySQL Enterprise Scalability MySQL Enterprise Backup 3.7 MySQL Cluster 7.2 MySQL Cluster Manager 1.2 MySQL Utilities 1.0 MySQL Migration Wizard MySQL for Excel 1.0 / 1.1 MySQL Enterprise Backup 3.8 MySQL Database 5.6 MySQL Utilities 1.3 MySQL Cluster 7.3 MySQL Workbench 6.0 MySQL Enterprise Monitor 3.0 MySQL Enterprise Backup 3.9 MySQL Yum Linux repository MySQL Enterprise Audit MySQL Enterprise HA (DRBD) All GA! - 2010 All GA! - 2011 All GA! - 2012 All GA! - 2013 and Connector/ODBC, Connector/PHP, Connector/Net, Connector/J, Connector Python, Connector /C++, Connector/C, Ruby Driver
Reaching Out to the MySQL Community Sharing Information, Soliciting Feedback, Providing Help Sponsored 50+ events worldwide in the past year Delivered 60+ talks at conferences Dozens of Tech Tours, Developer Days, Workshops and User Groups Blogs & social media Proactive outreach to users Communication & collaboration with Linux distributions and popular open source projects MySQL Central @ OpenWorld 7
MySQL 8
What s New Some announcements from OOW 2014 MySQL Source Code Available on GitHub Lot s of new Labs Release (-> http://labs.mysql.com/) New MySQL 5.7.5 Development Milestone Release (-> http://dev.mysql.com/downloads/mysql) MySQL Fabric 1.5 GA (-> http://www.mysql.com/products/enterprise/fabric.html) MySQL Workbench 6.2 GA (-> http://www.mysql.com/products/workbench/) MySQL Cluster 7.4 DMR (-> http://www.mysql.com/products/cluster/) MySQL Enterprise Edition Update (-> http://www.mysql.com/products/enterprise/) MySQL Enterprise Encryption Oracle Enterprise Manager for MySQL 9
Driving MySQL Innovation ( News from OOW 2014) Year 2014 New Data Dictionary: Replacing FRMs Optimizer improvements, Cost model MySQL HTTP Plugin MySQL Multi-source Replication Intra-Schema Multi-Threaded Slave MySQL Group Replication MySQL JSON UDFs 0.3.2 MySQL Applier for Hadoop Proxy 0.8.3 (Alpha) Labs 2014 MySQL 5.7.5 - Throughput improvements - Replication improvements - more online DDL - temporary tables in InnoDB - Execution plan of running statements - InnoDB Compression - InnoDB Spatial Indexes MySQL Cluster 7.4.1 - Active-Active Geo-Replication - Based on MySQL 5.7 DMR* 2014 *Development Milestone Release MySQL Cluster Manager 1.3 MySQL Workbench 6.1 & 6.2 MySQL for Excel 1.2 & 1.3 MySQL Enterprise Backup 3.10 & 3.11 Oracle Clusterware XAG Agent for MySQL MySQL Utilities / Fabric 1.4 & 1.5 MySQL Enterprise Manager Plugins MYSQL Enterprise Backup 3.11 MySQL Enterprise Encryption And of course Connector/ODBC, Connector/PHP, Connector/Net, Connector/J, Connector Python, Connector /C++, Connector/C, Ruby Driver Latest: MySQL 5.5.40 / 5.6.21 MySQL Cluster 7.2.18 / 7.3.7 GA! 2014
MySQL Enterprise Monitor: Agenda 1 2 3 4 5 Short update from Oracle Open World 2014 Why Monitoring? MySQL Workbench 6.2 MySQL Enterprise Monitor 3.0 Oracle Enterprise Manager Plugin 12c Plugin for MySQL 11
Monitoring?
Braucht kein Mensch
oder doch?
Users/Dependence Custom Applications Mission Critical Over Time Example Sales dept can t get accurate reports from IT. Builds Data Mart to query Order System to serve Sales Management with sales data reports Works so well that access is extended to Executive Management and Accounting System added as second data source Inflection point when nice to have becomes missioncritical Mission-Critical Data Mart has entire Salesforce, Exec team, leaders of Finance, Marketing and Service departments as users (200+ people) and three back ends, Orders, Accounting & CRM nice to have Day 1 6 months 1 year
Legal Regulation Payment Card Industry ( PCI ) Compliance PCI Data Security Standard requirements protect credit card user data. To meet PCI Requirements, ecommerce websites must: Regularly Monitor and Test Networks Track and monitor all access to network resources and cardholder data Regularly test security systems and processes -- From
MySQL DBA Checklist 1. Ensure your production databases are available 2. Monitor MySQL performance throughout the day 3. Verify that MySQL replication is working properly 4. Confirm that backups have completed successfully 5. Monitor disk space to ensure MySQL won t run out of space 6. Regularly monitor and identify blocking issues 7. Verify there have been no changes to database schema 8. Check OS metrics for unusual events 9. Check for security vulnerabilities 10. Monitor and analyze memory usage
MySQL Enterprise Monitor: Agenda 1 2 3 4 5 Short update from Oracle Open World 2014 Why Monitoring? MySQL Workbench 6.2 MySQL Enterprise Monitor 3.0 Oracle Enterprise Manager Plugin 12c Plugin for MySQL 18
MySQL Workbench 6.2 Fabric Add fabric node, browse, view, connect Performance Dashboard View real-time server performance Performance Schema Reports & Graphs Visual Explain Drill down views for large plans GIS Viewer (5.7) Visualize query results as a map Migration New Microsoft Access Microsoft SQL Server, Sybase, PostgreSQL Metadata Locks View Shows Blocked and Waiting On Shared Snippets Centralized SQL template repo Native 64 bit Windows & Linux 19
Connect local DB click or Connect
Start by looking at Server Status Management Tab Server Status
Basic Health Graphs On the server CPU Load Linux Load Average Windows CPU usage % Mac Load Average Total Connections Network Traffic MySQL Only Byte Sent + Bytes Rcved Total QPS for entire server Total Ops Percentage of Pages Free/Total
Basics Directory Setup On best disks? Adequate space? Slow Query Log On? Enabled/Disabled Features
Open Settings Before Running Performance Reports
MySQL SYS Schema Helper objects for DBAs, Developers and Operations staff Helps simplify DBA / Ops tasks - Monitor server health, user and/or host statistics, and other key metrics - Spot, diagnose, and tune performance issues Provides easy to understand views with insights into - IO hot spots, Locking and Costly SQL statements - Schema, table and index statistics SYS is similar to - Oracle V$ catalog views - Microsoft SQL DMVs (Dynamic Mgmnt Views) 25
First Run Install SYS Schema
Performance Schema Reports Connect (DB Click or Open and Connect) Go to Management Tab If needed (Bottom Left) Go to Performance Reports New Performance Section
MySQL SYS Schema Simplified Views on Performance Schema & Information Schema Driven from positive feedback on ps_helper Over 80 views, server version aware Supporting MySQL 5.5, 5.6, and 5.7 SYS is similar to: Oracle V$ catalog views Microsoft SQL DMVs (Dynamic Mgmnt Views) IBM DB2 SYSIBM catalog 28
MySQL Enterprise Monitor: Agenda 1 2 3 4 5 Short update from Oracle Open World 2014 Why Monitoring? MySQL Workbench 6.2 MySQL Enterprise Monitor 3.0 Oracle Enterprise Manager Plugin 12c Plugin for MySQL 29
MySQL Enterprise Monitor Start monitoring MySQL in 10 minutes Real-time MySQL performance and availability monitoring Visually find & fix problem queries Disk monitoring for capacity planning Cloud friendly architecture No agents required Policy driven configuration Easy integration with DevOps tools 30
Private Cloud Public Cloud Data Center Cloud Friendly Architecture MySQL Performance Schema provides Query Analyzer data Provides all MySQL related metrics Service Manager Collects all MySQL related metrics Collects all OS/Host related metrics Repository Stores all historical data Agent (optional) Only required for OS/Host metrics MySQL Enterprise Dashboard Service Manager HTTPS Repository 31
Installation & Configuration Install the Service Manager shell>./mysqlmonitor-3.0.x.xxxx- -installer.bin Up and Running in 10 minutes Auto-discovery of MySQL servers Advisors are pre-configured Advisors are pre-scheduled Customization Centralized configuration dashboard Advisors Event handling 32
MySQL Enterprise Dashboard SLA monitoring Real-time performance monitoring Alerts & notifications MySQL best practice advisors "The MySQL Enterprise Monitor is an absolute must for any DBA who takes his work seriously. Adrian Baumann System Specialist Federal Office of Information Technology & Telecommunications 33
MySQL Enterprise Backup Monitoring Monitor backup results Monitor backup performance Ensure backups are up to date
Security Administration Account management Know when privileges change Get advice on best practices Monitor access problems
Replication Monitoring Auto-discovers replication topology Master/Slave performance monitoring Replication advisor Best practice replication advice
Performance Monitoring Monitor MySQL performance Monitor OS performance Monitor query performance Advice on index usage Alerts on performance problems 37
Solving Common Performance Issues Causes of Performance Issues Queries doing table scans MySQL Enterprise Monitor Helps See these queries immediately Excessive temporary tables on disk See the queries generating these CPU spikes Find out what caused it Disk I/O saturation Find out what caused it Internal locking Get alerts when locking issues occur Hardware problems Get alerts for disk and network problems Database and schema changes Get alerts when changes are made New queries introduced See what queries are added and when Poor MySQL configuration Get advice on configuration tuning 38
Memory Usage Monitoring Monitor OS memory usage Monitor MySQL memory usage Advice on configuration Alerts on memory usage
Best Practice Advisors Enforce MySQL best practices 14 Advisor categories 250+ Advisors Threshold-based alerts Exponential moving averages Rate change detection Expert problem resolution advice
MySQL Configuration Management Centralized management Organized by topic Options grouped by feature See host details See network details Advisors will provide configuration tuning advice! 41
Enterprise Query Analyzer Real-time query performance Visual correlation graphs Find & fix expensive queries Detailed query statistics Query Response Time index (QRTi) 42
Query Response Time Index (QRTi) Quality of Service (QoS) measurement for each query QoS measurement for a server, group, or every instance Single metric for query performance 43
InnoDB Monitoring Monitor key performance metrics Stay on top of locking issues Get configuration advice Examine buffer pool usage 44
MySQL Enterprise Monitor: Agenda 1 2 3 4 5 Short update from Oracle Open World 2014 Why Monitoring? MySQL Workbench 6.2 MySQL Enterprise Monitor 3.0 Oracle Enterprise Manager Plugin 12c Plugin for MySQL 45
Oracle Enterprise Manager for MySQL Single Dashboard to manage Oracle stack for Web & Cloud An estimated 70% of Oracle customers also use MySQL For Web, custom, departmental and embedded applications #1 Requested integration 46
Oracle Enterprise Manager for MySQL Availability monitoring Performance monitoring Configuration monitoring All available metrics collected Allowing for custom threshold based incident reports MySQL auto-detection Security Availability Performance 47
Oracle Enterprise Manager Plugin for MySQL vs. Oracle Enterprise Monitor 3.0 Customer using OEM (min. 12c update 4 required) - OEM 12c License is included (!) - Ideal for Operational System Administration MySQL Enterprise Monitor 3.0 - Even runs on top of your MySQL Server! - Ideal for specialized DBAs and Development? Security Availability Performance 48
MySQL & Oracle Product Integrations Oracle Linux Oracle VM Oracle Solaris Oracle Clusterware Oracle Secure Backup Oracle Enterprise Manager Oracle Fusion Middleware Oracle GoldenGate Oracle Audit Vault & Database Firewall MyOracle Online Support MySQL Integrates into your Oracle Environment 49
Demo Videos http://www.mysql.com/products/enterprise/demo.html
Carsten Thalheimer Mobile: +49 172 8833386 Carsten.Thalheimer@Oracle.com
Advantages of the Query Analyzer over Slow Query Log See query execution statistics Trace the query origination back to the application source code View the overall query performance over time See when the query was first introduced See the explain plan Focus on queries specific to a particular host and time period View query executions correlated with other performance graphs 52