SlideShare a Scribd company logo
1 of 68
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.Copyright © 2014, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 121
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12
2
MySQL 5.7:
Performance Schema Improvements
Mark Leith
Senior Software Development Manager
MySQL @ Oracle
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.3
Program Agenda
What is Performance Schema anyway?
Performance Schema in MySQL 5.5 & MySQL 5.6
Improvements made to date in MySQL 5.7
Things still to come
Questions (or ask along the way)
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.4
Know Your Audience
Using 5.1 (yes, still)?
Using 5.5 (but I’ll upgrade soon, honest)?
Using 5.6?
Using … 5.7?
Used Performance Schema?
#monitoringlove
#monitoringhate
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.5
What is Performance Schema anyway?
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.6
What is Performance Schema anyway?
Introduced in MySQL 5.5
A storage engine, built for recording instrumentation
– PERFORMANCE_SCHEMA
– Manages fixed buffers in memory with lock free hashes
– Real engine, unlike INFORMATION_SCHEMA
A database schema to expose the instrumentation
– performance_schema
A set of interfaces in the MySQL Server wrapping calls to trace
– i.e. pthread_mutex_lock() -> mysql_mutex_lock()
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.7
What is Performance Schema anyway?
Records latency of events that happen within the server
All latency exposed to picosecond precision
– Though tracked at different precisions internally
Also tracks other information as appropriate
– Bytes, source position, object metadata, etc.
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.8
Performance Schema in MySQL 5.5 & MySQL 5.6
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.9
Performance Schema in MySQL 5.5
Laid out the framework for instrumentation
Focused early on low level instruments
– Prove it could handle load, build from ground up
Not turned on by default, had some overhead issues
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.10
Performance Schema in MySQL 5.5
17 Tables
222 Instruments
Instrument Event Class
File IO wait/io/file/%
Mutexes wait/synch/mutex/%
Read/Write
Locks
wait/synch/rwlock/%
Conditions wait/synch/cond/%
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.11
Performance Schema in MySQL 5.5
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.12
Performance Schema in MySQL 5.6
Fixed lots of performance issues
Focused on bringing the instrumentation to the DBA / Developer
Statements / Statement Digests
Execution Stages
Object tracking (table / index IO, table locks)
Network IO
Turned on by default, with a subset of instrumentation disabled
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.13
Performance Schema in MySQL 5.6
52 Tables (+35)
545 Instruments (+323)
Instrument
Type
Event Class
Statements statement/%
Stages stage/%
Table IO wait/io/table/%
Table Locks wait/lock/table/%
Network IO wait/io/socket/%
Idle Timing idle
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.14
Performance Schema in MySQL 5.6
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.Copyright © 2014, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1215
“I really think Performance Schema overhead is reasonable for most
workloads. …
On my old server I got some 20.2K QPS with Performance Schema
Disabled and 19.4 QPS with Performance Schema enabled which is
overhead of less than 5%.
For most workloads paying 5% to have insight about what is
happening with the system is a very fair trade.”
Peter Zaitsev, CEO, Percona
http://www.mysqlperformanceblog.com/2014/02/11/performance_schema-vs-slow-query-log/
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.16
Improvements made to date in MySQL 5.7
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.Copyright © 2014, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12
Insert Picture Here
17
Memory Usage
Metadata Locking
Replication Configuration & Status
Prepared Statements
Transactions
Stored Programs
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.18
Improvements made to date in MySQL 5.7
75 Tables (+23)
784 Instruments (+239)
Instrument Type Event Class
Transactions transaction
Memory memory/%
Metadata Locks wait/lock/metadata/%
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.19
Improvements made to date in MySQL 5.7
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.20
WL#3249
PERFORMANCE SCHEMA, Instrument memory usage
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.Copyright © 2014, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1221
“Understanding where MySQL can allocate memory can help us to find
the cause in most cases. It is not as straightforward as it should be and
I‟m very hopeful future releases of MySQL, MariaDB or Drizzle bring
improvements in this space allowing us to see directly for what
purpose memory is allocated and so detect all kinds of memory usage
problems easier.”
Peter Zaitsev, CEO, Percona
http://www.mysqlperformanceblog.com/2012/03/21/troubleshooting-mysql-memory-usage/
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.22
Instrument memory usage
Added 212 different memory instrumentation types so far
Records current, high and low water marks of allocations
Does not track latency of memory allocation
5 new tables
memory_summary_by_account_by_event_name
memory_summary_by_host_by_event_name
memory_summary_by_thread_by_event_name
memory_summary_by_user_by_event_name
memory_summary_global_by_event_name
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.23
Instrument memory usage - global summary
mysql> SELECT * FROM sys.memory_global_by_current_allocatedG
*************************** 1. row ***************************
event_name: memory/performance_schema/internal_buffers
current_count: 60
current_alloc: 497.00 MiB
current_avg_alloc: 8.28 MiB
high_count: 60
high_alloc: 497.00 MiB
high_avg_alloc: 8.28 MiB
*************************** 2. row ***************************
event_name: memory/mysys/KEY_CACHE
current_count: 3
current_alloc: 8.00 MiB
current_avg_alloc: 2.67 MiB
high_count: 3
high_alloc: 8.00 MiB
high_avg_alloc: 2.67 MiB
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.24
Instrument memory usage - thread summaries
mysql> select * from memory_by_thread_by_current_allocatedG
*************************** 1. row ***************************
user: sql/main
current_count: 2407
current_alloc: 10.89 MiB
current_avg_alloc: 4.63 KiB
current_max_alloc: 8.00 MiB
total_allocated: 30.55 MiB
thread_id: 1
*************************** 2. row ***************************
user: mem@localhost
current_count: 1914
current_alloc: 1.50 MiB
current_avg_alloc: 824 bytes
current_max_alloc: 816.67 KiB
total_allocated: 9.25 GiB
thread_id: 4336
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.25
Instrument memory usage - thread details
mysql> SELECT event_name,
-> sys.format_bytes(current_number_of_bytes_used) AS current_used
-> FROM performance_schema.memory_summary_by_thread_by_event_name
-> WHERE thread_id = 24
-> ORDER BY current_number_of_bytes_used DESC;
+-----------------------------------------------------+--------------+
| event_name | current_used |
+-----------------------------------------------------+--------------+
| memory/sql/Filesort_buffer::sort_keys | 255.94 KiB |
| memory/sql/sp_head::main_mem_root | 103.64 KiB |
| memory/mysys/IO_CACHE | 64.05 KiB |
| memory/mysys/lf_dynarray | 46.17 KiB |
| memory/mysys/array_buffer | 24.20 KiB |
| memory/sql/thd::main_mem_root | 23.95 KiB |
| memory/sql/String::value | 16.13 KiB |
| memory/sql/TABLE | 9.44 KiB |
| memory/sql/TABLE_SHARE::mem_root | 8.70 KiB |
| memory/myisam/MI_INFO | 7.07 KiB |
| memory/sql/THD::transactions::mem_root | 4.02 KiB |
| memory/myisam/MYISAM_SHARE | 3.29 KiB |
…
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.26
Instrument memory usage - other details
Disabled by default
Still requires InnoDB instrumentation
UPDATE setup_instruments
SET enabled = „YES‟
WHERE name LIKE „memory/%‟;
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.27
WL#5879
PERFORMANCE SCHEMA, MDL lock instrumentation
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.Copyright © 2014, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1228
“Unfortunately, it‟s unlikely that I‟ll be able to create a reproducible test
case, because there‟s no way to actually see what is happening. I
hope that a future version of MySQL will include a more
comprehensive set of tables for inspecting locks, requests, and waits
at all layers of the server.”
Baron Schwartz, CEO, VividCortex
http://www.xaprb.com/blog/2012/08/28/debugging-metadata-locking-in-mysql-5-5/
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.29
MDL Lock Instrumentation
Added the wait/lock/metadata/sql/mdl instrument
2 new tables
metadata_locks
table_handles
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.30
Metadata Locks Table Structure
+-----------------------+---------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-----------------------+---------------------+------+-----+---------+-------+
| OBJECT_TYPE | varchar(64) | NO | | NULL | |
| OBJECT_SCHEMA | varchar(64) | YES | | NULL | |
| OBJECT_NAME | varchar(64) | YES | | NULL | |
| OBJECT_INSTANCE_BEGIN | bigint(20) unsigned | NO | | NULL | |
| LOCK_TYPE | varchar(32) | NO | | NULL | |
| LOCK_DURATION | varchar(32) | NO | | NULL | |
| LOCK_STATUS | varchar(32) | NO | | NULL | |
| SOURCE | varchar(64) | YES | | NULL | |
| OWNER_THREAD_ID | bigint(20) unsigned | YES | | NULL | |
| OWNER_EVENT_ID | bigint(20) unsigned | YES | | NULL | |
+-----------------------+---------------------+------+-----+---------+-------+
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.31
MDL Lock Instrumentation
OBJECT_TYPE
GLOBAL, SCHEMA, TABLE, FUNCTION, PROCEDURE, TRIGGER, EVENT,
COMMIT
LOCK_TYPE
INTENTION_EXCLUSIVE, SHARED, SHARED_HIGH_PRIO,
SHARED_READ, SHARED_WRITE, SHARED_UPGRADABLE,
SHARED_NO_WRITE, SHARED_NO_READ_WRITE, EXCLUSIVE
LOCK_DURATION
STATEMENT, TRANSACTION, EXPLICIT
LOCK_STATUS
PENDING, GRANTED, VICTIM, TIMEOUT, KILLED
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.32
Metadata Locks Table Structure
mysql> select object_type as scope, object_schema, object_name, lock_type, lock_duration, lock_status
-> from metadata_locks
-> order by object_type = 'global' desc, object_type = 'schema' desc,
-> object_type = 'table' desc, object_type = 'commit' desc;
+--------+--------------------+----------------+---------------------+---------------+-------------+
| scope | object_schema | object_name | lock_type | lock_duration | lock_status |
+--------+--------------------+----------------+---------------------+---------------+-------------+
| GLOBAL | NULL | NULL | SHARED | EXPLICIT | GRANTED |
| GLOBAL | NULL | NULL | INTENTION_EXCLUSIVE | STATEMENT | PENDING |
| GLOBAL | NULL | NULL | INTENTION_EXCLUSIVE | STATEMENT | PENDING |
| GLOBAL | NULL | NULL | INTENTION_EXCLUSIVE | STATEMENT | PENDING |
| GLOBAL | NULL | NULL | INTENTION_EXCLUSIVE | STATEMENT | PENDING |
| GLOBAL | NULL | NULL | INTENTION_EXCLUSIVE | STATEMENT | PENDING |
| GLOBAL | NULL | NULL | INTENTION_EXCLUSIVE | STATEMENT | PENDING |
| GLOBAL | NULL | NULL | INTENTION_EXCLUSIVE | STATEMENT | PENDING |
|
| TABLE | mem__events | action_logs | SHARED_READ | TRANSACTION | GRANTED |
| TABLE | mem__events | events | SHARED_READ | TRANSACTION | GRANTED |
| TABLE | performance_schema | metadata_locks | SHARED_READ | TRANSACTION | GRANTED |
| COMMIT | NULL | NULL | SHARED | EXPLICIT | GRANTED |
+--------+--------------------+----------------+---------------------+---------------+-------------+
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.33
WL#3656
PERFORMANCE SCHEMA table for
SHOW SLAVE STATUS
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.34
Replication Instrumentation
6 new tables
replication_connection_configuration
replication_connection_status
replication_execute_configuration
replication_execute_status
replication_execute_status_by_coordinator
replication_execute_status_by_worker
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.35
Replication Instrumentation
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.36
Replication Connection Configuration
mysql> select * from performance_schema.replication_connection_configurationG
*************************** 1. row ***************************
HOST: 127.0.0.1
PORT: 3306
USER: rpl
NETWORK_INTERFACE:
AUTO_POSITION: 1
SSL_ALLOWED: YES
SSL_CA_FILE:
SSL_CA_PATH:
SSL_CERTIFICATE:
SSL_CIPHER:
SSL_KEY:
SSL_VERIFY_SERVER_CERTIFICATE: YES
SSL_CRL_FILE:
SSL_CRL_PATH:
CONNECTION_RETRY_INTERVAL: 40
CONNECTION_RETRY_COUNT: 10
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.37
Replication Connection Status
mysql> select * from replication_connection_statusG
*************************** 1. row ***************************
SOURCE_UUID:
THREAD_ID: NULL
SERVICE_STATE: CONNECTING
RECEIVED_TRANSACTION_SET:
LAST_ERROR_NUMBER: 1045
LAST_ERROR_MESSAGE: error connecting to master 'repl@localhost:5613' - retry-
time: 60 retries: 1
LAST_ERROR_TIMESTAMP: 2014-04-02 05:41:20
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.38
Replication Execute Status
mysql> select * from replication_execute_status;
+---------------+-----------------+
| SERVICE_STATE | REMAINING_DELAY |
+---------------+-----------------+
| ON | NULL |
+---------------+-----------------+
Very high level overview of status
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.39
Replication Coordinator Status
mysql> select * from replication_execute_status_by_coordinatorG
*************************** 1. row ***************************
THREAD_ID: 1281
SERVICE_STATE: ON
LAST_ERROR_NUMBER: 0
LAST_ERROR_MESSAGE:
LAST_ERROR_TIMESTAMP: 0000-00-00 00:00:00
Status of Coordinator thread in multi-threaded replication
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.40
Replication Worker Status
mysql> select * from replication_execute_status_by_worker;
+-----------+-----------+---------------+-----------------------------------------+-------------------+--------------------+----------------------+
| WORKER_ID | THREAD_ID | SERVICE_STATE | LAST_SEEN_TRANSACTION | LAST_ERROR_NUMBER | LAST_ERROR_MESSAGE | LAST_ERROR_TIMESTAMP |
+-----------+-----------+---------------+-----------------------------------------+-------------------+--------------------+----------------------+
| 1 | 1282 | ON | | 0 | | 0000-00-00 00:00:00 |
| 2 | 1283 | ON | | 0 | | 0000-00-00 00:00:00 |
| 3 | 1284 | ON | | 0 | | 0000-00-00 00:00:00 |
| 4 | 1285 | ON | | 0 | | 0000-00-00 00:00:00 |
| 5 | 1286 | ON | | 0 | | 0000-00-00 00:00:00 |
| 6 | 1287 | ON | | 0 | | 0000-00-00 00:00:00 |
| 7 | 1288 | ON | | 0 | | 0000-00-00 00:00:00 |
| 8 | 1289 | ON | 181f2b36-a0b4-11e3-9ac7-1025863574a7:16 | 0 | | 0000-00-00 00:00:00 |
+-----------+-----------+---------------+-----------------------------------------+-------------------+--------------------+----------------------+
Status of worker threads within multi-threaded replication
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.41
WL#5768
PERFORMANCE SCHEMA, prepared statements
instrumentation
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.42
Prepared Statement Instrumentation
Instrumentation depends on already existing statement instruments
statement/com/prepare, statement/com/execute
statement/sql/prepare_sql, statement/sql/execute_sql
1 new table
prepared_statements_instances
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.43
Prepared Statement Instances
mysql> select * from performance_schema.prepared_statements_instancesG
*************************** 1. row ***************************
OBJECT_INSTANCE_BEGIN: 140198306602144
STATEMENT_ID: 1
STATEMENT_NAME: stmt1
SQL_TEXT: select * from test.t1
OWNER_THREAD_ID: 54003
OWNER_EVENT_ID: 935
OWNER_OBJECT_TYPE: NULL
OWNER_OBJECT_SCHEMA: NULL
OWNER_OBJECT_NAME: NULL
TIMER_PREPARE: 15386274000
COUNT_REPREPARE: 0
COUNT_EXECUTE: 1
SUM_TIMER_EXECUTE: 217699000
MIN_TIMER_EXECUTE: 217699000
AVG_TIMER_EXECUTE: 217699000
MAX_TIMER_EXECUTE: 217699000
SUM_LOCK_TIME: 0
SUM_ERRORS: 0
SUM_WARNINGS: 0
SUM_ROWS_AFFECTED: 0
SUM_ROWS_SENT: 0
SUM_ROWS_EXAMINED: 0
SUM_CREATED_TMP_DISK_TABLES: 0
SUM_CREATED_TMP_TABLES: 0
SUM_SELECT_FULL_JOIN: 0
SUM_SELECT_FULL_RANGE_JOIN: 0
SUM_SELECT_RANGE: 0
SUM_SELECT_RANGE_CHECK: 0
SUM_SELECT_SCAN: 0
SUM_SORT_MERGE_PASSES: 0
SUM_SORT_RANGE: 0
SUM_SORT_ROWS: 0
SUM_SORT_SCAN: 0
SUM_NO_INDEX_USED: 0
SUM_NO_GOOD_INDEX_USED: 0
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.44
WL#5864
PERFORMANCE SCHEMA, instrument
TRANSACTIONS
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.45
Replication Instrumentation
Added the transaction instrument
8 new tables
events_transactions_current
events_transactions_history
events_transactions_history_long
events_transactions_summary_by_account_by_event_name
events_transactions_summary_by_host_by_event_name
events_transactions_summary_by_thread_by_event_name
events_transactions_summary_by_user_by_event_name
events_transactions_summary_global_by_event_name
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.46
Transaction Instrumentation
Exposes details of transactions in raw or summary views
Show details such as
Transaction latency
Isolation levels
Auto commit
Savepoint info
GTID or transaction IDs
Link transactions to the statements within the transactions
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.47
Current Transaction Details
mysql> select * from events_transactions_currentG
*************************** 1. row ***************************
THREAD_ID: 1
EVENT_ID: 23733
END_EVENT_ID: 23742
EVENT_NAME: transaction
STATE: COMMITTED
TRX_ID: 281479898269256
GTID: NULL
XID: NULL
XA_STATE: NULL
SOURCE: handler.cc:1246
TIMER_START: 31140612726000
TIMER_END: 31140647445000
TIMER_WAIT: 34719000
ACCESS_MODE: READ WRITE
ISOLATION_LEVEL: REPEATABLE READ
AUTOCOMMIT: YES
NUMBER_OF_SAVEPOINTS: 0
NUMBER_OF_ROLLBACK_TO_SAVEPOINT: 0
NUMBER_OF_RELEASE_SAVEPOINT: 0
OBJECT_INSTANCE_BEGIN: NULL
NESTING_EVENT_ID: NULL
NESTING_EVENT_TYPE: NULL
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.48
Transaction Summary - per user
mysql> select * from events_transactions_summary_by_user_by_event_nameG
*************************** 1. row ***************************
USER: mem
EVENT_NAME: transaction
COUNT_STAR: 400044
SUM_TIMER_WAIT: 21208048458267000
MIN_TIMER_WAIT: 160744000
AVG_TIMER_WAIT: 53014289000
MAX_TIMER_WAIT: 24028520397000
COUNT_READ_WRITE: 400044
SUM_TIMER_READ_WRITE: 21208048458267000
MIN_TIMER_READ_WRITE: 160744000
AVG_TIMER_READ_WRITE: 53014289000
MAX_TIMER_READ_WRITE: 24028520397000
COUNT_READ_ONLY: 0
SUM_TIMER_READ_ONLY: 0
MIN_TIMER_READ_ONLY: 0
AVG_TIMER_READ_ONLY: 0
MAX_TIMER_READ_ONLY: 0
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.49
WL#5766
PERFORMANCE SCHEMA, stored programs
instrumentation
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.50
Stored Program Instrumentation
Tracks Stored Procedures, Stored Functions, Triggers and Events
Added 16 new statement/sp/% instruments
Expose the different work flows that stored programs use, such as
cursor operations, workflow controls etc.
Integrated in to the normal statement instrumentation
1 new tables
events_statements_summary_by_program
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.51
Stored Program Summary
mysql> select * from events_statements_summary_by_programG
*************************** 1. row ***************************
OBJECT_TYPE: PROCEDURE
OBJECT_SCHEMA: ps_demo
OBJECT_NAME: ps_demo_proc
COUNT_STAR: 1
SUM_TIMER_WAIT: 6970931000
MIN_TIMER_WAIT: 6970931000
AVG_TIMER_WAIT: 6970931000
MAX_TIMER_WAIT: 6970931000
COUNT_STATEMENTS: 5
SUM_STATEMENTS_WAIT: 6802181000
MIN_STATEMENTS_WAIT: 16372000
AVG_STATEMENTS_WAIT: 1360436000
MAX_STATEMENTS_WAIT: 6484366000
SUM_LOCK_TIME: 176401000000
SUM_ERRORS: 0
SUM_WARNINGS: 0
SUM_ROWS_AFFECTED: 1
SUM_ROWS_SENT: 0
SUM_ROWS_EXAMINED: 1
SUM_CREATED_TMP_DISK_TABLES: 0
SUM_CREATED_TMP_TABLES: 0
SUM_SELECT_FULL_JOIN: 0
SUM_SELECT_FULL_RANGE_JOIN: 0
SUM_SELECT_RANGE: 0
SUM_SELECT_RANGE_CHECK: 0
SUM_SELECT_SCAN: 0
SUM_SORT_MERGE_PASSES: 0
SUM_SORT_RANGE: 0
SUM_SORT_ROWS: 0
SUM_SORT_SCAN: 0
SUM_NO_INDEX_USED: 0
SUM_NO_GOOD_INDEX_USED: 0
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.52
Stored Program Instrumentation
Like Transaction instrumentation, stored programs link to the
statements within them, or even link to transactions within them,
which in turn link to their statements
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.53
Full Hierarchy of New Instrumentation
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1254
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1255
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1256
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1257
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1258
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1259
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.60
Things still to come
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.61
Status / Variable Instrumentation
Deprecate I_S.[GLOBAL|SESSION]_[STATUS|VARIABLES]
Replace with tables that show true state / aggregates
Per thread, user, host, account
See session statistics or configuration individually
Improve SHOW commands to only show appropriate variables
SHOW SESSION STATUS to only show session specific items
Backwards compatibility switch available
Less internal mutex contention for polling status
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.62
Further Replication Statistics
Redesigned lag monitoring
Consistently check lag across a replication chain
Further statistics on load of the replication threads
Queue lengths
Event counting
Busy times
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.63
Stage Progress Tracking
View the progress of longer stages of execution
Extends stage tables with “estimate” and “completed” columns
Bounded (“estimated”) or unbounded (only “completed” filled in)
Units depend on stage
stage/sql/copy to tmp table - 130 (rows) completed
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.64
Performance Schema Indexes
Add indexes for the PERFORMANCE_SCHEMA engine
Index key search fields across the schema
Will alleviate processing overhead for queries
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.65
Continued focus …
On performance!
On filling missing instrumentation points!
On consolidating instrumentation within Performance schema!
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.66
The preceding 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.
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12
67
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12
68

