SlideShare une entreprise Scribd logo
1  sur  26
Télécharger pour lire hors ligne
www.fromdual.com 
1 / 26 
Reading MySQL fingerprints 
FromDual Company Meeting 
10. September 2014, Barcelona 
by oli.sennhauser@fromdual.com 
www.fromdual.com
www.fromdual.com 
2 / 26 
About FromDual GmbH 
● FromDual provides neutral and independent: 
● Consulting for MySQL, Galera Cluster, MariaDB and 
Percona Server 
● Support for all MySQL and Galera Cluster 
● Remote-DBA Services for all MySQL 
● MySQL Training 
● Open Source Business Alliance (OSBA) 
● Member of SOUG, DOAG, /ch/open 
www.fromdual.com
www.fromdual.com 
3 / 26 
Fingerprints 
● Every MySQL has its fingerprints 
● Information about health 
● Wrong configuration 
● Other problems 
● Slow queries, bad queries etc. 
SHOW GLOBAL STATUS;
www.fromdual.com 
4 / 26 
Uptime 
● Begin with uptime 
● → useful information or NOT? 
● 1'000'000 ≈ 12 days 
| Uptime | 9809805 | 
| Uptime_since_flush_status | 677842 | 
| Uptime | 191 | 
| Last_query_cost | 0.000000 | 
If “since_flush” is missing → ≤ 5.0
www.fromdual.com 
● Aborted clients: Client died (exit, kill, x_timeout) 
● Aborted connects: Failed connects (user, privs) 
5 / 26 
Aborted_... 
● Connection “problems” 
| Aborted_clients | 6175600 | 
| Aborted_connects | 2366773 | 
| Uptime | 7678963 | 
| interactive_timeout | 14400 | 
| wait_timeout | 14400 | 
| log_error | /var/lib/mysql/error.log | 
| log_warnings | 2 | 
| connect_timeout | 10 | 
| Connection_errors_max_connections | 275 | 
| Max_used_connections | 451 | 
| max_connections | 450 |
www.fromdual.com 
6 / 26 
Binlog Cache 
● Caching DML in temporary disk file 
● Transactions 
● Non-transactional statements 
● Per thread? 
| Binlog_cache_disk_use | 229898 | 
| Binlog_cache_use | 78995379 | 
| Binlog_stmt_cache_disk_use | 2 | 
| Binlog_stmt_cache_use | 173 | 
| binlog_format | MIXED | 
| binlog_cache_size | 32768 | 
| binlog_stmt_cache_size | 32768 |
www.fromdual.com 
7 / 26 
Network / Socket traffic 
● Traffic in/out 
● Not good or bad → did you expect this? 
| Bytes_received | 1501169892674 | 1.5 Pbyte 
| Bytes_sent | 22058611469658 | 22.0 Pbyte 
| Uptime | 2730233 | 31.6 days
www.fromdual.com 
8 / 26 
Com_DML 
● Commands sent against the database 
● Not good or bad → did you expect this? 
| Com_delete | 5136637 | 
| Com_delete_multi | 0 | 
| Com_insert | 92274259 | 
| Com_insert_select | 0 | 
| Com_replace | 226382 | 
| Com_replace_select | 11865 | 
| Com_select | 2868492858 | 
| Com_update | 67269282 | 
| Com_update_multi | 2 | 
| Uptime | 2730233 |
www.fromdual.com 
9 / 26 
Com_Trx 
● Transactions 
| Com_begin | 0 | 
| Com_commit | 1179043996 | 
| Com_rollback | 5478834 | 
| Com_begin | 1251036 | 
| Com_commit | 1251030 | 
| Com_rollback | 6 | 
| Com_begin | 85621424 | 
| Com_commit | 844440316 | 
| Com_rollback | 597789274 |
www.fromdual.com 
10 / 26 
Com_stmt 
● Prepared Statements (server side) 
● Frameworks? Java? 
| Com_stmt_prepare | 34299289 | 
| Com_stmt_execute | 34299289 | 
| Com_stmt_close | 160618 | 
| Com_stmt_prepare | 410680831 | 
| Com_stmt_execute | 304205150 | 
| Com_stmt_close | 304204263 | 890? 
| Com_stmt_prepare | 349208 | 
| Com_stmt_execute | 60200559 | 172 exec/prep! 
| Com_stmt_close | 349180 | 28?
www.fromdual.com 
11 / 26 
Com_show 
● Monitoring? 
| Com_show_master_status | 105734 | 26 s 
| Com_show_slave_status | 45506 | 60 s 
| Com_show_status | 8411773 | 3/s 
| Com_show_variables | 37178223 | 13/s 
| Uptime | 2730233 | 
| Com_show_master_status | 227759 | 60 s 
| Com_show_slave_status | 227603 | 60 s 
| Com_show_status | 455295 | 30 s 
| Com_show_variables | 457652 | 30 s 
| Uptime | 13650479 |
www.fromdual.com 
12 / 26 
Temporary tables 
● In memory (HEAP/MEMORY) 
● On disk (MyISAM) 
| Created_tmp_disk_tables | 3340108 | 3.5%! 
| Created_tmp_tables | 85673163 | 
| max_heap_table_size | 16777216 | 
| tmp_table_size | 16777216 | 
| tmp_table_size | 1572864000 | 
| max_heap_table_size | 4294967296 | 
| Created_tmp_disk_tables | 4002 | 
| Created_tmp_tables | 1211581 |
www.fromdual.com 
13 / 26 
Handler read 
● Indicates (full) table scan 
● Missing indexes or 
● DWH / Reporting system? 
| Handler_read_first | 666910697 | 
| Handler_read_key | 228689782385 | 
| Handler_read_next | 668867162111 | 
| Handler_read_rnd_next | 6202456718291 | 
| Handler_read_first | 990454 | 
| Handler_read_key | 803290678 | 
| Handler_read_next | 2642462807 | 
| Handler_read_rnd_next | 957907147 |
www.fromdual.com 
● Buffer Pool Hit Rate should be around 99.9% 
14 / 26 
InnoDB Buffer Pool 
| Innodb_buffer_pool_pages_data | 8077 | 
| Innodb_buffer_pool_pages_free | 1 | 
| Innodb_buffer_pool_pages_misc | 113 | 
| Innodb_buffer_pool_pages_total | 8191 | 
| Innodb_buffer_pool_read_requests | 9269651791 | 
| Innodb_buffer_pool_reads | 143264886 | 98.5% 
| Innodb_buffer_pool_pages_data | 2997668 | 
| Innodb_buffer_pool_pages_free | 8613535 | 
| Innodb_buffer_pool_pages_misc | 1495933 | 
| Innodb_buffer_pool_pages_total | 13107136 | 
| Innodb_buffer_pool_read_requests | 1300196249 | 
| Innodb_buffer_pool_reads | 224 |
www.fromdual.com 
15 / 26 
InnoDB Log Buffer/File 
● InnoDB Log Buffer capacity 60s 
● InnoDB Log File capacity 3600s 
| Innodb_os_log_written | 172852163072 | 62 kybte/s avg 
| Uptime | 2730233 | 
| innodb_log_file_size | 104857600 | 
| innodb_log_buffer_size | 8388608 |
www.fromdual.com 
16 / 26 
InnoDB Locking 
| Innodb_row_lock_current_waits | 12 | 
| Innodb_row_lock_time | 71397579 | 
| Innodb_row_lock_time_avg | 206 | 
| Innodb_row_lock_time_max | 121785 | 
| Innodb_row_lock_waits | 346124 | 
| innodb_lock_wait_timeout | 120 |
www.fromdual.com 
17 / 26 
InnoDB r/w ratio 
● Normal database (r/w) 
● Heavy write database 
| Innodb_rows_deleted | 81658570 | 
| Innodb_rows_inserted | 92260188 | 
| Innodb_rows_updated | 63840419 | 
| Innodb_rows_read | 3497505486831 | 
| Innodb_rows_deleted | 3534987 | 
| Innodb_rows_inserted | 3634822 | 
| Innodb_rows_updated | 14328287 | 
| Innodb_rows_read | 34640044 |
www.fromdual.com 
18 / 26 
MyISAM key buffer 
● MyISAM is rarely used nowadays 
| Key_blocks_unused | 319661 | 
| Key_blocks_used | 38634 | 1 kbyte pages 
| Key_read_requests | 3818219101 | 
| Key_reads | 23 | 
| key_buffer_size | 402653184 |
www.fromdual.com 
19 / 26 
Table Definition Cache 
● New with MySQL 5.1 
● Important for “hoster” 
| Open_table_definitions | 612 | 
| Opened_table_definitions | 616 | 
| table_definition_cache | 1424 | 
| Open_table_definitions | 4367 | 
| Opened_table_definitions | 6268726 | 
| table_definition_cache | 256 |
www.fromdual.com 
20 / 26 
Table (Open) Cache 
● Split with MySQL 5.1 (into open and def) 
● Important for “hoster” 
| table_open_cache | 2048 | 
| Open_tables | 2048 | 
| Opened_tables | 5705 | 
| table_open_cache | 4000 | 
| Open_tables | 2871 | 
| Opened_tables | 39803 | 
| table_cache | 4096 | 
| Open_tables | 4096 | 
| Opened_tables | 446514619 |
www.fromdual.com 
21 / 26 
Query Cache 
● Global Query Cache Mutex! 
| Qcache_free_memory | 412590664 | 
| Com_select | 790313901 | 
| Qcache_hits | 3277601787 | 80% 
| query_cache_size | 536870912 | 
| Qcache_free_memory | 12483920 | 
| Com_select | 2868492858 | 
| Qcache_hits | 2892824901 | 50% 
| query_cache_size | 33554432 |
www.fromdual.com 
22 / 26 
Query Tuning 
● Those values should be ZERO! 
● Indexes missing 
● Slow Query Log: 
log_queries_not_using_indexes 
| Select_full_range_join | 406 | 
| Select_range_check | 25880 |
www.fromdual.com 
23 / 26 
Sort Buffer 
● Sort Buffer per connection 
● Malloc slow → keep it small 
| sort_buffer_size | 2097152 | 
| Sort_merge_passes | 401 | 
| Sort_range | 219725044 | 
| Sort_scan | 77618027 | 
| Sort_rows | 2403531992 | avg 8 r/sort
www.fromdual.com 
24 / 26 
MyISAM lock contention? 
● MyISAM is rarely used nowadays 
| Table_locks_immediate | 3480786626 | 
| Table_locks_waited | 0 | 
| Table_locks_immediate | 5306900555 | 
| Table_locks_waited | 4952191 |
www.fromdual.com 
25 / 26 
Threads and thread cache 
● Connections and concurrency 
| Max_used_connections | 1564 | 
| max_connections | 2000 | 
| thread_cache_size | 40 | 
| Threads_cached | 23 | 
| Threads_connected | 415 | 
| Threads_created | 159211 | 
| Threads_running | 10 | 
| Threads_cached | 0 | 
| Threads_created | 6111497 |
www.fromdual.com 
26 / 26 
Q & A 
Questions ? 
Discussion? 
We have time for some face-to-face talks... 
● FromDual provides neutral and independent: 
● Consulting 
● Remote-DBA 
● Support for MySQL, Galera, Percona Server and MariaDB 
● Training 
www.fromdual.com/presentations

