SlideShare a Scribd company logo
1 of 32
<Insert Picture Here>




MySQL Performance Schema
(OSI, 14th Oct, 2012)
Mayank Prasad
Sr. Software Engineer, MySQL-Oracle
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
     decision. The development, release, and timing of any features or
     functionality described for Oracle’s products remains at the sole
     discretion of Oracle.




2Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Agenda
     
           What is Performance Schema
     
           Origin and Development
     
           Design
     
           Configuration
     
           Server Variables and Status Variables
     
           Tables in Performance Schema
     
           An Example
     
           Benefits of Performance Schema
     
           Drawbacks of Performance Schema
     
           What's new in MySQL-5.6
     
           Q/A.
     
           Reference


3Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Why Performance Schema ??
     
           End user: why is my session stuck ?

     
           MySQL developer: why is this code contended ?

     
           App developer: why is my application slow ?

     
           DBA: why is this table hot ?

     
           Storage: why is this disk spinning ?

     
           Network: why is this link traffic high ?

     
           System: why is the global throughput low ?

4Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
What is Performance Schema

      Performance Schema is a mechanism to give user a consolidated view
      in a tabular format of what is happening behind the scene when
      MySQL Server is running.

      Information stored in tables. Can be accessed using SQL interface.

      Not persistent tables i.e. not stored on disk. Once server is stopped,
      all information in PS tables is gone.




5Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Origin and Development

      Development was started by Marc Alff and Peter Gulutzan in 2008.

      First introduced in MySQL-5.5 with minimal functionality.

      Since then development is on full pace.

      Next plan GA is MySQL-5.6 with number of new features introduced.




6Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Design
         A new storage Engine : Performance Schema.

         A new database : Performance Schema (with hard-coded DDL).

         Instruments and instrumentation points in code.

         Consumers.

         Tracking events (Wait, Stage, Statements, Idle).

         Timings.

         Dynamic configuration for instruments/consumers.

7Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Design : Instrumentation




8Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Design : Instrumentation contd.

       Instrumentation for :

       
             I/O operations (File I/O, Table I/O, NET I/O)
       
             Locking (mutex, rwlocks, table locks)
       
             Waits
       
             Statements
       
             Stages
             
               and so on ...




9Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Design : Event Waits Instrumentation

       Monitored wait events.

       Tables & Summary tables.

       Instruments naming convention:

                     wait/io/file|socket|table
                     wait/lock
                     wait/synch/cond|mutex|rwlock




10Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Design : Event Wait Instrumentation contd.




11Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Design : Event Stage Instrumentation

       Instrumented stage events.


       Tables and Summary Tables.


       Instruments naming convention:

                     stage/<code_area>/<stage_name




12Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Design : Event Stage Instrumentation contd.




13Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Design : Event Statements Instrumentation

       Instrumented statement events.


       Tables and Summary Tables.


       Instruments naming convention:

                     statement/com|sql




14Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Design : Event Statements Instrumentation
                                       contd.




15Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Nested Events


                                                          Statement
                                                                         Stage
                                                                                 Wait
                                                                                 sync, lock, i/o




16Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Nested Events contd.




17Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Design : Timings

       Available timers.



       Timers setup in Performance
       Schema.


       Configurable option for any
       instrument to be timed.



18Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Configuration

        Compile time:
              -DWITH_PERFSCHEMA_STORAGE_ENGINE=1

        Server start-up: (enabled in 5.6 by default)
        From configuration file:
          [mysqld]
          performance_schema=ON/1
          performance_schema_consumers_<consumer_name>=on/true/1
          performance_schema_events_waits_history_size=<some_number>
          performance_schema_instruments='<instrument_name=on/true/1'

        From command line:
          l
             --<all_above_options>

        Runtime:
          Update performance_schema.setup_consumers set ENABLED='YES' where
          NAME='events_waits_history';




19Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Server Variables

         Variables values at the run
         time.




20Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Status Variables

       Status information of
       Performance Schema at run
       time.

       Used to inspect lost
       information.




21Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Tables in Performance Schema

        Total 52 tables (only 17 in 5.5)

        Main category:
        l
              setup_tables
        l
              Instance_tables
        l
              wait_events_tables
        l
              stage_events_tables
        l
              statement_event_tables
        l
              connection_tables
        l
              connection_attribute_tables
        l
              summary_tables
        l
              miscellaneous_tables




22Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Tables in Performance Schema contd.

       setup_consumers




23Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Tables in Performance Schema contd.

       setup_instruments




24Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Tables in Performance Schema contd.

       events_statements_summary_global_by_event_name




25Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Example to use PS to diagnose an issue

        In a multi threaded scenario, thread_1 is stuck.

        l
              Find out what thread 1 is waiting for:
              l
                SELECT * FROM events_waits_current WHERE THREAD_ID = thread_1;
              Say thread1 is waiting for mutex_A (Column OBJECT_INSTANCE_BEGIN).

        l
              Find out who has taken mutex_A.
              l
                 SELECT * FROM mutex_instances WHERE OBJECT_INSTANCE_BEGIN = mutex_A;
              thread_2 is holding mutex_A. (Column LOCKED_BY_THREAD_ID)

        l
              Find out what thread_2 is waiting for:
              l
                    SELECT * FROM events_waits_current WHERE THREAD_ID = thread_2;




26Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Benefits of Performance Schema
       l
              Great insight of a running MySQL server.

       l
              Good granularity of information (nested events).

       l
              Available irrespective of platforms.

       l
              User friendly with well known SQL interface.

       l
              Multiple summary tables to give consolidated view to user.

       l
              Can be configured to meet user's need at run time.



27Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Drawbacks of Performance Schema

       Only drawback is impact on performance.

       Depends on PS configuration. All enable, noticeable hit.

       Improved significantly in 5.6 and enabled by default. Less then 5%
       with default instrumentation enabled.

       Getting better and better …




28Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Whats new in MySQL-5.6

       Instrumenting Table I/O.
       Instrumenting Table Lock.
       Instrumenting NET I/O.
       Instrumenting Stages.
       Instrumenting Statements.
       Multiple summary tables.
       Host cache.
       ... and many more.




29Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
Reference

       MySQL documentation:
       http://dev.mysql.com/doc/refman/5.6/en/performance-schema.html


       PS overhead analysis:
       http://dimitrik.free.fr/blog/archives/2012/06/mysql-performance-pfs-overhead-in-56.html

       Blogs :
       http://marcalff.blogspot.com/
       http://www.markleith.co.uk/




30Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
<Insert Picture Here>




Thanks for attending!
MySQL at Glance
      OSI, October 12-14, Bangalore
        Sessions are happening at
        10/12 Workshop                                                   “MySQL Performance Tuning”
        10/13 Workshop                                                   “MySQL Cluster”
        10/14
         - 09:45-10:30 Keynote                                           “The State Of The Dolphin”
         - 10:30-11:15 Session                                           “MySQL Is Exciting Again”
         - 12:45-13:30 Session                                           “Mysql 5.6 Optimizer Improvements”
         - 14:15-15:00 Panel Discussion                                  “FOSS Fueled Innovation”
         - 15:45-16:30 Session                                           “MySQL Cluster With A Mix & Match Of In-Memory Database & No SQL”
         - 16:30-17:15 Session                                           “MySQL Performance Schema”

        Come and meet with MySQL Engineers and Experts and join us with
        “Live Workshop” at our booth!!




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

More Related Content

What's hot

Introduction to Machine Learning - From DBA's to Data Scientists - OGBEMEA
Introduction to Machine Learning - From DBA's to Data Scientists - OGBEMEAIntroduction to Machine Learning - From DBA's to Data Scientists - OGBEMEA
Introduction to Machine Learning - From DBA's to Data Scientists - OGBEMEASandesh Rao
 
MySQL Monitoring Mechanisms
MySQL Monitoring MechanismsMySQL Monitoring Mechanisms
MySQL Monitoring MechanismsMark Leith
 
[❤PDF❤] Oracle 19c Database Administration Oracle Simplified
[❤PDF❤] Oracle 19c Database Administration Oracle Simplified [❤PDF❤] Oracle 19c Database Administration Oracle Simplified
[❤PDF❤] Oracle 19c Database Administration Oracle Simplified ZanderHaney
 
Presentation upgrade, migrate &amp; consolidate to oracle database 12c &amp...
Presentation   upgrade, migrate &amp; consolidate to oracle database 12c &amp...Presentation   upgrade, migrate &amp; consolidate to oracle database 12c &amp...
Presentation upgrade, migrate &amp; consolidate to oracle database 12c &amp...solarisyougood
 
What to Expect From Oracle database 19c
What to Expect From Oracle database 19cWhat to Expect From Oracle database 19c
What to Expect From Oracle database 19cMaria Colgan
 
Instrumenting plugins for Performance Schema
Instrumenting plugins for Performance SchemaInstrumenting plugins for Performance Schema
Instrumenting plugins for Performance SchemaMark Leith
 
LAD - GroundBreakers - Jul 2019 - Using Oracle Autonomous Health Framework to...
LAD - GroundBreakers - Jul 2019 - Using Oracle Autonomous Health Framework to...LAD - GroundBreakers - Jul 2019 - Using Oracle Autonomous Health Framework to...
LAD - GroundBreakers - Jul 2019 - Using Oracle Autonomous Health Framework to...Sandesh Rao
 
Beyond SQL Tuning: Insider's Guide to Maximizing SQL Performance
Beyond SQL Tuning: Insider's Guide to Maximizing SQL PerformanceBeyond SQL Tuning: Insider's Guide to Maximizing SQL Performance
Beyond SQL Tuning: Insider's Guide to Maximizing SQL PerformanceAshish Agrawal
 
Dimensional modeling in oracle sql developer
Dimensional modeling in oracle sql developerDimensional modeling in oracle sql developer
Dimensional modeling in oracle sql developerJeff Smith
 
DevSecOps PLM L2 Playbook.pdf
DevSecOps PLM L2 Playbook.pdfDevSecOps PLM L2 Playbook.pdf
DevSecOps PLM L2 Playbook.pdfNotTelling5
 
Introduction to MySQL Enterprise Monitor
Introduction to MySQL Enterprise MonitorIntroduction to MySQL Enterprise Monitor
Introduction to MySQL Enterprise MonitorMark Leith
 
Windowing Functions - Little Rock Tech Fest 2019
Windowing Functions - Little Rock Tech Fest 2019Windowing Functions - Little Rock Tech Fest 2019
Windowing Functions - Little Rock Tech Fest 2019Dave Stokes
 
What_to_expect_from_oracle_database_12c
What_to_expect_from_oracle_database_12cWhat_to_expect_from_oracle_database_12c
What_to_expect_from_oracle_database_12cMaria Colgan
 
Things learned from OpenWorld 2013
Things learned from OpenWorld 2013Things learned from OpenWorld 2013
Things learned from OpenWorld 2013Connor McDonald
 
20 tips and tricks with the Autonomous Database
20 tips and tricks with the Autonomous Database20 tips and tricks with the Autonomous Database
20 tips and tricks with the Autonomous DatabaseSandesh Rao
 