More Related Content

What's hot

MySQL for Oracle DBAs
MySQL for Oracle DBAsMySQL for Oracle DBAs
MySQL for Oracle DBAsMark Leith
 
MySQL sys schema deep dive
MySQL sys schema deep diveMySQL sys schema deep dive
MySQL sys schema deep diveMark Leith
 
MySQL's Performance Schema, SYS Schema and Workbench Integration
MySQL's Performance Schema, SYS Schema and Workbench IntegrationMySQL's Performance Schema, SYS Schema and Workbench Integration
MySQL's Performance Schema, SYS Schema and Workbench IntegrationMario Beck
 
MySQL Monitoring Mechanisms
MySQL Monitoring MechanismsMySQL Monitoring Mechanisms
MySQL Monitoring MechanismsMark Leith
 
Mysql tech day_paris_ps_and_sys
Mysql tech day_paris_ps_and_sysMysql tech day_paris_ps_and_sys
Mysql tech day_paris_ps_and_sysMark Leith
 
MySQL Monitoring Mechanisms
MySQL Monitoring MechanismsMySQL Monitoring Mechanisms
MySQL Monitoring MechanismsMark Leith
 
Developing Information Schema Plugins
Developing Information Schema PluginsDeveloping Information Schema Plugins
Developing Information Schema PluginsMark Leith
 