Contenu connexe

Similaire à Reading MySQL fingerprints

MySQL performance webinar
MySQL performance webinarMySQL performance webinar
MySQL performance webinarAbel Flórez
 
MariaDB 10.2 New Features
MariaDB 10.2 New FeaturesMariaDB 10.2 New Features
MariaDB 10.2 New FeaturesFromDual GmbH
 
Streamlining Feature Engineering Pipelines with Open Source
Streamlining Feature Engineering Pipelines with Open SourceStreamlining Feature Engineering Pipelines with Open Source
Streamlining Feature Engineering Pipelines with Open SourceSoledad Galli
 
SQL Server Optimization Checklist
SQL Server Optimization ChecklistSQL Server Optimization Checklist
SQL Server Optimization ChecklistGrant Fritchey
 
Vitess percona 2012
Vitess percona 2012Vitess percona 2012
Vitess percona 2012Philip Zhong
 
IT Tage 2019 MariaDB 10.4 New Features
IT Tage 2019 MariaDB 10.4 New FeaturesIT Tage 2019 MariaDB 10.4 New Features
IT Tage 2019 MariaDB 10.4 New FeaturesFromDual GmbH
 
MariaDB 10.4 New Features
MariaDB 10.4 New FeaturesMariaDB 10.4 New Features
MariaDB 10.4 New FeaturesFromDual GmbH
 