Oracle Active Data Guard: Best Practices and New Features Deep Dive
Oracle Active Data Guard: Best Practices and New Features Deep Dive Oracle Active Data Guard: Best Practices and New Features Deep Dive
Oracle Active Data Guard: Best Practices and New Features Deep Dive Glen Hawkins
 
Sangam 18 - The New Optimizer in Oracle 12c
Sangam 18 - The New Optimizer in Oracle 12cSangam 18 - The New Optimizer in Oracle 12c
Sangam 18 - The New Optimizer in Oracle 12cConnor McDonald
 
OTN TOUR 2016 - Oracle Database 12c - The Best Oracle Database 12c Tuning Fea...
OTN TOUR 2016 - Oracle Database 12c - The Best Oracle Database 12c Tuning Fea...OTN TOUR 2016 - Oracle Database 12c - The Best Oracle Database 12c Tuning Fea...
OTN TOUR 2016 - Oracle Database 12c - The Best Oracle Database 12c Tuning Fea...Alex Zaballa
 
OTN TOUR 2016 - Oracle Database 12c - The Best Oracle Database 12c New Featur...
OTN TOUR 2016 - Oracle Database 12c - The Best Oracle Database 12c New Featur...OTN TOUR 2016 - Oracle Database 12c - The Best Oracle Database 12c New Featur...
OTN TOUR 2016 - Oracle Database 12c - The Best Oracle Database 12c New Featur...Alex Zaballa
 
How to use Exachk effectively to manage Exadata environments OGBEmea
How to use Exachk effectively to manage Exadata environments OGBEmeaHow to use Exachk effectively to manage Exadata environments OGBEmea
How to use Exachk effectively to manage Exadata environments OGBEmeaSandesh Rao
 

What's hot (20)

Introduction to Machine Learning - From DBA's to Data Scientists - OGBEMEA
Introduction to Machine Learning - From DBA's to Data Scientists - OGBEMEAIntroduction to Machine Learning - From DBA's to Data Scientists - OGBEMEA
Introduction to Machine Learning - From DBA's to Data Scientists - OGBEMEA
 
MySQL Monitoring Mechanisms
MySQL Monitoring MechanismsMySQL Monitoring Mechanisms
MySQL Monitoring Mechanisms
 
[❤PDF❤] Oracle 19c Database Administration Oracle Simplified
[❤PDF❤] Oracle 19c Database Administration Oracle Simplified [❤PDF❤] Oracle 19c Database Administration Oracle Simplified
[❤PDF❤] Oracle 19c Database Administration Oracle Simplified
 
Presentation upgrade, migrate &amp; consolidate to oracle database 12c &amp...
Presentation   upgrade, migrate &amp; consolidate to oracle database 12c &amp...Presentation   upgrade, migrate &amp; consolidate to oracle database 12c &amp...
Presentation upgrade, migrate &amp; consolidate to oracle database 12c &amp...
 
What to Expect From Oracle database 19c
What to Expect From Oracle database 19cWhat to Expect From Oracle database 19c
What to Expect From Oracle database 19c
 
Instrumenting plugins for Performance Schema
Instrumenting plugins for Performance SchemaInstrumenting plugins for Performance Schema
Instrumenting plugins for Performance Schema
 
LAD - GroundBreakers - Jul 2019 - Using Oracle Autonomous Health Framework to...
LAD - GroundBreakers - Jul 2019 - Using Oracle Autonomous Health Framework to...LAD - GroundBreakers - Jul 2019 - Using Oracle Autonomous Health Framework to...
LAD - GroundBreakers - Jul 2019 - Using Oracle Autonomous Health Framework to...
 
Beyond SQL Tuning: Insider's Guide to Maximizing SQL Performance
Beyond SQL Tuning: Insider's Guide to Maximizing SQL PerformanceBeyond SQL Tuning: Insider's Guide to Maximizing SQL Performance
Beyond SQL Tuning: Insider's Guide to Maximizing SQL Performance
 
Dimensional modeling in oracle sql developer
Dimensional modeling in oracle sql developerDimensional modeling in oracle sql developer
Dimensional modeling in oracle sql developer
 
DevSecOps PLM L2 Playbook.pdf
DevSecOps PLM L2 Playbook.pdfDevSecOps PLM L2 Playbook.pdf
DevSecOps PLM L2 Playbook.pdf
 
Introduction to MySQL Enterprise Monitor
Introduction to MySQL Enterprise MonitorIntroduction to MySQL Enterprise Monitor
Introduction to MySQL Enterprise Monitor
 
Windowing Functions - Little Rock Tech Fest 2019
Windowing Functions - Little Rock Tech Fest 2019Windowing Functions - Little Rock Tech Fest 2019
Windowing Functions - Little Rock Tech Fest 2019
 
What_to_expect_from_oracle_database_12c
What_to_expect_from_oracle_database_12cWhat_to_expect_from_oracle_database_12c
What_to_expect_from_oracle_database_12c
 
Things learned from OpenWorld 2013
Things learned from OpenWorld 2013Things learned from OpenWorld 2013
Things learned from OpenWorld 2013
 
20 tips and tricks with the Autonomous Database
20 tips and tricks with the Autonomous Database20 tips and tricks with the Autonomous Database
20 tips and tricks with the Autonomous Database
 
Oracle Active Data Guard: Best Practices and New Features Deep Dive
Oracle Active Data Guard: Best Practices and New Features Deep Dive Oracle Active Data Guard: Best Practices and New Features Deep Dive
Oracle Active Data Guard: Best Practices and New Features Deep Dive
 