Extending MySQL Enterprise Monitor
Extending MySQL Enterprise MonitorExtending MySQL Enterprise Monitor
Extending MySQL Enterprise MonitorMark Leith
 
Basic MySQL Troubleshooting for Oracle DBAs
Basic MySQL Troubleshooting for Oracle DBAsBasic MySQL Troubleshooting for Oracle DBAs
Basic MySQL Troubleshooting for Oracle DBAsSveta Smirnova
 
Double the Performance of Oracle SOA Suite 11g? Absolutely!
Double the Performance of Oracle SOA Suite 11g? Absolutely!Double the Performance of Oracle SOA Suite 11g? Absolutely!
Double the Performance of Oracle SOA Suite 11g? Absolutely!Revelation Technologies
 
Oracle Enterprise Manager Cloud Control 13c for DBAs
Oracle Enterprise Manager Cloud Control 13c for DBAsOracle Enterprise Manager Cloud Control 13c for DBAs
Oracle Enterprise Manager Cloud Control 13c for DBAsGokhan Atil
 
MySQL Enterprise Backup - BnR Scenarios
MySQL Enterprise Backup - BnR ScenariosMySQL Enterprise Backup - BnR Scenarios
MySQL Enterprise Backup - BnR ScenariosKeith Hollman
 
Oracle Failover Database Cluster with Grid Infrastructure 12c
Oracle Failover Database Cluster with Grid Infrastructure 12cOracle Failover Database Cluster with Grid Infrastructure 12c
Oracle Failover Database Cluster with Grid Infrastructure 12cTrivadis
 