Practical Guidelines for Solving Difficult Mixed Integer Programs
Practical Guidelines for Solving Difficult  Mixed Integer ProgramsPractical Guidelines for Solving Difficult  Mixed Integer Programs
Practical Guidelines for Solving Difficult Mixed Integer ProgramsIBM Decision Optimization
 
Database and application performance vivek sharma
Database and application performance vivek sharmaDatabase and application performance vivek sharma
Database and application performance vivek sharmaaioughydchapter
 
MySQL always-up with Galera Cluster
MySQL always-up with Galera ClusterMySQL always-up with Galera Cluster
MySQL always-up with Galera ClusterFromDual GmbH
 
MySQL configuration - The most important Variables
MySQL configuration - The most important VariablesMySQL configuration - The most important Variables
MySQL configuration - The most important VariablesFromDual GmbH
 
The Ultimate Guide To Creating & Managing Moodle Forums For eLearning Success
The Ultimate Guide To Creating & Managing Moodle Forums For eLearning SuccessThe Ultimate Guide To Creating & Managing Moodle Forums For eLearning Success
The Ultimate Guide To Creating & Managing Moodle Forums For eLearning SuccessLambda Solutions
 
Fatkulin hotsos 2014
Fatkulin hotsos 2014Fatkulin hotsos 2014
Fatkulin hotsos 2014Enkitec
 
Le novità di sql server 2019
Le novità di sql server 2019Le novità di sql server 2019
Le novità di sql server 2019Gianluca Hotz
 
MariaDB / MySQL tripping hazard and how to get out again?
MariaDB / MySQL tripping hazard and how to get out again?MariaDB / MySQL tripping hazard and how to get out again?
MariaDB / MySQL tripping hazard and how to get out again?FromDual GmbH
 
MariaDB/MySQL pitfalls - And how to come out again...
MariaDB/MySQL pitfalls - And how to come out again...MariaDB/MySQL pitfalls - And how to come out again...
MariaDB/MySQL pitfalls - And how to come out again...FromDual GmbH
 
Think simple and spare yourself a facepalm - EN
Think simple and spare yourself a facepalm - ENThink simple and spare yourself a facepalm - EN
Think simple and spare yourself a facepalm - ENMichal Simonik
 
Sprint 127
Sprint 127Sprint 127
Sprint 127ManageIQ
 

Similaire à Reading MySQL fingerprints (20)

MySQL performance webinar
MySQL performance webinarMySQL performance webinar
MySQL performance webinar
 
DPC Tutorial
DPC TutorialDPC Tutorial
DPC Tutorial
 
MariaDB 10.2 New Features
MariaDB 10.2 New FeaturesMariaDB 10.2 New Features
MariaDB 10.2 New Features
 
Tek tutorial
Tek tutorialTek tutorial
Tek tutorial
 
Streamlining Feature Engineering Pipelines with Open Source
Streamlining Feature Engineering Pipelines with Open SourceStreamlining Feature Engineering Pipelines with Open Source
Streamlining Feature Engineering Pipelines with Open Source
 
SQL Server Optimization Checklist
SQL Server Optimization ChecklistSQL Server Optimization Checklist
SQL Server Optimization Checklist
 
Vitess percona 2012
Vitess percona 2012Vitess percona 2012
Vitess percona 2012
 
IT Tage 2019 MariaDB 10.4 New Features
IT Tage 2019 MariaDB 10.4 New FeaturesIT Tage 2019 MariaDB 10.4 New Features
IT Tage 2019 MariaDB 10.4 New Features
 
MariaDB 10.4 New Features
MariaDB 10.4 New FeaturesMariaDB 10.4 New Features
MariaDB 10.4 New Features
 
Practical Guidelines for Solving Difficult Mixed Integer Programs
Practical Guidelines for Solving Difficult  Mixed Integer ProgramsPractical Guidelines for Solving Difficult  Mixed Integer Programs
Practical Guidelines for Solving Difficult Mixed Integer Programs
 
Database and application performance vivek sharma
Database and application performance vivek sharmaDatabase and application performance vivek sharma
Database and application performance vivek sharma
 
MySQL always-up with Galera Cluster
MySQL always-up with Galera ClusterMySQL always-up with Galera Cluster
MySQL always-up with Galera Cluster
 
MySQL configuration - The most important Variables
MySQL configuration - The most important VariablesMySQL configuration - The most important Variables
MySQL configuration - The most important Variables
 
The Ultimate Guide To Creating & Managing Moodle Forums For eLearning Success
The Ultimate Guide To Creating & Managing Moodle Forums For eLearning SuccessThe Ultimate Guide To Creating & Managing Moodle Forums For eLearning Success
The Ultimate Guide To Creating & Managing Moodle Forums For eLearning Success
 
Fatkulin hotsos 2014
Fatkulin hotsos 2014Fatkulin hotsos 2014
Fatkulin hotsos 2014
 
Le novità di sql server 2019
Le novità di sql server 2019Le novità di sql server 2019
Le novità di sql server 2019
 