Sangam 18 - The New Optimizer in Oracle 12c
Sangam 18 - The New Optimizer in Oracle 12cSangam 18 - The New Optimizer in Oracle 12c
Sangam 18 - The New Optimizer in Oracle 12c
 
OTN TOUR 2016 - Oracle Database 12c - The Best Oracle Database 12c Tuning Fea...
OTN TOUR 2016 - Oracle Database 12c - The Best Oracle Database 12c Tuning Fea...OTN TOUR 2016 - Oracle Database 12c - The Best Oracle Database 12c Tuning Fea...
OTN TOUR 2016 - Oracle Database 12c - The Best Oracle Database 12c Tuning Fea...
 
OTN TOUR 2016 - Oracle Database 12c - The Best Oracle Database 12c New Featur...
OTN TOUR 2016 - Oracle Database 12c - The Best Oracle Database 12c New Featur...OTN TOUR 2016 - Oracle Database 12c - The Best Oracle Database 12c New Featur...
OTN TOUR 2016 - Oracle Database 12c - The Best Oracle Database 12c New Featur...
 
How to use Exachk effectively to manage Exadata environments OGBEmea
How to use Exachk effectively to manage Exadata environments OGBEmeaHow to use Exachk effectively to manage Exadata environments OGBEmea
How to use Exachk effectively to manage Exadata environments OGBEmea
 

Similar to OSI_MySQL_Performance Schema

Oracle - Enterprise Manager 12c Overview
Oracle - Enterprise Manager 12c OverviewOracle - Enterprise Manager 12c Overview
Oracle - Enterprise Manager 12c OverviewFred Sim
 
Otm 2013 c13_e-17a-plessis-elisabeth-otm-self-help
Otm 2013 c13_e-17a-plessis-elisabeth-otm-self-helpOtm 2013 c13_e-17a-plessis-elisabeth-otm-self-help
Otm 2013 c13_e-17a-plessis-elisabeth-otm-self-helpjucaab
 
Ebs troubleshooting con9019_pdf_9019_0001
Ebs troubleshooting con9019_pdf_9019_0001Ebs troubleshooting con9019_pdf_9019_0001
Ebs troubleshooting con9019_pdf_9019_0001jucaab
 
GlassFish in Production Environments
GlassFish in Production EnvironmentsGlassFish in Production Environments
GlassFish in Production EnvironmentsBruno Borges
 
Optimizing the Enterprise Manager 12c
Optimizing the Enterprise Manager 12cOptimizing the Enterprise Manager 12c
Optimizing the Enterprise Manager 12cKellyn Pot'Vin-Gorman
 
Developing Applications with MySQL and Java
Developing Applications with MySQL and JavaDeveloping Applications with MySQL and Java
Developing Applications with MySQL and JavaMark Matthews
 
Con8833 access at scale for hundreds of millions of users final
Con8833 access at scale for hundreds of millions of users   finalCon8833 access at scale for hundreds of millions of users   final
Con8833 access at scale for hundreds of millions of users finalOracleIDM
 
10 Tips for Java EE 7 with PrimeFaces - JavaOne 2013
10 Tips for Java EE 7 with PrimeFaces - JavaOne 201310 Tips for Java EE 7 with PrimeFaces - JavaOne 2013
10 Tips for Java EE 7 with PrimeFaces - JavaOne 2013Martin Fousek
 
Batch Applications for the Java Platform
Batch Applications for the Java PlatformBatch Applications for the Java Platform
Batch Applications for the Java PlatformSivakumar Thyagarajan
 
206510 p6 upgrade considerations
206510 p6 upgrade considerations206510 p6 upgrade considerations
206510 p6 upgrade considerationsp6academy
 
MySQL 5.7: Performance Schema Improvements
MySQL 5.7: Performance Schema ImprovementsMySQL 5.7: Performance Schema Improvements
MySQL 5.7: Performance Schema ImprovementsMark Leith
 
Ebs performance tuning session feb 13 2013---Presented by Oracle
Ebs performance tuning session  feb 13 2013---Presented by OracleEbs performance tuning session  feb 13 2013---Presented by Oracle
Ebs performance tuning session feb 13 2013---Presented by OracleAkash Pramanik
 
Performance Schema and Sys Schema in MySQL 5.7
Performance Schema and Sys Schema in MySQL 5.7Performance Schema and Sys Schema in MySQL 5.7
Performance Schema and Sys Schema in MySQL 5.7Mark Leith
 
JavaFX and JEE 7
JavaFX and JEE 7JavaFX and JEE 7
JavaFX and JEE 7Vijay Nair
 
Revisiting Silent: Installs Are they still useful?
Revisiting Silent: Installs Are they still useful?Revisiting Silent: Installs Are they still useful?
Revisiting Silent: Installs Are they still useful?Revelation Technologies
 
Continuous Performance Monitoring of a Distributed Application [CON4730]
Continuous Performance Monitoring of a Distributed Application [CON4730]Continuous Performance Monitoring of a Distributed Application [CON4730]
Continuous Performance Monitoring of a Distributed Application [CON4730]Ashish Srivastava
 
Batch Applications for Java Platform 1.0: Java EE 7 and GlassFish
Batch Applications for Java Platform 1.0: Java EE 7 and GlassFishBatch Applications for Java Platform 1.0: Java EE 7 and GlassFish
Batch Applications for Java Platform 1.0: Java EE 7 and GlassFishArun Gupta
 