OUGLS 2016: Guided Tour On The MySQL Source Code
OUGLS 2016: Guided Tour On The MySQL Source CodeOUGLS 2016: Guided Tour On The MySQL Source Code
OUGLS 2016: Guided Tour On The MySQL Source CodeGeorgi Kodinov
 
MySQL Troubleshooting with the Performance Schema
MySQL Troubleshooting with the Performance SchemaMySQL Troubleshooting with the Performance Schema
MySQL Troubleshooting with the Performance SchemaSveta Smirnova
 
Posscon my sql56
Posscon my sql56Posscon my sql56
Posscon my sql56Dave Stokes
 
Oracle - Enterprise Manager 12c Overview
Oracle - Enterprise Manager 12c OverviewOracle - Enterprise Manager 12c Overview
Oracle - Enterprise Manager 12c OverviewFred Sim
 
EM12c Monitoring, Metric Extensions and Performance Pages
EM12c Monitoring, Metric Extensions and Performance PagesEM12c Monitoring, Metric Extensions and Performance Pages
EM12c Monitoring, Metric Extensions and Performance PagesEnkitec
 

What's hot (20)

MySQL for Oracle DBAs
MySQL for Oracle DBAsMySQL for Oracle DBAs
MySQL for Oracle DBAs
 
MySQL sys schema deep dive
MySQL sys schema deep diveMySQL sys schema deep dive
MySQL sys schema deep dive
 
MySQL's Performance Schema, SYS Schema and Workbench Integration
MySQL's Performance Schema, SYS Schema and Workbench IntegrationMySQL's Performance Schema, SYS Schema and Workbench Integration
MySQL's Performance Schema, SYS Schema and Workbench Integration
 
MySQL Monitoring Mechanisms
MySQL Monitoring MechanismsMySQL Monitoring Mechanisms
MySQL Monitoring Mechanisms
 
Mysql tech day_paris_ps_and_sys
Mysql tech day_paris_ps_and_sysMysql tech day_paris_ps_and_sys
Mysql tech day_paris_ps_and_sys
 
MySQL Monitoring Mechanisms
MySQL Monitoring MechanismsMySQL Monitoring Mechanisms
MySQL Monitoring Mechanisms
 
Developing Information Schema Plugins
Developing Information Schema PluginsDeveloping Information Schema Plugins
Developing Information Schema Plugins
 
Extending MySQL Enterprise Monitor
Extending MySQL Enterprise MonitorExtending MySQL Enterprise Monitor
Extending MySQL Enterprise Monitor
 
Basic MySQL Troubleshooting for Oracle DBAs
Basic MySQL Troubleshooting for Oracle DBAsBasic MySQL Troubleshooting for Oracle DBAs
Basic MySQL Troubleshooting for Oracle DBAs
 
Double the Performance of Oracle SOA Suite 11g? Absolutely!
Double the Performance of Oracle SOA Suite 11g? Absolutely!Double the Performance of Oracle SOA Suite 11g? Absolutely!
Double the Performance of Oracle SOA Suite 11g? Absolutely!
 
What's next after Upgrade to 12c
What's next after Upgrade to 12cWhat's next after Upgrade to 12c
What's next after Upgrade to 12c
 
Enterprise manager 13c
Enterprise manager 13cEnterprise manager 13c
Enterprise manager 13c
 
Oracle Enterprise Manager Cloud Control 13c for DBAs
Oracle Enterprise Manager Cloud Control 13c for DBAsOracle Enterprise Manager Cloud Control 13c for DBAs
Oracle Enterprise Manager Cloud Control 13c for DBAs
 
MySQL Enterprise Backup - BnR Scenarios
MySQL Enterprise Backup - BnR ScenariosMySQL Enterprise Backup - BnR Scenarios
MySQL Enterprise Backup - BnR Scenarios
 
Oracle Failover Database Cluster with Grid Infrastructure 12c
Oracle Failover Database Cluster with Grid Infrastructure 12cOracle Failover Database Cluster with Grid Infrastructure 12c
Oracle Failover Database Cluster with Grid Infrastructure 12c
 
OUGLS 2016: Guided Tour On The MySQL Source Code
OUGLS 2016: Guided Tour On The MySQL Source CodeOUGLS 2016: Guided Tour On The MySQL Source Code
OUGLS 2016: Guided Tour On The MySQL Source Code
 
MySQL Troubleshooting with the Performance Schema
MySQL Troubleshooting with the Performance SchemaMySQL Troubleshooting with the Performance Schema
MySQL Troubleshooting with the Performance Schema
 
Posscon my sql56
Posscon my sql56Posscon my sql56
Posscon my sql56
 
Oracle - Enterprise Manager 12c Overview
Oracle - Enterprise Manager 12c OverviewOracle - Enterprise Manager 12c Overview
Oracle - Enterprise Manager 12c Overview
 
EM12c Monitoring, Metric Extensions and Performance Pages
EM12c Monitoring, Metric Extensions and Performance PagesEM12c Monitoring, Metric Extensions and Performance Pages
EM12c Monitoring, Metric Extensions and Performance Pages
 

Viewers also liked

MySQL Performance Metrics that Matter
MySQL Performance Metrics that MatterMySQL Performance Metrics that Matter
MySQL Performance Metrics that MatterMorgan Tocker
 
MySQL sys schema deep dive
MySQL sys schema deep diveMySQL sys schema deep dive
MySQL sys schema deep diveMark Leith
 
The Peoper Care and Feeding of a MySQL Server for Busy Linux Admin
The Peoper Care and Feeding of a MySQL Server for Busy Linux AdminThe Peoper Care and Feeding of a MySQL Server for Busy Linux Admin
The Peoper Care and Feeding of a MySQL Server for Busy Linux AdminDave Stokes
 
U C2007 My S Q L Performance Cookbook
U C2007  My S Q L  Performance  CookbookU C2007  My S Q L  Performance  Cookbook
U C2007 My S Q L Performance Cookbookguestae36d0
 
Mysql administration
Mysql administrationMysql administration
Mysql administrationbeben benzy
 
Making MySQL Administration a Breeze - A Look Into a MySQL DBA's Toolchest
Making MySQL Administration a Breeze - A Look Into a MySQL DBA's ToolchestMaking MySQL Administration a Breeze - A Look Into a MySQL DBA's Toolchest
Making MySQL Administration a Breeze - A Look Into a MySQL DBA's ToolchestLenz Grimmer
 
Managing MySQL with Ansible
Managing MySQL with AnsibleManaging MySQL with Ansible
Managing MySQL with AnsibleBen Mildren
 
MySQL Performance - SydPHP October 2011
MySQL Performance - SydPHP October 2011MySQL Performance - SydPHP October 2011
MySQL Performance - SydPHP October 2011Graham Weldon
 
The MySQL Performance Schema & New SYS Schema
The MySQL Performance Schema & New SYS SchemaThe MySQL Performance Schema & New SYS Schema
The MySQL Performance Schema & New SYS SchemaTed Wennmark
 