MariaDB / MySQL tripping hazard and how to get out again?
MariaDB / MySQL tripping hazard and how to get out again?MariaDB / MySQL tripping hazard and how to get out again?
MariaDB / MySQL tripping hazard and how to get out again?
 
MariaDB/MySQL pitfalls - And how to come out again...
MariaDB/MySQL pitfalls - And how to come out again...MariaDB/MySQL pitfalls - And how to come out again...
MariaDB/MySQL pitfalls - And how to come out again...
 
Think simple and spare yourself a facepalm - EN
Think simple and spare yourself a facepalm - ENThink simple and spare yourself a facepalm - EN
Think simple and spare yourself a facepalm - EN
 
Sprint 127
Sprint 127Sprint 127
Sprint 127
 

Plus de FromDual GmbH

PXC 5.5 to MariaDB 10.4 Galera Cluster Migration Workshop
PXC 5.5 to MariaDB 10.4 Galera Cluster Migration WorkshopPXC 5.5 to MariaDB 10.4 Galera Cluster Migration Workshop
PXC 5.5 to MariaDB 10.4 Galera Cluster Migration WorkshopFromDual GmbH
 
PERFORMANCE_SCHEMA and sys schema
PERFORMANCE_SCHEMA and sys schemaPERFORMANCE_SCHEMA and sys schema
PERFORMANCE_SCHEMA and sys schemaFromDual GmbH
 
MySQL für Oracle DBA's
MySQL für Oracle DBA'sMySQL für Oracle DBA's
MySQL für Oracle DBA'sFromDual GmbH
 
MySQL Backup/Recovery
MySQL Backup/RecoveryMySQL Backup/Recovery
MySQL Backup/RecoveryFromDual GmbH
 
MySQL Beispiele aus der Praxis - Wie setzen Kunden MySQL ein?
MySQL Beispiele aus der Praxis - Wie setzen Kunden MySQL ein?MySQL Beispiele aus der Praxis - Wie setzen Kunden MySQL ein?
MySQL Beispiele aus der Praxis - Wie setzen Kunden MySQL ein?FromDual GmbH
 
MySQL-Server im Teamwork - Replikation und Cluster
MySQL-Server im Teamwork - Replikation und ClusterMySQL-Server im Teamwork - Replikation und Cluster
MySQL-Server im Teamwork - Replikation und ClusterFromDual GmbH
 
Der Datenbank-Backup ist gemacht - was nun?
Der Datenbank-Backup ist gemacht - was nun?Der Datenbank-Backup ist gemacht - was nun?
Der Datenbank-Backup ist gemacht - was nun?FromDual GmbH
 
Weltweite Produktionsdatenverwaltung mit MySQL-Replikation
Weltweite Produktionsdatenverwaltung mit MySQL-ReplikationWeltweite Produktionsdatenverwaltung mit MySQL-Replikation
Weltweite Produktionsdatenverwaltung mit MySQL-ReplikationFromDual GmbH
 
MySQL Performance Tuning für Oracle-DBA's
MySQL Performance Tuning für Oracle-DBA'sMySQL Performance Tuning für Oracle-DBA's
MySQL Performance Tuning für Oracle-DBA'sFromDual GmbH
 
MySQL Security SLAC 2015
MySQL Security SLAC 2015MySQL Security SLAC 2015
MySQL Security SLAC 2015FromDual GmbH
 
MySQL Performance Tuning für Entwickler
MySQL Performance Tuning für EntwicklerMySQL Performance Tuning für Entwickler
MySQL Performance Tuning für EntwicklerFromDual GmbH
 
MySQL Replikation - Die Eier legende Wollmilchsau?
MySQL Replikation - Die Eier legende Wollmilchsau?MySQL Replikation - Die Eier legende Wollmilchsau?
MySQL Replikation - Die Eier legende Wollmilchsau?FromDual GmbH
 
High-availability with Galera Cluster for MySQL
High-availability with Galera Cluster for MySQLHigh-availability with Galera Cluster for MySQL
High-availability with Galera Cluster for MySQLFromDual GmbH
 
MySQL Indexierung CeBIT 2014
MySQL Indexierung CeBIT 2014MySQL Indexierung CeBIT 2014
MySQL Indexierung CeBIT 2014FromDual GmbH
 
MySQL Cluster with Galera Cluster for MySQL
MySQL Cluster with Galera Cluster for MySQLMySQL Cluster with Galera Cluster for MySQL
MySQL Cluster with Galera Cluster for MySQLFromDual GmbH
 
Need for Speed: Mysql indexing
Need for Speed: Mysql indexingNeed for Speed: Mysql indexing
Need for Speed: Mysql indexingFromDual GmbH
 
MySQL for Oracle DBAs
MySQL for Oracle DBAsMySQL for Oracle DBAs
MySQL for Oracle DBAsFromDual GmbH
 
MySQL HA and Security
MySQL HA and SecurityMySQL HA and Security
MySQL HA and SecurityFromDual GmbH
 

Plus de FromDual GmbH (20)

PXC 5.5 to MariaDB 10.4 Galera Cluster Migration Workshop
PXC 5.5 to MariaDB 10.4 Galera Cluster Migration WorkshopPXC 5.5 to MariaDB 10.4 Galera Cluster Migration Workshop
PXC 5.5 to MariaDB 10.4 Galera Cluster Migration Workshop
 
PERFORMANCE_SCHEMA and sys schema
PERFORMANCE_SCHEMA and sys schemaPERFORMANCE_SCHEMA and sys schema
PERFORMANCE_SCHEMA and sys schema
 
MySQL für Oracle DBA's
MySQL für Oracle DBA'sMySQL für Oracle DBA's
MySQL für Oracle DBA's
 
MySQL Backup/Recovery
MySQL Backup/RecoveryMySQL Backup/Recovery
MySQL Backup/Recovery
 
