Monitoring MySQL Performance with Percona Monitoring and Management

Similar documents
Monitoring MySQL Performance with Percona Monitoring and Management

Open Source Database Performance Optimization and Monitoring with PMM. Fernando Laudares, Vinicius Grippa, Michael Coburn Percona

Using Percona Monitoring and Management to Troubleshoot MySQL Performance Issues

Percona Monitoring and Management Documentation

Monitoring MySQL with Prometheus & Grafana

Percona Software & Services Update

Visualize Your Data With Grafana Percona Live Daniel Lee - Software Engineer at Grafana Labs

Percona Software & Services Update

MQ Monitoring on Cloud

Using Prometheus with InfluxDB for metrics storage

MySQL Performance Optimization and Troubleshooting with PMM. Peter Zaitsev, CEO, Percona Percona Technical Webinars 9 May 2018

Which technology to choose in AWS?

Percona XtraDB Cluster 5.7 Enhancements Performance, Security, and More

MySQL Performance Optimization and Troubleshooting with PMM. Peter Zaitsev, CEO, Percona

percona-agent Documentation

What s New in MySQL and MongoDB Ecosystem Year 2017

MongoDB Shootout: MongoDB Atlas, Azure Cosmos DB and Doing It Yourself

Rethinking monitoring with Prometheus

Think Small to Scale Big

VMware AirWatch Memcached Integration Guide Integrating Memcached functionality into your AirWatch deployment

HA solution with PXC-5.7 with ProxySQL. Ramesh Sivaraman Krunal Bauskar

The Art of Container Monitoring. Derek Chen

EdgeConnect for Amazon Web Services (AWS)

MySQL Database Administrator Training NIIT, Gurgaon India 31 August-10 September 2015

VMWARE VREALIZE OPERATIONS MANAGEMENT PACK FOR. MongoDB. User Guide

Amazon Web Services (AWS) Solutions Architect Intermediate Level Course Content

Amazon Web Services (AWS) Training Course Content

ProxySQL Tutorial. Percona Live Europe With a GPL license! High Performance & High Availability Proxy for MySQL

QRM+ Tutorials. QNAP s Remote Server Management Solution. rev

ProxySQL Tutorial. With a GPL license! High Performance & High Availability Proxy for MySQL. Santa Clara, California April 23th 25th, 2018

Amazon Web Services Training. Training Topics:

WhatsConfigured v3.1 User Guide

MySQL High Availability

Docker Container Access Reference Design

IBM Planning Analytics Workspace Local Distributed Soufiane Azizi. IBM Planning Analytics

ExtraHop 6.1 ExtraHop Explore Admin UI Guide

Hynek Schlawack. Get Instrumented. How Prometheus Can Unify Your Metrics

Advanced Topics on the Mirth Connect Interface Engine. July 6, 2016

Build and Deploy Stored Procedures with IBM Data Studio

Consistent Reads Using ProxySQL and GTID. Santa Clara, California April 23th 25th, 2018

Migrating and living on RDS/Aurora. life after Datacenters

StreamSets Control Hub Installation Guide

How Percona Contributes to Open Source Database Ecosystem. Peter Zaitsev 5 October 2016

Accelerate MySQL for Demanding OLAP and OLTP Use Case with Apache Ignite December 7, 2016

Using MySQL for Distributed Database Architectures

VMWARE VREALIZE OPERATIONS MANAGEMENT PACK FOR. Nagios. User Guide

McAfee Firewall Enterprise epolicy Orchestrator Extension

ControlUp v7.1 Release Notes

Scaling Without Sharding. Baron Schwartz Percona Inc Surge 2010

BriCS. University of Bristol Cloud Service Simulation Runner. User & Developer Guide. 1 October John Cartlidge & M.

vrealize Suite Lifecycle Manager 1.1 Installation, Upgrade, and Management vrealize Suite 2017

Deploy and Secure an Internet Facing Application with the Barracuda Web Application Firewall in Amazon Web Services

Designing MQ deployments for the cloud generation

Migrating to Aurora MySQL and Monitoring with PMM. Percona Technical Webinars August 1, 2018