Viewers also liked (9)

MySQL Performance Metrics that Matter
MySQL Performance Metrics that MatterMySQL Performance Metrics that Matter
MySQL Performance Metrics that Matter
 
MySQL sys schema deep dive
MySQL sys schema deep diveMySQL sys schema deep dive
MySQL sys schema deep dive
 
The Peoper Care and Feeding of a MySQL Server for Busy Linux Admin
The Peoper Care and Feeding of a MySQL Server for Busy Linux AdminThe Peoper Care and Feeding of a MySQL Server for Busy Linux Admin
The Peoper Care and Feeding of a MySQL Server for Busy Linux Admin
 
U C2007 My S Q L Performance Cookbook
U C2007  My S Q L  Performance  CookbookU C2007  My S Q L  Performance  Cookbook
U C2007 My S Q L Performance Cookbook
 
Mysql administration
Mysql administrationMysql administration
Mysql administration
 
Making MySQL Administration a Breeze - A Look Into a MySQL DBA's Toolchest
Making MySQL Administration a Breeze - A Look Into a MySQL DBA's ToolchestMaking MySQL Administration a Breeze - A Look Into a MySQL DBA's Toolchest
Making MySQL Administration a Breeze - A Look Into a MySQL DBA's Toolchest
 
Managing MySQL with Ansible
Managing MySQL with AnsibleManaging MySQL with Ansible
Managing MySQL with Ansible
 
MySQL Performance - SydPHP October 2011
MySQL Performance - SydPHP October 2011MySQL Performance - SydPHP October 2011
MySQL Performance - SydPHP October 2011
 
The MySQL Performance Schema & New SYS Schema
The MySQL Performance Schema & New SYS SchemaThe MySQL Performance Schema & New SYS Schema
The MySQL Performance Schema & New SYS Schema
 

Similar to MySQL 5.7: Performance Schema Improvements

Mysql User Camp : 20th June - Mysql New Features
Mysql User Camp : 20th June - Mysql New FeaturesMysql User Camp : 20th June - Mysql New Features
Mysql User Camp : 20th June - Mysql New FeaturesTarique Saleem
 
Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support
 Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support
Mysql User Camp : 20-June-14 : Mysql New features and NoSQL SupportMysql User Camp
 
2014 OpenSuse Conf: Protect your MySQL Server
2014 OpenSuse Conf: Protect your MySQL Server2014 OpenSuse Conf: Protect your MySQL Server
2014 OpenSuse Conf: Protect your MySQL ServerGeorgi Kodinov
 
MySQL Manchester TT - Performance Tuning
MySQL Manchester TT  - Performance TuningMySQL Manchester TT  - Performance Tuning
MySQL Manchester TT - Performance TuningMark Swarbrick
 
MySQL Community and Commercial Edition
MySQL Community and Commercial EditionMySQL Community and Commercial Edition
MySQL Community and Commercial EditionMario Beck
 
Oracle Enterprise Manager for MySQL
Oracle Enterprise Manager for MySQLOracle Enterprise Manager for MySQL
Oracle Enterprise Manager for MySQLMario Beck
 
MySQL 5.7: What's New, Nov. 2015
MySQL 5.7: What's New, Nov. 2015MySQL 5.7: What's New, Nov. 2015
MySQL 5.7: What's New, Nov. 2015Mario Beck
 
10 Razões para Usar MySQL em Startups
10 Razões para Usar MySQL em Startups10 Razões para Usar MySQL em Startups
10 Razões para Usar MySQL em StartupsMySQL Brasil
 
MySQL Performance Schema : fossasia
MySQL Performance Schema : fossasiaMySQL Performance Schema : fossasia
MySQL Performance Schema : fossasiaMayank Prasad
 
MySQL Tech Tour 2015 - Manage & Tune
MySQL Tech Tour 2015 - Manage & TuneMySQL Tech Tour 2015 - Manage & Tune
MySQL Tech Tour 2015 - Manage & TuneMark Swarbrick
 
01 demystifying mysq-lfororacledbaanddeveloperv1
01 demystifying mysq-lfororacledbaanddeveloperv101 demystifying mysq-lfororacledbaanddeveloperv1
01 demystifying mysq-lfororacledbaanddeveloperv1Ivan Ma
 
MySQL The State of the Dolphin - jun15
MySQL The State of the Dolphin - jun15MySQL The State of the Dolphin - jun15
MySQL The State of the Dolphin - jun15MySQL Brasil
 
State of the Dolphin, at db tech showcase Osaka 2014
State of the Dolphin, at db tech showcase Osaka 2014State of the Dolphin, at db tech showcase Osaka 2014
State of the Dolphin, at db tech showcase Osaka 2014Ryusuke Kajiyama
 
MySQL Enterprise Monitor
MySQL Enterprise MonitorMySQL Enterprise Monitor
MySQL Enterprise MonitorMark Swarbrick
 
[B34] MySQL最新ロードマップ – MySQL 5.7とその先へ by Ryusuke Kajiyama
[B34] MySQL最新ロードマップ – MySQL 5.7とその先へ by Ryusuke Kajiyama[B34] MySQL最新ロードマップ – MySQL 5.7とその先へ by Ryusuke Kajiyama
[B34] MySQL最新ロードマップ – MySQL 5.7とその先へ by Ryusuke KajiyamaInsight Technology, Inc.
 
DataOps Barcelona - MySQL HA so easy... that's insane !
DataOps Barcelona - MySQL HA so easy... that's insane !DataOps Barcelona - MySQL HA so easy... that's insane !
DataOps Barcelona - MySQL HA so easy... that's insane !Frederic Descamps
 

Similar to MySQL 5.7: Performance Schema Improvements (20)

Mysql User Camp : 20th June - Mysql New Features
Mysql User Camp : 20th June - Mysql New FeaturesMysql User Camp : 20th June - Mysql New Features
Mysql User Camp : 20th June - Mysql New Features
 
Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support
 Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support
Mysql User Camp : 20-June-14 : Mysql New features and NoSQL Support
 
2014 OpenSuse Conf: Protect your MySQL Server
2014 OpenSuse Conf: Protect your MySQL Server2014 OpenSuse Conf: Protect your MySQL Server
2014 OpenSuse Conf: Protect your MySQL Server
 
MySQL NoSQL APIs
MySQL NoSQL APIsMySQL NoSQL APIs
MySQL NoSQL APIs
 
MySQL Quick Dive
MySQL Quick DiveMySQL Quick Dive
MySQL Quick Dive
 
MySQL Manchester TT - Performance Tuning
MySQL Manchester TT  - Performance TuningMySQL Manchester TT  - Performance Tuning
MySQL Manchester TT - Performance Tuning
 
MySQL Community and Commercial Edition
MySQL Community and Commercial EditionMySQL Community and Commercial Edition
MySQL Community and Commercial Edition
 
Oracle Enterprise Manager for MySQL
Oracle Enterprise Manager for MySQLOracle Enterprise Manager for MySQL
Oracle Enterprise Manager for MySQL
 
MySQL 5.7: What's New, Nov. 2015
MySQL 5.7: What's New, Nov. 2015MySQL 5.7: What's New, Nov. 2015
MySQL 5.7: What's New, Nov. 2015
 
10 Razões para Usar MySQL em Startups
10 Razões para Usar MySQL em Startups10 Razões para Usar MySQL em Startups
10 Razões para Usar MySQL em Startups
 
MySQL Performance Schema : fossasia
MySQL Performance Schema : fossasiaMySQL Performance Schema : fossasia
MySQL Performance Schema : fossasia
 
MySQL Tech Tour 2015 - Manage & Tune
MySQL Tech Tour 2015 - Manage & TuneMySQL Tech Tour 2015 - Manage & Tune
MySQL Tech Tour 2015 - Manage & Tune
 
01 demystifying mysq-lfororacledbaanddeveloperv1
01 demystifying mysq-lfororacledbaanddeveloperv101 demystifying mysq-lfororacledbaanddeveloperv1
01 demystifying mysq-lfororacledbaanddeveloperv1
 
MySQL The State of the Dolphin - jun15
MySQL The State of the Dolphin - jun15MySQL The State of the Dolphin - jun15
MySQL The State of the Dolphin - jun15
 