MySQL Beispiele aus der Praxis - Wie setzen Kunden MySQL ein?
MySQL Beispiele aus der Praxis - Wie setzen Kunden MySQL ein?MySQL Beispiele aus der Praxis - Wie setzen Kunden MySQL ein?
MySQL Beispiele aus der Praxis - Wie setzen Kunden MySQL ein?
 
MySQL-Server im Teamwork - Replikation und Cluster
MySQL-Server im Teamwork - Replikation und ClusterMySQL-Server im Teamwork - Replikation und Cluster
MySQL-Server im Teamwork - Replikation und Cluster
 
Der Datenbank-Backup ist gemacht - was nun?
Der Datenbank-Backup ist gemacht - was nun?Der Datenbank-Backup ist gemacht - was nun?
Der Datenbank-Backup ist gemacht - was nun?
 
Weltweite Produktionsdatenverwaltung mit MySQL-Replikation
Weltweite Produktionsdatenverwaltung mit MySQL-ReplikationWeltweite Produktionsdatenverwaltung mit MySQL-Replikation
Weltweite Produktionsdatenverwaltung mit MySQL-Replikation
 
MySQL Performance Tuning für Oracle-DBA's
MySQL Performance Tuning für Oracle-DBA'sMySQL Performance Tuning für Oracle-DBA's
MySQL Performance Tuning für Oracle-DBA's
 
MySQL Security SLAC 2015
MySQL Security SLAC 2015MySQL Security SLAC 2015
MySQL Security SLAC 2015
 
MySQL Performance Tuning für Entwickler
MySQL Performance Tuning für EntwicklerMySQL Performance Tuning für Entwickler
MySQL Performance Tuning für Entwickler
 
MySQL Replikation - Die Eier legende Wollmilchsau?
MySQL Replikation - Die Eier legende Wollmilchsau?MySQL Replikation - Die Eier legende Wollmilchsau?
MySQL Replikation - Die Eier legende Wollmilchsau?
 
High-availability with Galera Cluster for MySQL
High-availability with Galera Cluster for MySQLHigh-availability with Galera Cluster for MySQL
High-availability with Galera Cluster for MySQL
 
HA with Galera
HA with GaleraHA with Galera
HA with Galera
 
MySQL Indexierung CeBIT 2014
MySQL Indexierung CeBIT 2014MySQL Indexierung CeBIT 2014
MySQL Indexierung CeBIT 2014
 
MySQL Cluster with Galera Cluster for MySQL
MySQL Cluster with Galera Cluster for MySQLMySQL Cluster with Galera Cluster for MySQL
MySQL Cluster with Galera Cluster for MySQL
 
MySQL Backup
MySQL BackupMySQL Backup
MySQL Backup
 
Need for Speed: Mysql indexing
Need for Speed: Mysql indexingNeed for Speed: Mysql indexing
Need for Speed: Mysql indexing
 
MySQL for Oracle DBAs
MySQL for Oracle DBAsMySQL for Oracle DBAs
MySQL for Oracle DBAs
 
MySQL HA and Security
MySQL HA and SecurityMySQL HA and Security
MySQL HA and Security
 

Dernier

05.02 MMC - Assignment 4 - Image Attribution Lovepreet.pptx
05.02 MMC - Assignment 4 - Image Attribution Lovepreet.pptx05.02 MMC - Assignment 4 - Image Attribution Lovepreet.pptx
05.02 MMC - Assignment 4 - Image Attribution Lovepreet.pptxerickamwana1
 
Engaging Eid Ul Fitr Presentation for Kindergartners.pptx
Engaging Eid Ul Fitr Presentation for Kindergartners.pptxEngaging Eid Ul Fitr Presentation for Kindergartners.pptx
Engaging Eid Ul Fitr Presentation for Kindergartners.pptxAsifArshad8
 
Chizaram's Women Tech Makers Deck. .pptx
Chizaram's Women Tech Makers Deck.  .pptxChizaram's Women Tech Makers Deck.  .pptx
Chizaram's Women Tech Makers Deck. .pptxogubuikealex
 
A Guide to Choosing the Ideal Air Cooler
A Guide to Choosing the Ideal Air CoolerA Guide to Choosing the Ideal Air Cooler
A Guide to Choosing the Ideal Air Coolerenquirieskenstar
 
Internship Presentation | PPT | CSE | SE
Internship Presentation | PPT | CSE | SEInternship Presentation | PPT | CSE | SE
Internship Presentation | PPT | CSE | SESaleh Ibne Omar
 
THE COUNTRY WHO SOLVED THE WORLD_HOW CHINA LAUNCHED THE CIVILIZATION REVOLUTI...
THE COUNTRY WHO SOLVED THE WORLD_HOW CHINA LAUNCHED THE CIVILIZATION REVOLUTI...THE COUNTRY WHO SOLVED THE WORLD_HOW CHINA LAUNCHED THE CIVILIZATION REVOLUTI...
THE COUNTRY WHO SOLVED THE WORLD_HOW CHINA LAUNCHED THE CIVILIZATION REVOLUTI...漢銘 謝
 
Application of GIS in Landslide Disaster Response.pptx
Application of GIS in Landslide Disaster Response.pptxApplication of GIS in Landslide Disaster Response.pptx
Application of GIS in Landslide Disaster Response.pptxRoquia Salam
 
RACHEL-ANN M. TENIBRO PRODUCT RESEARCH PRESENTATION
RACHEL-ANN M. TENIBRO PRODUCT RESEARCH PRESENTATIONRACHEL-ANN M. TENIBRO PRODUCT RESEARCH PRESENTATION
RACHEL-ANN M. TENIBRO PRODUCT RESEARCH PRESENTATIONRachelAnnTenibroAmaz
 
Testing with Fewer Resources: Toward Adaptive Approaches for Cost-effective ...
Testing with Fewer Resources:  Toward Adaptive Approaches for Cost-effective ...Testing with Fewer Resources:  Toward Adaptive Approaches for Cost-effective ...
Testing with Fewer Resources: Toward Adaptive Approaches for Cost-effective ...Sebastiano Panichella
 