DevOps Course Content

Solving Problems in Ways Never Before Possible, with FusionReactor 7

Open Source Database Ecosystem in Peter Zaitsev 3 October 2016

WhatsUp Gold. Evaluation Guide

Monitoring and Trending With MySQL. Michael DelNegro Principal Database Administrator AOL

vcenter Operations Manager for Horizon View Administration

Introduction to OpenStack Trove

PXC loves firewalls (and System Admins loves iptables) Written by Marco Tusa Monday, 18 June :00 - Last Updated Wednesday, 18 July :25

VMware vrealize Operations for Horizon Administration

SQL Diagnostic Manager Management Pack for Microsoft System Center

IBM Security QRadar Deployment Intelligence app IBM

A10 HARMONY CONTROLLER

Open-Falcon A Distributed and High-Performance Monitoring System. Yao-Wei Ou & Lai Wei 2017/05/22

Regain control thanks to Prometheus. Guillaume Lefevre, DevOps Engineer, OCTO Technology Etienne Coutaud, DevOps Engineer, OCTO Technology

MariaDB CeBIT MariaDB 10.1: Datenbankverschlüsselung und andere Sicherheitsvorteile. Jens Bollmann, Principal Instructor/Consultant

NET1821BU THE FUTURE OF NETWORKING AND SECURITY WITH NSX-T Bruce Davie CTO, APJ 2

OpenStack Havana All-in-One lab on VMware Workstation

ProxySQL - GTID Consistent Reads. Adaptive query routing based on GTID tracking

Overview. SUSE OpenStack Cloud Monitoring

Eucalyptus User Console Guide

The Balabit s Privileged Session Management 5 F5 Azure Reference Guide

Ingest. Aaron Mildenstein, Consulting Architect Tokyo Dec 14, 2017

MySQL Performance Improvements

NexentaStor VVOL

VMware AirWatch Content Gateway for Linux. VMware Workspace ONE UEM 1811 Unified Access Gateway

vrealize Suite Lifecycle Manager 1.0 Installation and Management vrealize Suite 2017

ProxySQL's Internals

Accelerate MySQL for Demanding OLAP and OLTP Use Cases with Apache Ignite. Peter Zaitsev, Denis Magda Santa Clara, California April 25th, 2017

Server & Application Monitor

Chapter 10 Configure AnyConnect Remote Access SSL VPN Using ASDM

How can you implement this through a script that a scheduling daemon runs daily on the application servers?

VMware AirWatch Content Gateway Guide for Linux For Linux

Why Choose Percona Server for MongoDB? Tyler Duzan

VMware AirWatch Product Provisioning and Staging for QNX Guide Using Product Provisioning for managing QNX devices.

ITS. MySQL for Database Administrators (40 Hours) (Exam code 1z0-883) (OCP My SQL DBA)

Quick Start Guide to Compute Canada Cloud Service

ExtraHop 7.2 Admin UI Guide

HySecure Quick Start Guide. HySecure 5.0

Power IQ HyperV Quick Setup Guide

Integrate MySQL Server EventTracker Enterprise

@joerg_schad Nightmares of a Container Orchestration System

NetIQ Privileged Account Manager 3.5 includes new features, improves usability and resolves several previous issues.

Running MySQL on AWS. Michael Coburn Wednesday, April 15th, 2015

SAP Vora - AWS Marketplace Production Edition Reference Guide

Aurora, RDS, or On-Prem, Which is right for you

Protecting MySQL network traffic. Daniël van Eeden 25 April 2017

Transcription:

Monitoring MySQL Performance with Percona Monitoring and Management

Your Presenters Michael Coburn - PMM Product Manager Working at Percona for almost 5 years Consultant, Manager, TAM, now Product Manager Canadian living in México Roma Novikov - PMM Development Manager Joined Percona in January 2017 Lviv, Ukraine http://bit.ly/joinperconaliveslack #monitoring-mysql-perf Percona Live App 2

