Datenbank Monitoring mit Oracle MySQL Tools · PDF fileDatenbank Monitoring mit Oracle MySQL...
Transcript of Datenbank Monitoring mit Oracle MySQL Tools · PDF fileDatenbank Monitoring mit Oracle MySQL...
Datenbank Monitoring mit Oracle MySQL Tools (& kurzes Update von der OOW 2014)
Carsten Thalheimer
Sales Consultant LVM GBU ([email protected])
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
MySQL Enterprise Monitor: Agenda
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
1
2
3
4
5
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.
3
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
5 Years of Oracle Stewardship More Investment, More Innovation
Jan 2010 Sept 2014
4
2x Engineering Staff 3x QA Staff 2x Support Staff
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Replication Lossless Semi-Synchronous
GTIDs Crash Safe Time Delayed Multi-threaded Multi-Source
InnoDB Improved Throughput
Default Online DDL
Full Text Search NoSQL Access
M y S Q L U t i l i t i e s
EXPLAIN
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
G I S
Performance Schema
Security
Partitioning
5
5 Years of Oracle Stewardship More Investment, More Innovation
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
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
Driving MySQL Innovation
Year 2010 – 2013 (from MySQL Release 5.1 to MySQL Release 5.6)
All GA! - 2010
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 Enterprise Audit
MySQL Enterprise HA (DRBD)
All GA! - 2011
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
All GA! - 2012 All GA! - 2013
and
Connector/ODBC, Connector/PHP, Connector/Net, Connector/J, Connector Python, Connector /C++, Connector/C, Ruby Driver …
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Reaching Out to the MySQL Community
• 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
Sharing Information, Soliciting Feedback, Providing Help
7
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
MySQL
8
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
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
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
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
Latest: MySQL 5.5.40 / 5.6.21 MySQL Cluster 7.2.18 / 7.3.7
GA! – 2014 DMR* 2014 *Development Milestone Release
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
And of course …
Connector/ODBC, Connector/PHP, Connector/Net, Connector/J, Connector Python, Connector /C++, Connector/C, Ruby Driver
Driving MySQL Innovation ( News from OOW 2014)
Year 2014
Labs – 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)
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
MySQL Enterprise Monitor: Agenda
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
1
2
3
4
5
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Monitoring ?
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Braucht kein Mensch …
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
… oder doch ?
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Use
rs/D
ep
en
de
nce
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
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
Day 1 6 months 1 year
Inflection point when “nice to have” becomes mission-
critical
nice to have
Custom Applications Mission Critical Over Time Example
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Legal Regulation Payment Card Industry (“PCI”) Compliance PCI Data Security Standard requirements protect credit card user
data.
To meet PCI Requirements, eCommerce websites must:
-- From
Regularly Monitor and Test Networks
Track and monitor all access to network resources and cardholder data
Regularly test security systems and processes
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
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 ✔
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
MySQL Enterprise Monitor: Agenda
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
1
2
3
4
5
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
• 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
MySQL Workbench 6.2
19
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Connect “local” – DB click or Connect
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Start by looking at Server Status Management Tab – Server Status
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
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
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Basics
• Enabled/Disabled Features
Directory Setup
On best disks?
Adequate space?
Slow Query Log On?
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Open Settings Before Running Performance Reports
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
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
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
First Run – Install SYS Schema
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
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
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
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
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
MySQL Enterprise Monitor: Agenda
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
1
2
3
4
5
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
MySQL Enterprise Monitor
30
• 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
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
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
31
MySQL Enterprise Dashboard
Service Manager
Repository
HTTPS
Dat
a C
ente
r P
ub
lic C
lou
d
Pri
vate
Clo
ud
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
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
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
MySQL Enterprise Dashboard
33
"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
• SLA monitoring
• Real-time performance monitoring
• Alerts & notifications
• MySQL best practice advisors
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
MySQL Enterprise Backup Monitoring
Monitor backup results
Monitor backup performance
Ensure backups are up to date
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Security Administration
Account management
Know when privileges change
Get advice on best practices
Monitor access problems
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Replication Monitoring
Auto-discovers replication topology
Master/Slave performance monitoring
Replication advisor
Best practice replication advice
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Performance Monitoring
• Monitor MySQL performance
• Monitor OS performance
• Monitor query performance
• Advice on index usage
• Alerts on performance problems
37
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Causes of Performance Issues MySQL Enterprise Monitor Helps Queries doing table scans 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
Solving Common Performance Issues
38
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Memory Usage Monitoring
Monitor OS memory usage
Monitor MySQL memory usage
Advice on configuration
Alerts on memory usage
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
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
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
MySQL Configuration Management
• Centralized management
• Organized by topic
• Options grouped by feature
• See host details
• See network details
41
Advisors will provide configuration tuning
advice!
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Enterprise Query Analyzer
• Real-time query performance
• Visual correlation graphs
• Find & fix expensive queries
• Detailed query statistics
• Query Response Time index (QRTi)
42
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
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
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
InnoDB Monitoring
• Monitor key performance metrics
• Stay on top of locking issues
• Get configuration advice
• Examine buffer pool usage
44
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
MySQL Enterprise Monitor: Agenda
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
1
2
3
4
5
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
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
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Oracle Enterprise Manager for MySQL
47
Performance Security
Availability
• Availability monitoring
• Performance monitoring
• Configuration monitoring
• All available metrics collected
– Allowing for custom threshold based incident reports
• MySQL auto-detection
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Oracle Enterprise Manager Plugin for MySQL vs. Oracle Enterprise Monitor 3.0
48
Performance Security
Availability
• 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 ?
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
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
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Demo Videos
http://www.mysql.com/products/enterprise/demo.html
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Carsten Thalheimer Mobile: +49 172 8833386 [email protected]
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
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