proposal kumeneger edited.docx A kumeeger
proposal kumeneger edited.docx A kumeegerproposal kumeneger edited.docx A kumeeger
proposal kumeneger edited.docx A kumeegerkumenegertelayegrama
 
Quality by design.. ppt for RA (1ST SEM
Quality by design.. ppt for  RA (1ST SEMQuality by design.. ppt for  RA (1ST SEM
Quality by design.. ppt for RA (1ST SEMCharmi13
 
cse-csp batch4 review-1.1.pptx cyber security
cse-csp batch4 review-1.1.pptx cyber securitycse-csp batch4 review-1.1.pptx cyber security
cse-csp batch4 review-1.1.pptx cyber securitysandeepnani2260
 
GESCO SE Press and Analyst Conference on Financial Results 2024
GESCO SE Press and Analyst Conference on Financial Results 2024GESCO SE Press and Analyst Conference on Financial Results 2024
GESCO SE Press and Analyst Conference on Financial Results 2024GESCO SE
 
Testing and Development Challenges for Complex Cyber-Physical Systems: Insigh...
Testing and Development Challenges for Complex Cyber-Physical Systems: Insigh...Testing and Development Challenges for Complex Cyber-Physical Systems: Insigh...
Testing and Development Challenges for Complex Cyber-Physical Systems: Insigh...Sebastiano Panichella
 
INDIAN GCP GUIDELINE. for Regulatory affair 1st sem CRR
INDIAN GCP GUIDELINE. for Regulatory  affair 1st sem CRRINDIAN GCP GUIDELINE. for Regulatory  affair 1st sem CRR
INDIAN GCP GUIDELINE. for Regulatory affair 1st sem CRRsarwankumar4524
 
Don't Miss Out: Strategies for Making the Most of the Ethena DigitalOpportunity
Don't Miss Out: Strategies for Making the Most of the Ethena DigitalOpportunityDon't Miss Out: Strategies for Making the Most of the Ethena DigitalOpportunity
Don't Miss Out: Strategies for Making the Most of the Ethena DigitalOpportunityApp Ethena
 
General Elections Final Press Noteas per M
General Elections Final Press Noteas per MGeneral Elections Final Press Noteas per M
General Elections Final Press Noteas per MVidyaAdsule1
 

Dernier (17)

05.02 MMC - Assignment 4 - Image Attribution Lovepreet.pptx
05.02 MMC - Assignment 4 - Image Attribution Lovepreet.pptx05.02 MMC - Assignment 4 - Image Attribution Lovepreet.pptx
05.02 MMC - Assignment 4 - Image Attribution Lovepreet.pptx
 
Engaging Eid Ul Fitr Presentation for Kindergartners.pptx
Engaging Eid Ul Fitr Presentation for Kindergartners.pptxEngaging Eid Ul Fitr Presentation for Kindergartners.pptx
Engaging Eid Ul Fitr Presentation for Kindergartners.pptx
 
Chizaram's Women Tech Makers Deck. .pptx
Chizaram's Women Tech Makers Deck.  .pptxChizaram's Women Tech Makers Deck.  .pptx
Chizaram's Women Tech Makers Deck. .pptx
 
A Guide to Choosing the Ideal Air Cooler
A Guide to Choosing the Ideal Air CoolerA Guide to Choosing the Ideal Air Cooler
A Guide to Choosing the Ideal Air Cooler
 
Internship Presentation | PPT | CSE | SE
Internship Presentation | PPT | CSE | SEInternship Presentation | PPT | CSE | SE
Internship Presentation | PPT | CSE | SE
 
THE COUNTRY WHO SOLVED THE WORLD_HOW CHINA LAUNCHED THE CIVILIZATION REVOLUTI...
THE COUNTRY WHO SOLVED THE WORLD_HOW CHINA LAUNCHED THE CIVILIZATION REVOLUTI...THE COUNTRY WHO SOLVED THE WORLD_HOW CHINA LAUNCHED THE CIVILIZATION REVOLUTI...
THE COUNTRY WHO SOLVED THE WORLD_HOW CHINA LAUNCHED THE CIVILIZATION REVOLUTI...
 
Application of GIS in Landslide Disaster Response.pptx
Application of GIS in Landslide Disaster Response.pptxApplication of GIS in Landslide Disaster Response.pptx
Application of GIS in Landslide Disaster Response.pptx
 
RACHEL-ANN M. TENIBRO PRODUCT RESEARCH PRESENTATION
RACHEL-ANN M. TENIBRO PRODUCT RESEARCH PRESENTATIONRACHEL-ANN M. TENIBRO PRODUCT RESEARCH PRESENTATION
RACHEL-ANN M. TENIBRO PRODUCT RESEARCH PRESENTATION
 
Testing with Fewer Resources: Toward Adaptive Approaches for Cost-effective ...
Testing with Fewer Resources:  Toward Adaptive Approaches for Cost-effective ...Testing with Fewer Resources:  Toward Adaptive Approaches for Cost-effective ...
Testing with Fewer Resources: Toward Adaptive Approaches for Cost-effective ...
 
proposal kumeneger edited.docx A kumeeger
proposal kumeneger edited.docx A kumeegerproposal kumeneger edited.docx A kumeeger
proposal kumeneger edited.docx A kumeeger
 
Quality by design.. ppt for RA (1ST SEM
Quality by design.. ppt for  RA (1ST SEMQuality by design.. ppt for  RA (1ST SEM
Quality by design.. ppt for RA (1ST SEM
 
cse-csp batch4 review-1.1.pptx cyber security
cse-csp batch4 review-1.1.pptx cyber securitycse-csp batch4 review-1.1.pptx cyber security
cse-csp batch4 review-1.1.pptx cyber security
 
GESCO SE Press and Analyst Conference on Financial Results 2024
GESCO SE Press and Analyst Conference on Financial Results 2024GESCO SE Press and Analyst Conference on Financial Results 2024
GESCO SE Press and Analyst Conference on Financial Results 2024
 
Testing and Development Challenges for Complex Cyber-Physical Systems: Insigh...
Testing and Development Challenges for Complex Cyber-Physical Systems: Insigh...Testing and Development Challenges for Complex Cyber-Physical Systems: Insigh...
Testing and Development Challenges for Complex Cyber-Physical Systems: Insigh...
 
INDIAN GCP GUIDELINE. for Regulatory affair 1st sem CRR
INDIAN GCP GUIDELINE. for Regulatory  affair 1st sem CRRINDIAN GCP GUIDELINE. for Regulatory  affair 1st sem CRR
INDIAN GCP GUIDELINE. for Regulatory affair 1st sem CRR
 
Don't Miss Out: Strategies for Making the Most of the Ethena DigitalOpportunity
Don't Miss Out: Strategies for Making the Most of the Ethena DigitalOpportunityDon't Miss Out: Strategies for Making the Most of the Ethena DigitalOpportunity
Don't Miss Out: Strategies for Making the Most of the Ethena DigitalOpportunity
 
General Elections Final Press Noteas per M
General Elections Final Press Noteas per MGeneral Elections Final Press Noteas per M
General Elections Final Press Noteas per M
 

Reading MySQL fingerprints

  • 1. www.fromdual.com 1 / 26 Reading MySQL fingerprints FromDual Company Meeting 10. September 2014, Barcelona by oli.sennhauser@fromdual.com www.fromdual.com
  • 2. www.fromdual.com 2 / 26 About FromDual GmbH ● FromDual provides neutral and independent: ● Consulting for MySQL, Galera Cluster, MariaDB and Percona Server ● Support for all MySQL and Galera Cluster ● Remote-DBA Services for all MySQL ● MySQL Training ● Open Source Business Alliance (OSBA) ● Member of SOUG, DOAG, /ch/open www.fromdual.com
  • 3. www.fromdual.com 3 / 26 Fingerprints ● Every MySQL has its fingerprints ● Information about health ● Wrong configuration ● Other problems ● Slow queries, bad queries etc. SHOW GLOBAL STATUS;
  • 4. www.fromdual.com 4 / 26 Uptime ● Begin with uptime ● → useful information or NOT? ● 1'000'000 ≈ 12 days | Uptime | 9809805 | | Uptime_since_flush_status | 677842 | | Uptime | 191 | | Last_query_cost | 0.000000 | If “since_flush” is missing → ≤ 5.0
  • 5. www.fromdual.com ● Aborted clients: Client died (exit, kill, x_timeout) ● Aborted connects: Failed connects (user, privs) 5 / 26 Aborted_... ● Connection “problems” | Aborted_clients | 6175600 | | Aborted_connects | 2366773 | | Uptime | 7678963 | | interactive_timeout | 14400 | | wait_timeout | 14400 | | log_error | /var/lib/mysql/error.log | | log_warnings | 2 | | connect_timeout | 10 | | Connection_errors_max_connections | 275 | | Max_used_connections | 451 | | max_connections | 450 |
  • 6. www.fromdual.com 6 / 26 Binlog Cache ● Caching DML in temporary disk file ● Transactions ● Non-transactional statements ● Per thread? | Binlog_cache_disk_use | 229898 | | Binlog_cache_use | 78995379 | | Binlog_stmt_cache_disk_use | 2 | | Binlog_stmt_cache_use | 173 | | binlog_format | MIXED | | binlog_cache_size | 32768 | | binlog_stmt_cache_size | 32768 |
  • 7. www.fromdual.com 7 / 26 Network / Socket traffic ● Traffic in/out ● Not good or bad → did you expect this? | Bytes_received | 1501169892674 | 1.5 Pbyte | Bytes_sent | 22058611469658 | 22.0 Pbyte | Uptime | 2730233 | 31.6 days
  • 8. www.fromdual.com 8 / 26 Com_DML ● Commands sent against the database ● Not good or bad → did you expect this? | Com_delete | 5136637 | | Com_delete_multi | 0 | | Com_insert | 92274259 | | Com_insert_select | 0 | | Com_replace | 226382 | | Com_replace_select | 11865 | | Com_select | 2868492858 | | Com_update | 67269282 | | Com_update_multi | 2 | | Uptime | 2730233 |
  • 9. www.fromdual.com 9 / 26 Com_Trx ● Transactions | Com_begin | 0 | | Com_commit | 1179043996 | | Com_rollback | 5478834 | | Com_begin | 1251036 | | Com_commit | 1251030 | | Com_rollback | 6 | | Com_begin | 85621424 | | Com_commit | 844440316 | | Com_rollback | 597789274 |
  • 10. www.fromdual.com 10 / 26 Com_stmt ● Prepared Statements (server side) ● Frameworks? Java? | Com_stmt_prepare | 34299289 | | Com_stmt_execute | 34299289 | | Com_stmt_close | 160618 | | Com_stmt_prepare | 410680831 | | Com_stmt_execute | 304205150 | | Com_stmt_close | 304204263 | 890? | Com_stmt_prepare | 349208 | | Com_stmt_execute | 60200559 | 172 exec/prep! | Com_stmt_close | 349180 | 28?
  • 11. www.fromdual.com 11 / 26 Com_show ● Monitoring? | Com_show_master_status | 105734 | 26 s | Com_show_slave_status | 45506 | 60 s | Com_show_status | 8411773 | 3/s | Com_show_variables | 37178223 | 13/s | Uptime | 2730233 | | Com_show_master_status | 227759 | 60 s | Com_show_slave_status | 227603 | 60 s | Com_show_status | 455295 | 30 s | Com_show_variables | 457652 | 30 s | Uptime | 13650479 |
  • 12. www.fromdual.com 12 / 26 Temporary tables ● In memory (HEAP/MEMORY) ● On disk (MyISAM) | Created_tmp_disk_tables | 3340108 | 3.5%! | Created_tmp_tables | 85673163 | | max_heap_table_size | 16777216 | | tmp_table_size | 16777216 | | tmp_table_size | 1572864000 | | max_heap_table_size | 4294967296 | | Created_tmp_disk_tables | 4002 | | Created_tmp_tables | 1211581 |
  • 13. www.fromdual.com 13 / 26 Handler read ● Indicates (full) table scan ● Missing indexes or ● DWH / Reporting system? | Handler_read_first | 666910697 | | Handler_read_key | 228689782385 | | Handler_read_next | 668867162111 | | Handler_read_rnd_next | 6202456718291 | | Handler_read_first | 990454 | | Handler_read_key | 803290678 | | Handler_read_next | 2642462807 | | Handler_read_rnd_next | 957907147 |
  • 14. www.fromdual.com ● Buffer Pool Hit Rate should be around 99.9% 14 / 26 InnoDB Buffer Pool | Innodb_buffer_pool_pages_data | 8077 | | Innodb_buffer_pool_pages_free | 1 | | Innodb_buffer_pool_pages_misc | 113 | | Innodb_buffer_pool_pages_total | 8191 | | Innodb_buffer_pool_read_requests | 9269651791 | | Innodb_buffer_pool_reads | 143264886 | 98.5% | Innodb_buffer_pool_pages_data | 2997668 | | Innodb_buffer_pool_pages_free | 8613535 | | Innodb_buffer_pool_pages_misc | 1495933 | | Innodb_buffer_pool_pages_total | 13107136 | | Innodb_buffer_pool_read_requests | 1300196249 | | Innodb_buffer_pool_reads | 224 |
  • 15. www.fromdual.com 15 / 26 InnoDB Log Buffer/File ● InnoDB Log Buffer capacity 60s ● InnoDB Log File capacity 3600s | Innodb_os_log_written | 172852163072 | 62 kybte/s avg | Uptime | 2730233 | | innodb_log_file_size | 104857600 | | innodb_log_buffer_size | 8388608 |
  • 16. www.fromdual.com 16 / 26 InnoDB Locking | Innodb_row_lock_current_waits | 12 | | Innodb_row_lock_time | 71397579 | | Innodb_row_lock_time_avg | 206 | | Innodb_row_lock_time_max | 121785 | | Innodb_row_lock_waits | 346124 | | innodb_lock_wait_timeout | 120 |
  • 17. www.fromdual.com 17 / 26 InnoDB r/w ratio ● Normal database (r/w) ● Heavy write database | Innodb_rows_deleted | 81658570 | | Innodb_rows_inserted | 92260188 | | Innodb_rows_updated | 63840419 | | Innodb_rows_read | 3497505486831 | | Innodb_rows_deleted | 3534987 | | Innodb_rows_inserted | 3634822 | | Innodb_rows_updated | 14328287 | | Innodb_rows_read | 34640044 |
  • 18. www.fromdual.com 18 / 26 MyISAM key buffer ● MyISAM is rarely used nowadays | Key_blocks_unused | 319661 | | Key_blocks_used | 38634 | 1 kbyte pages | Key_read_requests | 3818219101 | | Key_reads | 23 | | key_buffer_size | 402653184 |
  • 19. www.fromdual.com 19 / 26 Table Definition Cache ● New with MySQL 5.1 ● Important for “hoster” | Open_table_definitions | 612 | | Opened_table_definitions | 616 | | table_definition_cache | 1424 | | Open_table_definitions | 4367 | | Opened_table_definitions | 6268726 | | table_definition_cache | 256 |
  • 20. www.fromdual.com 20 / 26 Table (Open) Cache ● Split with MySQL 5.1 (into open and def) ● Important for “hoster” | table_open_cache | 2048 | | Open_tables | 2048 | | Opened_tables | 5705 | | table_open_cache | 4000 | | Open_tables | 2871 | | Opened_tables | 39803 | | table_cache | 4096 | | Open_tables | 4096 | | Opened_tables | 446514619 |
  • 21. www.fromdual.com 21 / 26 Query Cache ● Global Query Cache Mutex! | Qcache_free_memory | 412590664 | | Com_select | 790313901 | | Qcache_hits | 3277601787 | 80% | query_cache_size | 536870912 | | Qcache_free_memory | 12483920 | | Com_select | 2868492858 | | Qcache_hits | 2892824901 | 50% | query_cache_size | 33554432 |
  • 22. www.fromdual.com 22 / 26 Query Tuning ● Those values should be ZERO! ● Indexes missing ● Slow Query Log: log_queries_not_using_indexes | Select_full_range_join | 406 | | Select_range_check | 25880 |
  • 23. www.fromdual.com 23 / 26 Sort Buffer ● Sort Buffer per connection ● Malloc slow → keep it small | sort_buffer_size | 2097152 | | Sort_merge_passes | 401 | | Sort_range | 219725044 | | Sort_scan | 77618027 | | Sort_rows | 2403531992 | avg 8 r/sort
  • 24. www.fromdual.com 24 / 26 MyISAM lock contention? ● MyISAM is rarely used nowadays | Table_locks_immediate | 3480786626 | | Table_locks_waited | 0 | | Table_locks_immediate | 5306900555 | | Table_locks_waited | 4952191 |
  • 25. www.fromdual.com 25 / 26 Threads and thread cache ● Connections and concurrency | Max_used_connections | 1564 | | max_connections | 2000 | | thread_cache_size | 40 | | Threads_cached | 23 | | Threads_connected | 415 | | Threads_created | 159211 | | Threads_running | 10 | | Threads_cached | 0 | | Threads_created | 6111497 |
  • 26. www.fromdual.com 26 / 26 Q & A Questions ? Discussion? We have time for some face-to-face talks... ● FromDual provides neutral and independent: ● Consulting ● Remote-DBA ● Support for MySQL, Galera, Percona Server and MariaDB ● Training www.fromdual.com/presentations