Agenda Introductions - 1:30pm Part 1 - Installation & Configuration - 1:45pm Refreshments break ~2:30pm Part 2 - Using Query Analytics (QAN) - 2:45pm Part 3 - Using Metrics Monitor - 3:30pm Questions - 4:15pm 3

Goals of this tutorial 1. 2. 3. 4. 5. Build awareness of PMM and why it exists Understand the components of PMM Be able to install PMM at your own site Interpret and action slow queries in QAN Analyse MySQL metrics using Metrics Monitor 4

Percona Monitoring and Management (PMM) Free, Open Source database monitoring and management platform for MySQL, MariaDB, ProxySQL, and MongoDB Runs in your secure environment (not a SaaS), on your equipment Secured with SSL encryption between pmm-client and pmm-server 5

PMM distribution methods Docker Most common deployment method for PMM today VirtualBox Designed for non-production environments Can be used for one-off troubleshooting tasks What we'll be using today AWS AMI Production-ready Available in all 14 regions Coming to AWS Marketplace during Q2 2017 6

PMM architecture 7

pmm-server components Prometheus - timeseries data store Grafana - visualisation system on top of Prometheus Percona Dashboards Query Analytics (QAN) - individual and aggregated query performance Orchestrator - MySQL replication topology manager and visualisation tool We won't be discussing Orchestrator during this talk (sorry Shlomi) 8

pmm-client components pmm-admin Command-line tool for managing clients percona-qan-agent QAN service that collects query performance metrics from Slow Log or PERFORMANCE_SCHEMA node_exporter Prometheus exporter of Linux server metrics mysqld_exporter Prometheus exporter of MySQL server metrics 9

Part 1 Installation & Configuration

Environment notes Authentication percona / percona Or use the ssh key provided pmm-client - 192.168.56.2 ssh 192.168.56.2 -l percona CentOS 7 with Percona-Server-server-57 firwalld disabled ~/.ssh/config Host pmm-client User percona HostName 192.168.56.2 IdentityFile ~/.ssh/monitoring_mysql_performance pmm-server - 192.168.56.3 ssh 192.168.56.3 -l admin 11

PMM installation steps 1. 2. 3. 4. 5. Import Appliance into VirtualBox Configure VirtualBox networking Confirm pmm-client and pmm-server hosts can communicate Configure sysbench load tests (optional) Configure pmm-admin for MySQL + Linux statistics, and queries 12

Configuring VirtualBox Import Appliance File > Import Appliance... Configure Private Network VirtualBox > Preferences > Network > Host-only Networks Create new host-only network via button on right Adapter Configure IPv4 Address: 192.168.56.1 DHCP Server Enable Server Configure Server Address: 192.168.56.1 Configure Lower Address Bound: 192.168.56.2 Configure Upper Address Bound: 192.168.56.10 Consider setting Execution Cap at 50%, 2 cores Per instance 13

VirtualBox host only network 14

Configure network interfaces 15

Connecting to instances Start the two instances via VirtualBox console Connect using ssh ~/.ssh/config Optional: ssh-agent bash ssh-add monitoring_mysql_performance ssh -l percona 192.168.56.2 [pmm-client$] ssh pmm-server Host pmm-client User percona HostName 192.168.56.2 IdentityFile ~/.ssh/monitoring_mysql_performance Ensure the nodes can see each other [percona@pmm-client ~]$ ping pmm-server [admin@pmm-server ~]$ ping pmm-client Configure pmm-server for correct time [pmm-server $] date --set='timefromclient' 16

Starting sysbench (optional) Fire off the launcher script pmm-client$ cd ~/tests pmm-client$ sh start_all.sh Will take approximately 5 minutes to spin up Laptop too slow? Pause the pmm-client instance and configure Execution Cap 17

Configuring PMM FINALLY! Connect pmm-client to pmm-server sudo pmm-admin config --server 192.168.56.3 --server-user percona --server-password percona Start data collection sudo pmm-admin add mysql --create-user --socket /var/lib/mysql/mysql.sock --user percona --password percona Generates a MySQL user account with bare minimum privileges Creates three services pmm-linux-metrics pmm-mysql-metrics pmm-mysql-queries 18