Marcin Szałowicz - MySQL Workbench
Marcin Szałowicz - MySQL WorkbenchMarcin Szałowicz - MySQL Workbench
Marcin Szałowicz - MySQL Workbench
 
State of the Dolphin, at db tech showcase Osaka 2014
State of the Dolphin, at db tech showcase Osaka 2014State of the Dolphin, at db tech showcase Osaka 2014
State of the Dolphin, at db tech showcase Osaka 2014
 
MySQL Tech Tour Nov, 2013
MySQL Tech Tour Nov, 2013MySQL Tech Tour Nov, 2013
MySQL Tech Tour Nov, 2013
 
MySQL Enterprise Monitor
MySQL Enterprise MonitorMySQL Enterprise Monitor
MySQL Enterprise Monitor
 
[B34] MySQL最新ロードマップ – MySQL 5.7とその先へ by Ryusuke Kajiyama
[B34] MySQL最新ロードマップ – MySQL 5.7とその先へ by Ryusuke Kajiyama[B34] MySQL最新ロードマップ – MySQL 5.7とその先へ by Ryusuke Kajiyama
[B34] MySQL最新ロードマップ – MySQL 5.7とその先へ by Ryusuke Kajiyama
 
DataOps Barcelona - MySQL HA so easy... that's insane !
DataOps Barcelona - MySQL HA so easy... that's insane !DataOps Barcelona - MySQL HA so easy... that's insane !
DataOps Barcelona - MySQL HA so easy... that's insane !
 

Recently uploaded

Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 

Recently uploaded (20)

Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 