Why Upgrade to Oracle Database 12c?
Why Upgrade to Oracle Database 12c?Why Upgrade to Oracle Database 12c?
Why Upgrade to Oracle Database 12c?DLT Solutions
 

Similar to OSI_MySQL_Performance Schema (20)

Oracle - Enterprise Manager 12c Overview
Oracle - Enterprise Manager 12c OverviewOracle - Enterprise Manager 12c Overview
Oracle - Enterprise Manager 12c Overview
 
Marcin Szałowicz - MySQL Workbench
Marcin Szałowicz - MySQL WorkbenchMarcin Szałowicz - MySQL Workbench
Marcin Szałowicz - MySQL Workbench
 
Otm 2013 c13_e-17a-plessis-elisabeth-otm-self-help
Otm 2013 c13_e-17a-plessis-elisabeth-otm-self-helpOtm 2013 c13_e-17a-plessis-elisabeth-otm-self-help
Otm 2013 c13_e-17a-plessis-elisabeth-otm-self-help
 
Ebs troubleshooting con9019_pdf_9019_0001
Ebs troubleshooting con9019_pdf_9019_0001Ebs troubleshooting con9019_pdf_9019_0001
Ebs troubleshooting con9019_pdf_9019_0001
 
GlassFish in Production Environments
GlassFish in Production EnvironmentsGlassFish in Production Environments
GlassFish in Production Environments
 
Optimizing the Enterprise Manager 12c
Optimizing the Enterprise Manager 12cOptimizing the Enterprise Manager 12c
Optimizing the Enterprise Manager 12c
 
Developing Applications with MySQL and Java
Developing Applications with MySQL and JavaDeveloping Applications with MySQL and Java
Developing Applications with MySQL and Java
 
Con8833 access at scale for hundreds of millions of users final
Con8833 access at scale for hundreds of millions of users   finalCon8833 access at scale for hundreds of millions of users   final
Con8833 access at scale for hundreds of millions of users final
 
10 Tips for Java EE 7 with PrimeFaces - JavaOne 2013
10 Tips for Java EE 7 with PrimeFaces - JavaOne 201310 Tips for Java EE 7 with PrimeFaces - JavaOne 2013
10 Tips for Java EE 7 with PrimeFaces - JavaOne 2013
 
Batch Applications for the Java Platform
Batch Applications for the Java PlatformBatch Applications for the Java Platform
Batch Applications for the Java Platform
 
206510 p6 upgrade considerations
206510 p6 upgrade considerations206510 p6 upgrade considerations
206510 p6 upgrade considerations
 
MySQL 5.7: Performance Schema Improvements
MySQL 5.7: Performance Schema ImprovementsMySQL 5.7: Performance Schema Improvements
MySQL 5.7: Performance Schema Improvements
 
OOW-TBE-12c-CON7307-Sharable
OOW-TBE-12c-CON7307-SharableOOW-TBE-12c-CON7307-Sharable
OOW-TBE-12c-CON7307-Sharable
 
Ebs performance tuning session feb 13 2013---Presented by Oracle
Ebs performance tuning session  feb 13 2013---Presented by OracleEbs performance tuning session  feb 13 2013---Presented by Oracle
Ebs performance tuning session feb 13 2013---Presented by Oracle
 
Performance Schema and Sys Schema in MySQL 5.7
Performance Schema and Sys Schema in MySQL 5.7Performance Schema and Sys Schema in MySQL 5.7
Performance Schema and Sys Schema in MySQL 5.7
 
JavaFX and JEE 7
JavaFX and JEE 7JavaFX and JEE 7
JavaFX and JEE 7
 
Revisiting Silent: Installs Are they still useful?
Revisiting Silent: Installs Are they still useful?Revisiting Silent: Installs Are they still useful?
Revisiting Silent: Installs Are they still useful?
 
Continuous Performance Monitoring of a Distributed Application [CON4730]
Continuous Performance Monitoring of a Distributed Application [CON4730]Continuous Performance Monitoring of a Distributed Application [CON4730]
Continuous Performance Monitoring of a Distributed Application [CON4730]
 
Batch Applications for Java Platform 1.0: Java EE 7 and GlassFish
Batch Applications for Java Platform 1.0: Java EE 7 and GlassFishBatch Applications for Java Platform 1.0: Java EE 7 and GlassFish
Batch Applications for Java Platform 1.0: Java EE 7 and GlassFish
 
Why Upgrade to Oracle Database 12c?
Why Upgrade to Oracle Database 12c?Why Upgrade to Oracle Database 12c?
Why Upgrade to Oracle Database 12c?
 

Recently uploaded

Call Girls in New Friends Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in New Friends Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls in New Friends Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in New Friends Colony Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Call Numbe 9892124323, Vashi call girls, Juhu Call Girls, Powai Call Girls Se...
Call Numbe 9892124323, Vashi call girls, Juhu Call Girls, Powai Call Girls Se...Call Numbe 9892124323, Vashi call girls, Juhu Call Girls, Powai Call Girls Se...
Call Numbe 9892124323, Vashi call girls, Juhu Call Girls, Powai Call Girls Se...Pooja Nehwal
 
Call Girls In Panipat 08860008073 ✨Top Call Girl Service Panipat Escorts
Call Girls In Panipat 08860008073 ✨Top Call Girl Service Panipat EscortsCall Girls In Panipat 08860008073 ✨Top Call Girl Service Panipat Escorts
Call Girls In Panipat 08860008073 ✨Top Call Girl Service Panipat EscortsApsara Of India
 
Mushkan 8126941651 Call Girls Servicein Jammu
Mushkan 8126941651 Call Girls Servicein JammuMushkan 8126941651 Call Girls Servicein Jammu
Mushkan 8126941651 Call Girls Servicein Jammujaanseema653
 