Checking if it all works Load these pages: Landing page QAN Metrics Monitor Prometheus http://192.168.56.3 http://192.168.56.3/qan http://192.168.56.3/graph http://192.168.56.3/prometheus Do they work? Great - take a break, refreshments are available at 2:30pm No? Let's Troubleshoot (next slide ) 19

Troubleshooting PMM Check for any red: sudo pmm-admin list sudo pmm-admin check-network Time drift? pmm-server$ sudo date --set='<timefromclient>' Restarting one or all components sudo pmm-admin restart linux:metrics pmm-client sudo pmm-admin restart --all Logs are in /var/log/pmm-*.log Check targets status in Prometheus http://192.168.56.3/prometheus/targets 20

Refreshments Break Come back in ~15 minutes!

Part 2 - Using Query Analytics (QAN) What are my queries doing?

QAN dashboard 23

Overview Per instance view of queries consuming most time Fields: Query Abstract Query pattern with placeholders ID Unique fingerprint, used for query group by Load Grand Total Time - percentage of time that the MySQL server spent executing a specific query, compared to the total time it spent executing all queries during the selected period of time Count QPS, total count during window, % of total Latency Min, Med, Avg, P95, Max 24

Query fingerprint + EXPLAIN 25

PERFORMANCE_SCHEMA or Slow Log 26

Slow Log (Percona Server) 27

CREATE TABLE 28

TABLE STATUS 29

INDEXES 30

Server summary info Click the icon: pt-summary Instance-specific information pt-mysql-summary Facts about the running MySQL instance 31

Part 3 - Using Metrics Monitor Eye candy

Grafana in a nutshell Open Source data visualisation tool Popular datasources Prometheus CloudWatch Graphite Elasticsearch Templated Variables Define your graph metrics, and let the hosts get filled in automatically GREAT for large, dynamic environments where hosts are considered ephemeral NOTE: Isn't supported for Alerting 33

Prometheus real quick Timeseries database - metric name + key/value pairs Flexible query language PromQL (See Björn's talk on Thursday for more!) Collection of metrics based on HTTP pull Targets discovered via service discovery or static configuration files We're using consul in PMM 34

How can I... Compare servers' to each other Cross Server graphs Show behaviour now() compared to past period Trends Overview dashboard At a glance MySQL + indepth MySQL Overview, InnoDB, InnoDB Advanced View Prometheus performance data Prometheus dashboard MariaDB - Aria, Online DDL, ICP, and Defragmentation MariaDB dashboard Table statistics* Largest tables by rows and size, total DB size, tables by rows read and changed, auto_increment usage (about to hit the limit?) User statistics* Top users by connection count, network usage, rows read/changed 35

Alerting Define alerts while "you're in the data" Template variables not supported Workaround steps Add new Metrics Query using instance name Add Alert condition using new Query row Save dashboard 36

Almost the end Parting thoughts

Advice PMM Metrics retention as packaged is 30 days We are looking at options to present a longer history mysql:metrics are polled at 1s, 5s, and 60s resolutions, and linux:metrics is every 1s On high-latency links you might need to tune scrape_interval up Don't skimp on resources Prometheus in particular needs a lot of RAM to keep reads fast, and to sequence scrape data before writing chunks to disk Consider disabling some mysqld_exporter features to minimise performance impact --disable-tablestats, --disable-processlist Keep queries in the database (security) --disable-queryexamples 38

PMM Roadmap Alerting QAN for MongoDB MySQL -> ClickHouse for QAN datastore Plugins and Integrations Long term metrics storage (past 30 days) One-click ticket submission* Standardised data collection for tickets* Any feedback of what you'd like to see in PMM? * for Percona Subscribers (Customers) only 39

Questions? Michael Coburn michael.coburn@percona.com Roma Novikov roma.novikov@percona.com Percona is looking for MongoDB and MySQL rockstars! Be sure to talk to Jennifer @ Percona s booth. Do you have any areas or benchmarks you want Percona to talk about in blogs together? Any features or tools you think we should focus on to meet the community's needs? 40

Rate Our Session 41