MySQL 5.7: Performance Schema Improvements

  • 1. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.Copyright © 2014, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 121
  • 2. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 2 MySQL 5.7: Performance Schema Improvements Mark Leith Senior Software Development Manager MySQL @ Oracle
  • 3. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.3 Program Agenda What is Performance Schema anyway? Performance Schema in MySQL 5.5 & MySQL 5.6 Improvements made to date in MySQL 5.7 Things still to come Questions (or ask along the way)
  • 4. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.4 Know Your Audience Using 5.1 (yes, still)? Using 5.5 (but I’ll upgrade soon, honest)? Using 5.6? Using … 5.7? Used Performance Schema? #monitoringlove #monitoringhate
  • 5. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.5 What is Performance Schema anyway?
  • 6. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.6 What is Performance Schema anyway? Introduced in MySQL 5.5 A storage engine, built for recording instrumentation – PERFORMANCE_SCHEMA – Manages fixed buffers in memory with lock free hashes – Real engine, unlike INFORMATION_SCHEMA A database schema to expose the instrumentation – performance_schema A set of interfaces in the MySQL Server wrapping calls to trace – i.e. pthread_mutex_lock() -> mysql_mutex_lock()
  • 7. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.7 What is Performance Schema anyway? Records latency of events that happen within the server All latency exposed to picosecond precision – Though tracked at different precisions internally Also tracks other information as appropriate – Bytes, source position, object metadata, etc.
  • 8. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.8 Performance Schema in MySQL 5.5 & MySQL 5.6
  • 9. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.9 Performance Schema in MySQL 5.5 Laid out the framework for instrumentation Focused early on low level instruments – Prove it could handle load, build from ground up Not turned on by default, had some overhead issues
  • 10. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.10 Performance Schema in MySQL 5.5 17 Tables 222 Instruments Instrument Event Class File IO wait/io/file/% Mutexes wait/synch/mutex/% Read/Write Locks wait/synch/rwlock/% Conditions wait/synch/cond/%
  • 11. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.11 Performance Schema in MySQL 5.5
  • 12. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.12 Performance Schema in MySQL 5.6 Fixed lots of performance issues Focused on bringing the instrumentation to the DBA / Developer Statements / Statement Digests Execution Stages Object tracking (table / index IO, table locks) Network IO Turned on by default, with a subset of instrumentation disabled
  • 13. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.13 Performance Schema in MySQL 5.6 52 Tables (+35) 545 Instruments (+323) Instrument Type Event Class Statements statement/% Stages stage/% Table IO wait/io/table/% Table Locks wait/lock/table/% Network IO wait/io/socket/% Idle Timing idle
  • 14. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.14 Performance Schema in MySQL 5.6
  • 15. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.Copyright © 2014, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1215 “I really think Performance Schema overhead is reasonable for most workloads. … On my old server I got some 20.2K QPS with Performance Schema Disabled and 19.4 QPS with Performance Schema enabled which is overhead of less than 5%. For most workloads paying 5% to have insight about what is happening with the system is a very fair trade.” Peter Zaitsev, CEO, Percona http://www.mysqlperformanceblog.com/2014/02/11/performance_schema-vs-slow-query-log/
  • 16. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.16 Improvements made to date in MySQL 5.7
  • 17. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.Copyright © 2014, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 Insert Picture Here 17 Memory Usage Metadata Locking Replication Configuration & Status Prepared Statements Transactions Stored Programs
  • 18. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.18 Improvements made to date in MySQL 5.7 75 Tables (+23) 784 Instruments (+239) Instrument Type Event Class Transactions transaction Memory memory/% Metadata Locks wait/lock/metadata/%
  • 19. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.19 Improvements made to date in MySQL 5.7
  • 20. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.20 WL#3249 PERFORMANCE SCHEMA, Instrument memory usage
  • 21. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.Copyright © 2014, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1221 “Understanding where MySQL can allocate memory can help us to find the cause in most cases. It is not as straightforward as it should be and I‟m very hopeful future releases of MySQL, MariaDB or Drizzle bring improvements in this space allowing us to see directly for what purpose memory is allocated and so detect all kinds of memory usage problems easier.” Peter Zaitsev, CEO, Percona http://www.mysqlperformanceblog.com/2012/03/21/troubleshooting-mysql-memory-usage/
  • 22. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.22 Instrument memory usage Added 212 different memory instrumentation types so far Records current, high and low water marks of allocations Does not track latency of memory allocation 5 new tables memory_summary_by_account_by_event_name memory_summary_by_host_by_event_name memory_summary_by_thread_by_event_name memory_summary_by_user_by_event_name memory_summary_global_by_event_name
  • 23. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.23 Instrument memory usage - global summary mysql> SELECT * FROM sys.memory_global_by_current_allocatedG *************************** 1. row *************************** event_name: memory/performance_schema/internal_buffers current_count: 60 current_alloc: 497.00 MiB current_avg_alloc: 8.28 MiB high_count: 60 high_alloc: 497.00 MiB high_avg_alloc: 8.28 MiB *************************** 2. row *************************** event_name: memory/mysys/KEY_CACHE current_count: 3 current_alloc: 8.00 MiB current_avg_alloc: 2.67 MiB high_count: 3 high_alloc: 8.00 MiB high_avg_alloc: 2.67 MiB
  • 24. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.24 Instrument memory usage - thread summaries mysql> select * from memory_by_thread_by_current_allocatedG *************************** 1. row *************************** user: sql/main current_count: 2407 current_alloc: 10.89 MiB current_avg_alloc: 4.63 KiB current_max_alloc: 8.00 MiB total_allocated: 30.55 MiB thread_id: 1 *************************** 2. row *************************** user: mem@localhost current_count: 1914 current_alloc: 1.50 MiB current_avg_alloc: 824 bytes current_max_alloc: 816.67 KiB total_allocated: 9.25 GiB thread_id: 4336
  • 25. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.25 Instrument memory usage - thread details mysql> SELECT event_name, -> sys.format_bytes(current_number_of_bytes_used) AS current_used -> FROM performance_schema.memory_summary_by_thread_by_event_name -> WHERE thread_id = 24 -> ORDER BY current_number_of_bytes_used DESC; +-----------------------------------------------------+--------------+ | event_name | current_used | +-----------------------------------------------------+--------------+ | memory/sql/Filesort_buffer::sort_keys | 255.94 KiB | | memory/sql/sp_head::main_mem_root | 103.64 KiB | | memory/mysys/IO_CACHE | 64.05 KiB | | memory/mysys/lf_dynarray | 46.17 KiB | | memory/mysys/array_buffer | 24.20 KiB | | memory/sql/thd::main_mem_root | 23.95 KiB | | memory/sql/String::value | 16.13 KiB | | memory/sql/TABLE | 9.44 KiB | | memory/sql/TABLE_SHARE::mem_root | 8.70 KiB | | memory/myisam/MI_INFO | 7.07 KiB | | memory/sql/THD::transactions::mem_root | 4.02 KiB | | memory/myisam/MYISAM_SHARE | 3.29 KiB | …
  • 26. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.26 Instrument memory usage - other details Disabled by default Still requires InnoDB instrumentation UPDATE setup_instruments SET enabled = „YES‟ WHERE name LIKE „memory/%‟;
  • 27. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.27 WL#5879 PERFORMANCE SCHEMA, MDL lock instrumentation
  • 28. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.Copyright © 2014, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1228 “Unfortunately, it‟s unlikely that I‟ll be able to create a reproducible test case, because there‟s no way to actually see what is happening. I hope that a future version of MySQL will include a more comprehensive set of tables for inspecting locks, requests, and waits at all layers of the server.” Baron Schwartz, CEO, VividCortex http://www.xaprb.com/blog/2012/08/28/debugging-metadata-locking-in-mysql-5-5/
  • 29. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.29 MDL Lock Instrumentation Added the wait/lock/metadata/sql/mdl instrument 2 new tables metadata_locks table_handles
  • 30. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.30 Metadata Locks Table Structure +-----------------------+---------------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-----------------------+---------------------+------+-----+---------+-------+ | OBJECT_TYPE | varchar(64) | NO | | NULL | | | OBJECT_SCHEMA | varchar(64) | YES | | NULL | | | OBJECT_NAME | varchar(64) | YES | | NULL | | | OBJECT_INSTANCE_BEGIN | bigint(20) unsigned | NO | | NULL | | | LOCK_TYPE | varchar(32) | NO | | NULL | | | LOCK_DURATION | varchar(32) | NO | | NULL | | | LOCK_STATUS | varchar(32) | NO | | NULL | | | SOURCE | varchar(64) | YES | | NULL | | | OWNER_THREAD_ID | bigint(20) unsigned | YES | | NULL | | | OWNER_EVENT_ID | bigint(20) unsigned | YES | | NULL | | +-----------------------+---------------------+------+-----+---------+-------+
  • 31. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.31 MDL Lock Instrumentation OBJECT_TYPE GLOBAL, SCHEMA, TABLE, FUNCTION, PROCEDURE, TRIGGER, EVENT, COMMIT LOCK_TYPE INTENTION_EXCLUSIVE, SHARED, SHARED_HIGH_PRIO, SHARED_READ, SHARED_WRITE, SHARED_UPGRADABLE, SHARED_NO_WRITE, SHARED_NO_READ_WRITE, EXCLUSIVE LOCK_DURATION STATEMENT, TRANSACTION, EXPLICIT LOCK_STATUS PENDING, GRANTED, VICTIM, TIMEOUT, KILLED
  • 32. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.32 Metadata Locks Table Structure mysql> select object_type as scope, object_schema, object_name, lock_type, lock_duration, lock_status -> from metadata_locks -> order by object_type = 'global' desc, object_type = 'schema' desc, -> object_type = 'table' desc, object_type = 'commit' desc; +--------+--------------------+----------------+---------------------+---------------+-------------+ | scope | object_schema | object_name | lock_type | lock_duration | lock_status | +--------+--------------------+----------------+---------------------+---------------+-------------+ | GLOBAL | NULL | NULL | SHARED | EXPLICIT | GRANTED | | GLOBAL | NULL | NULL | INTENTION_EXCLUSIVE | STATEMENT | PENDING | | GLOBAL | NULL | NULL | INTENTION_EXCLUSIVE | STATEMENT | PENDING | | GLOBAL | NULL | NULL | INTENTION_EXCLUSIVE | STATEMENT | PENDING | | GLOBAL | NULL | NULL | INTENTION_EXCLUSIVE | STATEMENT | PENDING | | GLOBAL | NULL | NULL | INTENTION_EXCLUSIVE | STATEMENT | PENDING | | GLOBAL | NULL | NULL | INTENTION_EXCLUSIVE | STATEMENT | PENDING | | GLOBAL | NULL | NULL | INTENTION_EXCLUSIVE | STATEMENT | PENDING | | | TABLE | mem__events | action_logs | SHARED_READ | TRANSACTION | GRANTED | | TABLE | mem__events | events | SHARED_READ | TRANSACTION | GRANTED | | TABLE | performance_schema | metadata_locks | SHARED_READ | TRANSACTION | GRANTED | | COMMIT | NULL | NULL | SHARED | EXPLICIT | GRANTED | +--------+--------------------+----------------+---------------------+---------------+-------------+
  • 33. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.33 WL#3656 PERFORMANCE SCHEMA table for SHOW SLAVE STATUS
  • 34. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.34 Replication Instrumentation 6 new tables replication_connection_configuration replication_connection_status replication_execute_configuration replication_execute_status replication_execute_status_by_coordinator replication_execute_status_by_worker
  • 35. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.35 Replication Instrumentation
  • 36. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.36 Replication Connection Configuration mysql> select * from performance_schema.replication_connection_configurationG *************************** 1. row *************************** HOST: 127.0.0.1 PORT: 3306 USER: rpl NETWORK_INTERFACE: AUTO_POSITION: 1 SSL_ALLOWED: YES SSL_CA_FILE: SSL_CA_PATH: SSL_CERTIFICATE: SSL_CIPHER: SSL_KEY: SSL_VERIFY_SERVER_CERTIFICATE: YES SSL_CRL_FILE: SSL_CRL_PATH: CONNECTION_RETRY_INTERVAL: 40 CONNECTION_RETRY_COUNT: 10
  • 37. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.37 Replication Connection Status mysql> select * from replication_connection_statusG *************************** 1. row *************************** SOURCE_UUID: THREAD_ID: NULL SERVICE_STATE: CONNECTING RECEIVED_TRANSACTION_SET: LAST_ERROR_NUMBER: 1045 LAST_ERROR_MESSAGE: error connecting to master 'repl@localhost:5613' - retry- time: 60 retries: 1 LAST_ERROR_TIMESTAMP: 2014-04-02 05:41:20
  • 38. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.38 Replication Execute Status mysql> select * from replication_execute_status; +---------------+-----------------+ | SERVICE_STATE | REMAINING_DELAY | +---------------+-----------------+ | ON | NULL | +---------------+-----------------+ Very high level overview of status
  • 39. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.39 Replication Coordinator Status mysql> select * from replication_execute_status_by_coordinatorG *************************** 1. row *************************** THREAD_ID: 1281 SERVICE_STATE: ON LAST_ERROR_NUMBER: 0 LAST_ERROR_MESSAGE: LAST_ERROR_TIMESTAMP: 0000-00-00 00:00:00 Status of Coordinator thread in multi-threaded replication
  • 40. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.40 Replication Worker Status mysql> select * from replication_execute_status_by_worker; +-----------+-----------+---------------+-----------------------------------------+-------------------+--------------------+----------------------+ | WORKER_ID | THREAD_ID | SERVICE_STATE | LAST_SEEN_TRANSACTION | LAST_ERROR_NUMBER | LAST_ERROR_MESSAGE | LAST_ERROR_TIMESTAMP | +-----------+-----------+---------------+-----------------------------------------+-------------------+--------------------+----------------------+ | 1 | 1282 | ON | | 0 | | 0000-00-00 00:00:00 | | 2 | 1283 | ON | | 0 | | 0000-00-00 00:00:00 | | 3 | 1284 | ON | | 0 | | 0000-00-00 00:00:00 | | 4 | 1285 | ON | | 0 | | 0000-00-00 00:00:00 | | 5 | 1286 | ON | | 0 | | 0000-00-00 00:00:00 | | 6 | 1287 | ON | | 0 | | 0000-00-00 00:00:00 | | 7 | 1288 | ON | | 0 | | 0000-00-00 00:00:00 | | 8 | 1289 | ON | 181f2b36-a0b4-11e3-9ac7-1025863574a7:16 | 0 | | 0000-00-00 00:00:00 | +-----------+-----------+---------------+-----------------------------------------+-------------------+--------------------+----------------------+ Status of worker threads within multi-threaded replication
  • 41. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.41 WL#5768 PERFORMANCE SCHEMA, prepared statements instrumentation
  • 42. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.42 Prepared Statement Instrumentation Instrumentation depends on already existing statement instruments statement/com/prepare, statement/com/execute statement/sql/prepare_sql, statement/sql/execute_sql 1 new table prepared_statements_instances
  • 43. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.43 Prepared Statement Instances mysql> select * from performance_schema.prepared_statements_instancesG *************************** 1. row *************************** OBJECT_INSTANCE_BEGIN: 140198306602144 STATEMENT_ID: 1 STATEMENT_NAME: stmt1 SQL_TEXT: select * from test.t1 OWNER_THREAD_ID: 54003 OWNER_EVENT_ID: 935 OWNER_OBJECT_TYPE: NULL OWNER_OBJECT_SCHEMA: NULL OWNER_OBJECT_NAME: NULL TIMER_PREPARE: 15386274000 COUNT_REPREPARE: 0 COUNT_EXECUTE: 1 SUM_TIMER_EXECUTE: 217699000 MIN_TIMER_EXECUTE: 217699000 AVG_TIMER_EXECUTE: 217699000 MAX_TIMER_EXECUTE: 217699000 SUM_LOCK_TIME: 0 SUM_ERRORS: 0 SUM_WARNINGS: 0 SUM_ROWS_AFFECTED: 0 SUM_ROWS_SENT: 0 SUM_ROWS_EXAMINED: 0 SUM_CREATED_TMP_DISK_TABLES: 0 SUM_CREATED_TMP_TABLES: 0 SUM_SELECT_FULL_JOIN: 0 SUM_SELECT_FULL_RANGE_JOIN: 0 SUM_SELECT_RANGE: 0 SUM_SELECT_RANGE_CHECK: 0 SUM_SELECT_SCAN: 0 SUM_SORT_MERGE_PASSES: 0 SUM_SORT_RANGE: 0 SUM_SORT_ROWS: 0 SUM_SORT_SCAN: 0 SUM_NO_INDEX_USED: 0 SUM_NO_GOOD_INDEX_USED: 0
  • 44. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.44 WL#5864 PERFORMANCE SCHEMA, instrument TRANSACTIONS
  • 45. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.45 Replication Instrumentation Added the transaction instrument 8 new tables events_transactions_current events_transactions_history events_transactions_history_long events_transactions_summary_by_account_by_event_name events_transactions_summary_by_host_by_event_name events_transactions_summary_by_thread_by_event_name events_transactions_summary_by_user_by_event_name events_transactions_summary_global_by_event_name
  • 46. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.46 Transaction Instrumentation Exposes details of transactions in raw or summary views Show details such as Transaction latency Isolation levels Auto commit Savepoint info GTID or transaction IDs Link transactions to the statements within the transactions
  • 47. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.47 Current Transaction Details mysql> select * from events_transactions_currentG *************************** 1. row *************************** THREAD_ID: 1 EVENT_ID: 23733 END_EVENT_ID: 23742 EVENT_NAME: transaction STATE: COMMITTED TRX_ID: 281479898269256 GTID: NULL XID: NULL XA_STATE: NULL SOURCE: handler.cc:1246 TIMER_START: 31140612726000 TIMER_END: 31140647445000 TIMER_WAIT: 34719000 ACCESS_MODE: READ WRITE ISOLATION_LEVEL: REPEATABLE READ AUTOCOMMIT: YES NUMBER_OF_SAVEPOINTS: 0 NUMBER_OF_ROLLBACK_TO_SAVEPOINT: 0 NUMBER_OF_RELEASE_SAVEPOINT: 0 OBJECT_INSTANCE_BEGIN: NULL NESTING_EVENT_ID: NULL NESTING_EVENT_TYPE: NULL
  • 48. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.48 Transaction Summary - per user mysql> select * from events_transactions_summary_by_user_by_event_nameG *************************** 1. row *************************** USER: mem EVENT_NAME: transaction COUNT_STAR: 400044 SUM_TIMER_WAIT: 21208048458267000 MIN_TIMER_WAIT: 160744000 AVG_TIMER_WAIT: 53014289000 MAX_TIMER_WAIT: 24028520397000 COUNT_READ_WRITE: 400044 SUM_TIMER_READ_WRITE: 21208048458267000 MIN_TIMER_READ_WRITE: 160744000 AVG_TIMER_READ_WRITE: 53014289000 MAX_TIMER_READ_WRITE: 24028520397000 COUNT_READ_ONLY: 0 SUM_TIMER_READ_ONLY: 0 MIN_TIMER_READ_ONLY: 0 AVG_TIMER_READ_ONLY: 0 MAX_TIMER_READ_ONLY: 0
  • 49. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.49 WL#5766 PERFORMANCE SCHEMA, stored programs instrumentation
  • 50. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.50 Stored Program Instrumentation Tracks Stored Procedures, Stored Functions, Triggers and Events Added 16 new statement/sp/% instruments Expose the different work flows that stored programs use, such as cursor operations, workflow controls etc. Integrated in to the normal statement instrumentation 1 new tables events_statements_summary_by_program
  • 51. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.51 Stored Program Summary mysql> select * from events_statements_summary_by_programG *************************** 1. row *************************** OBJECT_TYPE: PROCEDURE OBJECT_SCHEMA: ps_demo OBJECT_NAME: ps_demo_proc COUNT_STAR: 1 SUM_TIMER_WAIT: 6970931000 MIN_TIMER_WAIT: 6970931000 AVG_TIMER_WAIT: 6970931000 MAX_TIMER_WAIT: 6970931000 COUNT_STATEMENTS: 5 SUM_STATEMENTS_WAIT: 6802181000 MIN_STATEMENTS_WAIT: 16372000 AVG_STATEMENTS_WAIT: 1360436000 MAX_STATEMENTS_WAIT: 6484366000 SUM_LOCK_TIME: 176401000000 SUM_ERRORS: 0 SUM_WARNINGS: 0 SUM_ROWS_AFFECTED: 1 SUM_ROWS_SENT: 0 SUM_ROWS_EXAMINED: 1 SUM_CREATED_TMP_DISK_TABLES: 0 SUM_CREATED_TMP_TABLES: 0 SUM_SELECT_FULL_JOIN: 0 SUM_SELECT_FULL_RANGE_JOIN: 0 SUM_SELECT_RANGE: 0 SUM_SELECT_RANGE_CHECK: 0 SUM_SELECT_SCAN: 0 SUM_SORT_MERGE_PASSES: 0 SUM_SORT_RANGE: 0 SUM_SORT_ROWS: 0 SUM_SORT_SCAN: 0 SUM_NO_INDEX_USED: 0 SUM_NO_GOOD_INDEX_USED: 0
  • 52. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.52 Stored Program Instrumentation Like Transaction instrumentation, stored programs link to the statements within them, or even link to transactions within them, which in turn link to their statements
  • 53. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.53 Full Hierarchy of New Instrumentation
  • 54. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1254
  • 55. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1255
  • 56. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1256
  • 57. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1257
  • 58. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1258
  • 59. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 1259
  • 60. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.60 Things still to come
  • 61. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.61 Status / Variable Instrumentation Deprecate I_S.[GLOBAL|SESSION]_[STATUS|VARIABLES] Replace with tables that show true state / aggregates Per thread, user, host, account See session statistics or configuration individually Improve SHOW commands to only show appropriate variables SHOW SESSION STATUS to only show session specific items Backwards compatibility switch available Less internal mutex contention for polling status
  • 62. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.62 Further Replication Statistics Redesigned lag monitoring Consistently check lag across a replication chain Further statistics on load of the replication threads Queue lengths Event counting Busy times
  • 63. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.63 Stage Progress Tracking View the progress of longer stages of execution Extends stage tables with “estimate” and “completed” columns Bounded (“estimated”) or unbounded (only “completed” filled in) Units depend on stage stage/sql/copy to tmp table - 130 (rows) completed
  • 64. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.64 Performance Schema Indexes Add indexes for the PERFORMANCE_SCHEMA engine Index key search fields across the schema Will alleviate processing overhead for queries
  • 65. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.65 Continued focus … On performance! On filling missing instrumentation points! On consolidating instrumentation within Performance schema!
  • 66. Copyright © 2014, Oracle and/or its affiliates. All rights reserved.66 The preceding 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.
  • 67. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 67
  • 68. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 12 68