Call Girls {Delhi Meet Payal Pitampura} 9711199012 Indepedemt Girls Delhi
Call Girls {Delhi Meet Payal Pitampura} 9711199012 Indepedemt Girls DelhiCall Girls {Delhi Meet Payal Pitampura} 9711199012 Indepedemt Girls Delhi
Call Girls {Delhi Meet Payal Pitampura} 9711199012 Indepedemt Girls DelhiMs Riya
 
Panipat Call Girls in Five Star Services Call 08860008073
Panipat Call Girls in Five Star Services Call 08860008073 Panipat Call Girls in Five Star Services Call 08860008073
Panipat Call Girls in Five Star Services Call 08860008073 Apsara Of India
 
9990771857 Call Girls in Noida Sector 05 Noida (Call Girls) Delhi
9990771857 Call Girls in Noida Sector 05 Noida (Call Girls) Delhi9990771857 Call Girls in Noida Sector 05 Noida (Call Girls) Delhi
9990771857 Call Girls in Noida Sector 05 Noida (Call Girls) Delhidelhimodel235
 
KALENDAR KUDA 2024 Hi resolution cuti umum.pdf
KALENDAR KUDA 2024 Hi resolution cuti umum.pdfKALENDAR KUDA 2024 Hi resolution cuti umum.pdf
KALENDAR KUDA 2024 Hi resolution cuti umum.pdfSallamSulaiman
 
Independent Call Girls Delhi ~9711199012~ Call Me
Independent Call Girls Delhi ~9711199012~ Call MeIndependent Call Girls Delhi ~9711199012~ Call Me
Independent Call Girls Delhi ~9711199012~ Call MeMs Riya
 
‘I think I might die if I made it’ 'There were no singles'
‘I think I might die if I made it’ 'There were no singles'‘I think I might die if I made it’ 'There were no singles'
‘I think I might die if I made it’ 'There were no singles'cakepearls Official
 
Mumbai Call Girls Andheri East WhatsApp 9167673311 💞 Full Night Enjoy Pooja M...
Mumbai Call Girls Andheri East WhatsApp 9167673311 💞 Full Night Enjoy Pooja M...Mumbai Call Girls Andheri East WhatsApp 9167673311 💞 Full Night Enjoy Pooja M...
Mumbai Call Girls Andheri East WhatsApp 9167673311 💞 Full Night Enjoy Pooja M...Pooja Nehwal
 
Call Girls In Karol Bagh__ 8448079011 Escort Service in Delhi
Call Girls In Karol Bagh__ 8448079011 Escort Service in DelhiCall Girls In Karol Bagh__ 8448079011 Escort Service in Delhi
Call Girls In Karol Bagh__ 8448079011 Escort Service in DelhiRaviSingh594208
 
Manisha Rani Net Worth 2024 Biography.pdf
Manisha Rani Net Worth 2024 Biography.pdfManisha Rani Net Worth 2024 Biography.pdf
Manisha Rani Net Worth 2024 Biography.pdfkigaya33
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Bhikaji Cama Palace | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Bhikaji Cama Palace | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Bhikaji Cama Palace | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Bhikaji Cama Palace | Delhisoniya singh
 
AliExpress Clothing Brand Media Planning
AliExpress Clothing Brand Media PlanningAliExpress Clothing Brand Media Planning
AliExpress Clothing Brand Media Planningjen_giacalone
 
Dubai Call Girls Big Tit Wives O528786472 Call Girls Dubai
Dubai Call Girls Big Tit Wives O528786472 Call Girls DubaiDubai Call Girls Big Tit Wives O528786472 Call Girls Dubai
Dubai Call Girls Big Tit Wives O528786472 Call Girls Dubaihf8803863
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Jama Masjid | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Jama Masjid | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Jama Masjid | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Jama Masjid | Delhisoniya singh
 
Dubai Call Girls O528786472 Call Girls Dubai OL
Dubai Call Girls O528786472 Call Girls Dubai OLDubai Call Girls O528786472 Call Girls Dubai OL
Dubai Call Girls O528786472 Call Girls Dubai OLhf8803863
 

Recently uploaded (20)

Call Girls in New Friends Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in New Friends Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls in New Friends Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in New Friends Colony Delhi 💯Call Us 🔝8264348440🔝
 
Call Numbe 9892124323, Vashi call girls, Juhu Call Girls, Powai Call Girls Se...
Call Numbe 9892124323, Vashi call girls, Juhu Call Girls, Powai Call Girls Se...Call Numbe 9892124323, Vashi call girls, Juhu Call Girls, Powai Call Girls Se...
Call Numbe 9892124323, Vashi call girls, Juhu Call Girls, Powai Call Girls Se...
 
Call Girls In Panipat 08860008073 ✨Top Call Girl Service Panipat Escorts
Call Girls In Panipat 08860008073 ✨Top Call Girl Service Panipat EscortsCall Girls In Panipat 08860008073 ✨Top Call Girl Service Panipat Escorts
Call Girls In Panipat 08860008073 ✨Top Call Girl Service Panipat Escorts
 
Russian Call Girls Rohini Sector 25 💓 Delhi 9999965857 @Sabina Modi VVIP MODE...
Russian Call Girls Rohini Sector 25 💓 Delhi 9999965857 @Sabina Modi VVIP MODE...Russian Call Girls Rohini Sector 25 💓 Delhi 9999965857 @Sabina Modi VVIP MODE...
Russian Call Girls Rohini Sector 25 💓 Delhi 9999965857 @Sabina Modi VVIP MODE...
 
Mushkan 8126941651 Call Girls Servicein Jammu
Mushkan 8126941651 Call Girls Servicein JammuMushkan 8126941651 Call Girls Servicein Jammu
Mushkan 8126941651 Call Girls Servicein Jammu
 
Call Girls {Delhi Meet Payal Pitampura} 9711199012 Indepedemt Girls Delhi
Call Girls {Delhi Meet Payal Pitampura} 9711199012 Indepedemt Girls DelhiCall Girls {Delhi Meet Payal Pitampura} 9711199012 Indepedemt Girls Delhi
Call Girls {Delhi Meet Payal Pitampura} 9711199012 Indepedemt Girls Delhi
 
Panipat Call Girls in Five Star Services Call 08860008073
Panipat Call Girls in Five Star Services Call 08860008073 Panipat Call Girls in Five Star Services Call 08860008073
Panipat Call Girls in Five Star Services Call 08860008073
 
9990771857 Call Girls in Noida Sector 05 Noida (Call Girls) Delhi
9990771857 Call Girls in Noida Sector 05 Noida (Call Girls) Delhi9990771857 Call Girls in Noida Sector 05 Noida (Call Girls) Delhi
9990771857 Call Girls in Noida Sector 05 Noida (Call Girls) Delhi
 
KALENDAR KUDA 2024 Hi resolution cuti umum.pdf
KALENDAR KUDA 2024 Hi resolution cuti umum.pdfKALENDAR KUDA 2024 Hi resolution cuti umum.pdf
KALENDAR KUDA 2024 Hi resolution cuti umum.pdf
 
Independent Call Girls Delhi ~9711199012~ Call Me
Independent Call Girls Delhi ~9711199012~ Call MeIndependent Call Girls Delhi ~9711199012~ Call Me
Independent Call Girls Delhi ~9711199012~ Call Me
 
‘I think I might die if I made it’ 'There were no singles'
‘I think I might die if I made it’ 'There were no singles'‘I think I might die if I made it’ 'There were no singles'
‘I think I might die if I made it’ 'There were no singles'
 
Mumbai Call Girls Andheri East WhatsApp 9167673311 💞 Full Night Enjoy Pooja M...
Mumbai Call Girls Andheri East WhatsApp 9167673311 💞 Full Night Enjoy Pooja M...Mumbai Call Girls Andheri East WhatsApp 9167673311 💞 Full Night Enjoy Pooja M...
Mumbai Call Girls Andheri East WhatsApp 9167673311 💞 Full Night Enjoy Pooja M...
 
Call Girls In Karol Bagh__ 8448079011 Escort Service in Delhi
Call Girls In Karol Bagh__ 8448079011 Escort Service in DelhiCall Girls In Karol Bagh__ 8448079011 Escort Service in Delhi
Call Girls In Karol Bagh__ 8448079011 Escort Service in Delhi
 
Manisha Rani Net Worth 2024 Biography.pdf
Manisha Rani Net Worth 2024 Biography.pdfManisha Rani Net Worth 2024 Biography.pdf
Manisha Rani Net Worth 2024 Biography.pdf
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Bhikaji Cama Palace | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Bhikaji Cama Palace | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Bhikaji Cama Palace | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Bhikaji Cama Palace | Delhi
 
AliExpress Clothing Brand Media Planning
AliExpress Clothing Brand Media PlanningAliExpress Clothing Brand Media Planning
AliExpress Clothing Brand Media Planning
 
Hauz Khas Call Girls Delhi ✌️Independent Escort Service 💕 Hot Model's 9999965857
Hauz Khas Call Girls Delhi ✌️Independent Escort Service 💕 Hot Model's 9999965857Hauz Khas Call Girls Delhi ✌️Independent Escort Service 💕 Hot Model's 9999965857
Hauz Khas Call Girls Delhi ✌️Independent Escort Service 💕 Hot Model's 9999965857
 
Dubai Call Girls Big Tit Wives O528786472 Call Girls Dubai
Dubai Call Girls Big Tit Wives O528786472 Call Girls DubaiDubai Call Girls Big Tit Wives O528786472 Call Girls Dubai
Dubai Call Girls Big Tit Wives O528786472 Call Girls Dubai
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Jama Masjid | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Jama Masjid | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Jama Masjid | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Jama Masjid | Delhi
 
Dubai Call Girls O528786472 Call Girls Dubai OL
Dubai Call Girls O528786472 Call Girls Dubai OLDubai Call Girls O528786472 Call Girls Dubai OL
Dubai Call Girls O528786472 Call Girls Dubai OL
 

OSI_MySQL_Performance Schema

  • 1. <Insert Picture Here> MySQL Performance Schema (OSI, 14th Oct, 2012) Mayank Prasad Sr. Software Engineer, MySQL-Oracle
  • 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 decision. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle. 2Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 3. Agenda  What is Performance Schema  Origin and Development  Design  Configuration  Server Variables and Status Variables  Tables in Performance Schema  An Example  Benefits of Performance Schema  Drawbacks of Performance Schema  What's new in MySQL-5.6  Q/A.  Reference 3Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 4. Why Performance Schema ??  End user: why is my session stuck ?  MySQL developer: why is this code contended ?  App developer: why is my application slow ?  DBA: why is this table hot ?  Storage: why is this disk spinning ?  Network: why is this link traffic high ?  System: why is the global throughput low ? 4Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 5. What is Performance Schema Performance Schema is a mechanism to give user a consolidated view in a tabular format of what is happening behind the scene when MySQL Server is running. Information stored in tables. Can be accessed using SQL interface. Not persistent tables i.e. not stored on disk. Once server is stopped, all information in PS tables is gone. 5Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 6. Origin and Development Development was started by Marc Alff and Peter Gulutzan in 2008. First introduced in MySQL-5.5 with minimal functionality. Since then development is on full pace. Next plan GA is MySQL-5.6 with number of new features introduced. 6Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 7. Design A new storage Engine : Performance Schema. A new database : Performance Schema (with hard-coded DDL). Instruments and instrumentation points in code. Consumers. Tracking events (Wait, Stage, Statements, Idle). Timings. Dynamic configuration for instruments/consumers. 7Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 8. Design : Instrumentation 8Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 9. Design : Instrumentation contd. Instrumentation for :  I/O operations (File I/O, Table I/O, NET I/O)  Locking (mutex, rwlocks, table locks)  Waits  Statements  Stages  and so on ... 9Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 10. Design : Event Waits Instrumentation Monitored wait events. Tables & Summary tables. Instruments naming convention: wait/io/file|socket|table wait/lock wait/synch/cond|mutex|rwlock 10Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 11. Design : Event Wait Instrumentation contd. 11Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 12. Design : Event Stage Instrumentation Instrumented stage events. Tables and Summary Tables. Instruments naming convention: stage/<code_area>/<stage_name 12Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 13. Design : Event Stage Instrumentation contd. 13Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 14. Design : Event Statements Instrumentation Instrumented statement events. Tables and Summary Tables. Instruments naming convention: statement/com|sql 14Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 15. Design : Event Statements Instrumentation contd. 15Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 16. Nested Events Statement Stage Wait sync, lock, i/o 16Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 17. Nested Events contd. 17Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 18. Design : Timings Available timers. Timers setup in Performance Schema. Configurable option for any instrument to be timed. 18Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 19. Configuration Compile time: -DWITH_PERFSCHEMA_STORAGE_ENGINE=1 Server start-up: (enabled in 5.6 by default) From configuration file: [mysqld] performance_schema=ON/1 performance_schema_consumers_<consumer_name>=on/true/1 performance_schema_events_waits_history_size=<some_number> performance_schema_instruments='<instrument_name=on/true/1' From command line: l --<all_above_options> Runtime: Update performance_schema.setup_consumers set ENABLED='YES' where NAME='events_waits_history'; 19Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 20. Server Variables Variables values at the run time. 20Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 21. Status Variables Status information of Performance Schema at run time. Used to inspect lost information. 21Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 22. Tables in Performance Schema Total 52 tables (only 17 in 5.5) Main category: l setup_tables l Instance_tables l wait_events_tables l stage_events_tables l statement_event_tables l connection_tables l connection_attribute_tables l summary_tables l miscellaneous_tables 22Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 23. Tables in Performance Schema contd. setup_consumers 23Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 24. Tables in Performance Schema contd. setup_instruments 24Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 25. Tables in Performance Schema contd. events_statements_summary_global_by_event_name 25Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 26. Example to use PS to diagnose an issue In a multi threaded scenario, thread_1 is stuck. l Find out what thread 1 is waiting for: l SELECT * FROM events_waits_current WHERE THREAD_ID = thread_1; Say thread1 is waiting for mutex_A (Column OBJECT_INSTANCE_BEGIN). l Find out who has taken mutex_A. l SELECT * FROM mutex_instances WHERE OBJECT_INSTANCE_BEGIN = mutex_A; thread_2 is holding mutex_A. (Column LOCKED_BY_THREAD_ID) l Find out what thread_2 is waiting for: l SELECT * FROM events_waits_current WHERE THREAD_ID = thread_2; 26Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 27. Benefits of Performance Schema l Great insight of a running MySQL server. l Good granularity of information (nested events). l Available irrespective of platforms. l User friendly with well known SQL interface. l Multiple summary tables to give consolidated view to user. l Can be configured to meet user's need at run time. 27Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 28. Drawbacks of Performance Schema Only drawback is impact on performance. Depends on PS configuration. All enable, noticeable hit. Improved significantly in 5.6 and enabled by default. Less then 5% with default instrumentation enabled. Getting better and better … 28Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 29. Whats new in MySQL-5.6 Instrumenting Table I/O. Instrumenting Table Lock. Instrumenting NET I/O. Instrumenting Stages. Instrumenting Statements. Multiple summary tables. Host cache. ... and many more. 29Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 30. Reference MySQL documentation: http://dev.mysql.com/doc/refman/5.6/en/performance-schema.html PS overhead analysis: http://dimitrik.free.fr/blog/archives/2012/06/mysql-performance-pfs-overhead-in-56.html Blogs : http://marcalff.blogspot.com/ http://www.markleith.co.uk/ 30Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
  • 32. MySQL at Glance OSI, October 12-14, Bangalore Sessions are happening at 10/12 Workshop “MySQL Performance Tuning” 10/13 Workshop “MySQL Cluster” 10/14 - 09:45-10:30 Keynote “The State Of The Dolphin” - 10:30-11:15 Session “MySQL Is Exciting Again” - 12:45-13:30 Session “Mysql 5.6 Optimizer Improvements” - 14:15-15:00 Panel Discussion “FOSS Fueled Innovation” - 15:45-16:30 Session “MySQL Cluster With A Mix & Match Of In-Memory Database & No SQL” - 16:30-17:15 Session “MySQL Performance Schema” Come and meet with MySQL Engineers and Experts and join us with “Live Workshop” at our booth!! 32Copyright © 2012, Oracle and/or its affiliates. All rights reserved.