SlideShare a Scribd company logo
1
Percona Tool kits For DBA’s
2
• P.R.Karthik
• 3 Years plus experience in MySQL as a DBA.
• Worked for various e-commerce companies in INDIA.
• Currently in one of biggest MySQL server farms.
• remotemysqldba.blogspot.in
About me
Percona Tool kit
• Maintained by Percona Team.
• Originated from Aspersa and Maakit.
• Initially Designed by Baron Schwartz.
• Designed for MySQL and its forks.
• Works on all Linux Platforms.
• Matured and proven tool.
• Set of 33 cmd line tools.
• Latest version 2.2.5 ( 16-10-2013)
3
Percona Tool kit
• Pt-query-digest
• Pt-table-checksum
• Pt-table-sync
• Pt-online-schema-change
• Pt-kill
4
Pt-query-digest
5
Pt-query-digest
• Analyses the Queries.
• Slow query log, Query logs.
• Works on tcpdump too.
Other tools for Query logs
1) Mysqldumpslow
2) mysqlsla
6
Pt-query-digest
7
Pt-query-digest
8
Pt-query-digest
• It collects the queries and rank them based on the
usage stats.
• The queries collected can be analyzed easily.
Query Analyzers:
Pt-Visual-explain and Visual Explain ( MySQL 5.6
Workbench )
9
Pt-table-checksum
10
Pt-table-checksum
It helps in checking the replication integrity of
mysql.
Need to check:
• Direct writes on slave.
• Skipping the events.
• Many others.
11
Pt-table-checksum
12
Pt-table-checksum
How it works :
1) Check for replication lag
2) Takes data in small chunks.
3) Make checksum on chunk with replace into select.
4) Displays the output.
Note: It has more safety options.
13
Pt-table-sync
14
Pt-table-sync
Synchronizes the data between the master and slave
servers.
It is a very effective tool and it can be used along with
pt-table-checksum to make the data sync.
15
Pt-table-sync
• pt-table-sync --execute h=10.0.0.25,u=pttool,p=tool
--sync-to-master --print --databases world
16
Pt-table-sync
How it works :
1) Check for replication lag and delay.
2) Takes data in small chunks.
3) Make the data check based on Pk or Unique index
most cases.
4) Then synchronizes the data.
Note: It is a read/write tool, precautions must be
taken.
17
Pt-Online-Schema-Change
18
Pt-OSC
Helps in modifying the table structure without much
locking.
Need to alter:
• Adding an index for performance.
• Modifying a column.
• Adding a column.
• Altering the engine
19
Pt-OSC
How it works :
1) Create a new table with modified structure.
2) Creates triggers for data changes.
3) Copies data in small chunks.
4) Swaps the table.
5) Drop the old table and triggers.
20
Pt-OSC
Adding a column:
pt-online-schema-change --execute --user=pttool --pass=tool --alter "add
column region char(30)" D=world,t=page_city
Adding a Index:
pt-online-schema-change --execute --user=pttool --pass=tool --alter "add index
idx_dist (District)" D=world,t=page_city
Altering Engine :
pt-online-schema-change --execute --user=pttool –pass=tool --alter
"engine=innodb" D=world,t=hio_city
21
Pt-Kill
22
Pt-kill
It helps to kill queries based on the filter input.
Repetitive and mass killing
Need to Kill:
• Application not closing the connection properly
• Ill framed resource consuming queries
• Too many bad queries running in parallel.
23
Pt-kill
For sleep queries:
pt-kill --user kill --ask-pass --socket=/tmp/mysql.sock --database test --match-
command Sleep --kill --print --victims all --interval 15
For user specific:
pt-kill --user kill --ask-pass --socket=/tmp/mysql.sock --print --match-user
benchmark --kill --victims all
For pattern match:
pt-kill --user kill --ask-pass --socket=/tmp/mysql.sock --kill-query --victims all
--database test --match-info 'SELECT DISTINCT c from sbtest'
24
THANKS FOR PARTICIPATION
remotemysqldba.blogspot.in
25

More Related Content

What's hot

Wayfair Use Case: The four R's of Metrics Delivery
Wayfair Use Case: The four R's of Metrics DeliveryWayfair Use Case: The four R's of Metrics Delivery
Wayfair Use Case: The four R's of Metrics Delivery
InfluxData
 
Case Studies on PostgreSQL
Case Studies on PostgreSQLCase Studies on PostgreSQL
Case Studies on PostgreSQL
InMobi Technology
 
Percona Server 8.0
Percona Server 8.0Percona Server 8.0
Percona Server 8.0
Laurynas Biveinis
 
InfluxDB IOx Tech Talks: Query Processing in InfluxDB IOx
InfluxDB IOx Tech Talks: Query Processing in InfluxDB IOxInfluxDB IOx Tech Talks: Query Processing in InfluxDB IOx
InfluxDB IOx Tech Talks: Query Processing in InfluxDB IOx
InfluxData
 
Espresso: LinkedIn's Distributed Data Serving Platform (Talk)
Espresso: LinkedIn's Distributed Data Serving Platform (Talk)Espresso: LinkedIn's Distributed Data Serving Platform (Talk)
Espresso: LinkedIn's Distributed Data Serving Platform (Talk)
Amy W. Tang
 
Adventures in Observability: How in-house ClickHouse deployment enabled Inst...
 Adventures in Observability: How in-house ClickHouse deployment enabled Inst... Adventures in Observability: How in-house ClickHouse deployment enabled Inst...
Adventures in Observability: How in-house ClickHouse deployment enabled Inst...
Altinity Ltd
 
SphinxSE with MySQL
SphinxSE with MySQLSphinxSE with MySQL
SphinxSE with MySQL
Ritesh Puthran
 
Performance Profiling in Rust
Performance Profiling in RustPerformance Profiling in Rust
Performance Profiling in Rust
InfluxData
 
Streaming replication in PostgreSQL
Streaming replication in PostgreSQLStreaming replication in PostgreSQL
Streaming replication in PostgreSQL
Ashnikbiz
 
PostgreSQL 9.5 - Major Features
PostgreSQL 9.5 - Major FeaturesPostgreSQL 9.5 - Major Features
PostgreSQL 9.5 - Major Features
InMobi Technology
 
GitLab PostgresMortem: Lessons Learned
GitLab PostgresMortem: Lessons LearnedGitLab PostgresMortem: Lessons Learned
GitLab PostgresMortem: Lessons Learned
Alexey Lesovsky
 
In-core compression: how to shrink your database size in several times
In-core compression: how to shrink your database size in several timesIn-core compression: how to shrink your database size in several times
In-core compression: how to shrink your database size in several times
Aleksander Alekseev
 
PGConf.ASIA 2019 Bali - AppOS: PostgreSQL Extension for Scalable File I/O - K...
PGConf.ASIA 2019 Bali - AppOS: PostgreSQL Extension for Scalable File I/O - K...PGConf.ASIA 2019 Bali - AppOS: PostgreSQL Extension for Scalable File I/O - K...
PGConf.ASIA 2019 Bali - AppOS: PostgreSQL Extension for Scalable File I/O - K...
Equnix Business Solutions
 
Advanced backup methods (Postgres@CERN)
Advanced backup methods (Postgres@CERN)Advanced backup methods (Postgres@CERN)
Advanced backup methods (Postgres@CERN)
Anastasia Lubennikova
 
PostgreSQL WAL for DBAs
PostgreSQL WAL for DBAs PostgreSQL WAL for DBAs
PostgreSQL WAL for DBAs
PGConf APAC
 
Percona Server 5.7: Key Performance Algorithms
Percona Server 5.7: Key Performance AlgorithmsPercona Server 5.7: Key Performance Algorithms
Percona Server 5.7: Key Performance Algorithms
Laurynas Biveinis
 
Mastering PostgreSQL Administration
Mastering PostgreSQL AdministrationMastering PostgreSQL Administration
Mastering PostgreSQL Administration
EDB
 
RESTful API – How to Consume, Extract, Store and Visualize Data with InfluxDB...
RESTful API – How to Consume, Extract, Store and Visualize Data with InfluxDB...RESTful API – How to Consume, Extract, Store and Visualize Data with InfluxDB...
RESTful API – How to Consume, Extract, Store and Visualize Data with InfluxDB...
InfluxData
 
PGConf.ASIA 2019 Bali - Performance Analysis at Full Power - Julien Rouhaud
PGConf.ASIA 2019 Bali - Performance Analysis at Full Power - Julien RouhaudPGConf.ASIA 2019 Bali - Performance Analysis at Full Power - Julien Rouhaud
PGConf.ASIA 2019 Bali - Performance Analysis at Full Power - Julien Rouhaud
Equnix Business Solutions
 
What is new in MariaDB 10.6?
What is new in MariaDB 10.6?What is new in MariaDB 10.6?
What is new in MariaDB 10.6?
Mydbops
 

What's hot (20)

Wayfair Use Case: The four R's of Metrics Delivery
Wayfair Use Case: The four R's of Metrics DeliveryWayfair Use Case: The four R's of Metrics Delivery
Wayfair Use Case: The four R's of Metrics Delivery
 
Case Studies on PostgreSQL
Case Studies on PostgreSQLCase Studies on PostgreSQL
Case Studies on PostgreSQL
 
Percona Server 8.0
Percona Server 8.0Percona Server 8.0
Percona Server 8.0
 
InfluxDB IOx Tech Talks: Query Processing in InfluxDB IOx
InfluxDB IOx Tech Talks: Query Processing in InfluxDB IOxInfluxDB IOx Tech Talks: Query Processing in InfluxDB IOx
InfluxDB IOx Tech Talks: Query Processing in InfluxDB IOx
 
Espresso: LinkedIn's Distributed Data Serving Platform (Talk)
Espresso: LinkedIn's Distributed Data Serving Platform (Talk)Espresso: LinkedIn's Distributed Data Serving Platform (Talk)
Espresso: LinkedIn's Distributed Data Serving Platform (Talk)
 
Adventures in Observability: How in-house ClickHouse deployment enabled Inst...
 Adventures in Observability: How in-house ClickHouse deployment enabled Inst... Adventures in Observability: How in-house ClickHouse deployment enabled Inst...
Adventures in Observability: How in-house ClickHouse deployment enabled Inst...
 
SphinxSE with MySQL
SphinxSE with MySQLSphinxSE with MySQL
SphinxSE with MySQL
 
Performance Profiling in Rust
Performance Profiling in RustPerformance Profiling in Rust
Performance Profiling in Rust
 
Streaming replication in PostgreSQL
Streaming replication in PostgreSQLStreaming replication in PostgreSQL
Streaming replication in PostgreSQL
 
PostgreSQL 9.5 - Major Features
PostgreSQL 9.5 - Major FeaturesPostgreSQL 9.5 - Major Features
PostgreSQL 9.5 - Major Features
 
GitLab PostgresMortem: Lessons Learned
GitLab PostgresMortem: Lessons LearnedGitLab PostgresMortem: Lessons Learned
GitLab PostgresMortem: Lessons Learned
 
In-core compression: how to shrink your database size in several times
In-core compression: how to shrink your database size in several timesIn-core compression: how to shrink your database size in several times
In-core compression: how to shrink your database size in several times
 
PGConf.ASIA 2019 Bali - AppOS: PostgreSQL Extension for Scalable File I/O - K...
PGConf.ASIA 2019 Bali - AppOS: PostgreSQL Extension for Scalable File I/O - K...PGConf.ASIA 2019 Bali - AppOS: PostgreSQL Extension for Scalable File I/O - K...
PGConf.ASIA 2019 Bali - AppOS: PostgreSQL Extension for Scalable File I/O - K...
 
Advanced backup methods (Postgres@CERN)
Advanced backup methods (Postgres@CERN)Advanced backup methods (Postgres@CERN)
Advanced backup methods (Postgres@CERN)
 
PostgreSQL WAL for DBAs
PostgreSQL WAL for DBAs PostgreSQL WAL for DBAs
PostgreSQL WAL for DBAs
 
Percona Server 5.7: Key Performance Algorithms
Percona Server 5.7: Key Performance AlgorithmsPercona Server 5.7: Key Performance Algorithms
Percona Server 5.7: Key Performance Algorithms
 
Mastering PostgreSQL Administration
Mastering PostgreSQL AdministrationMastering PostgreSQL Administration
Mastering PostgreSQL Administration
 
RESTful API – How to Consume, Extract, Store and Visualize Data with InfluxDB...
RESTful API – How to Consume, Extract, Store and Visualize Data with InfluxDB...RESTful API – How to Consume, Extract, Store and Visualize Data with InfluxDB...
RESTful API – How to Consume, Extract, Store and Visualize Data with InfluxDB...
 
PGConf.ASIA 2019 Bali - Performance Analysis at Full Power - Julien Rouhaud
PGConf.ASIA 2019 Bali - Performance Analysis at Full Power - Julien RouhaudPGConf.ASIA 2019 Bali - Performance Analysis at Full Power - Julien Rouhaud
PGConf.ASIA 2019 Bali - Performance Analysis at Full Power - Julien Rouhaud
 
What is new in MariaDB 10.6?
What is new in MariaDB 10.6?What is new in MariaDB 10.6?
What is new in MariaDB 10.6?
 

Viewers also liked

Pic analysis
Pic analysisPic analysis
Pic analysis
Adaira Studivon
 
Jacks Resume
Jacks ResumeJacks Resume
Jacks Resume
Jack McKeever
 
Hobbes. mankind
Hobbes. mankind Hobbes. mankind
Hobbes. mankind
Piqria Sandodze
 
Presentacion 10 6
Presentacion 10 6Presentacion 10 6
Presentacion 10 6
Danny1997mayac
 
Medios de transmisión
Medios de transmisiónMedios de transmisión
Medios de transmisión
danuquin
 
13 cm sumbul_rizvi_unhcr
13 cm sumbul_rizvi_unhcr13 cm sumbul_rizvi_unhcr
13 cm sumbul_rizvi_unhcr
berhanu taye
 
2 todos somos_censores_perry_nodelman
2 todos somos_censores_perry_nodelman2 todos somos_censores_perry_nodelman
2 todos somos_censores_perry_nodelman
WILFRIDO VIVEROS
 
iLA Living App - Apresentação em Português
iLA Living App - Apresentação em PortuguêsiLA Living App - Apresentação em Português
iLA Living App - Apresentação em Português
Mauricio Kawaguchi
 
ANSHIT zine #3
ANSHIT zine #3ANSHIT zine #3
ANSHIT zine #3
Anshit Zine
 
Formato sena en español 2013
Formato sena  en español 2013Formato sena  en español 2013
Formato sena en español 2013
ASTROFISI
 
Movimiento, fisiología de la actividad motora
Movimiento, fisiología de la actividad motoraMovimiento, fisiología de la actividad motora
Movimiento, fisiología de la actividad motora
Renny Pacheco
 
Natacion
NatacionNatacion
Ensayo democracia
Ensayo democraciaEnsayo democracia
Ensayo democracia
AlejOo KruZz
 
REGIONAL INFANTIL DE ATLETISMO
REGIONAL INFANTIL DE ATLETISMO REGIONAL INFANTIL DE ATLETISMO
REGIONAL INFANTIL DE ATLETISMO
Judith Chuquipul
 
1 ficha de_evaluacion_-comite_bl
1 ficha de_evaluacion_-comite_bl1 ficha de_evaluacion_-comite_bl
1 ficha de_evaluacion_-comite_bl
WILFRIDO VIVEROS
 
!! Some specifci interesting career details ~~www.cyber astro.com~~
!! Some specifci interesting career details ~~www.cyber astro.com~~!! Some specifci interesting career details ~~www.cyber astro.com~~
!! Some specifci interesting career details ~~www.cyber astro.com~~
Deepak Somaji-Sawant
 
Add mth f4 final sbp 2008
Add mth f4 final sbp 2008Add mth f4 final sbp 2008
Add mth f4 final sbp 2008
Shaila Rama
 
Обучение Linux в корпоративном секторе
Обучение Linux в корпоративном сектореОбучение Linux в корпоративном секторе
Обучение Linux в корпоративном секторе
Vladimir Shakhov
 
PPT sobre Slideshare
PPT sobre SlidesharePPT sobre Slideshare
PPT sobre Slideshare
marianaklein15
 

Viewers also liked (20)

儿童诗 Done
儿童诗 Done儿童诗 Done
儿童诗 Done
 
Pic analysis
Pic analysisPic analysis
Pic analysis
 
Jacks Resume
Jacks ResumeJacks Resume
Jacks Resume
 
Hobbes. mankind
Hobbes. mankind Hobbes. mankind
Hobbes. mankind
 
Presentacion 10 6
Presentacion 10 6Presentacion 10 6
Presentacion 10 6
 
Medios de transmisión
Medios de transmisiónMedios de transmisión
Medios de transmisión
 
13 cm sumbul_rizvi_unhcr
13 cm sumbul_rizvi_unhcr13 cm sumbul_rizvi_unhcr
13 cm sumbul_rizvi_unhcr
 
2 todos somos_censores_perry_nodelman
2 todos somos_censores_perry_nodelman2 todos somos_censores_perry_nodelman
2 todos somos_censores_perry_nodelman
 
iLA Living App - Apresentação em Português
iLA Living App - Apresentação em PortuguêsiLA Living App - Apresentação em Português
iLA Living App - Apresentação em Português
 
ANSHIT zine #3
ANSHIT zine #3ANSHIT zine #3
ANSHIT zine #3
 
Formato sena en español 2013
Formato sena  en español 2013Formato sena  en español 2013
Formato sena en español 2013
 
Movimiento, fisiología de la actividad motora
Movimiento, fisiología de la actividad motoraMovimiento, fisiología de la actividad motora
Movimiento, fisiología de la actividad motora
 
Natacion
NatacionNatacion
Natacion
 
Ensayo democracia
Ensayo democraciaEnsayo democracia
Ensayo democracia
 
REGIONAL INFANTIL DE ATLETISMO
REGIONAL INFANTIL DE ATLETISMO REGIONAL INFANTIL DE ATLETISMO
REGIONAL INFANTIL DE ATLETISMO
 
1 ficha de_evaluacion_-comite_bl
1 ficha de_evaluacion_-comite_bl1 ficha de_evaluacion_-comite_bl
1 ficha de_evaluacion_-comite_bl
 
!! Some specifci interesting career details ~~www.cyber astro.com~~
!! Some specifci interesting career details ~~www.cyber astro.com~~!! Some specifci interesting career details ~~www.cyber astro.com~~
!! Some specifci interesting career details ~~www.cyber astro.com~~
 
Add mth f4 final sbp 2008
Add mth f4 final sbp 2008Add mth f4 final sbp 2008
Add mth f4 final sbp 2008
 
Обучение Linux в корпоративном секторе
Обучение Linux в корпоративном сектореОбучение Linux в корпоративном секторе
Обучение Linux в корпоративном секторе
 
PPT sobre Slideshare
PPT sobre SlidesharePPT sobre Slideshare
PPT sobre Slideshare
 

Similar to Percona tool kit for MySQL DBA's

Get More Out of MySQL with TokuDB
Get More Out of MySQL with TokuDBGet More Out of MySQL with TokuDB
Get More Out of MySQL with TokuDB
Tim Callaghan
 
Postgres Toolkit
Postgres ToolkitPostgres Toolkit
Intro to HPC
Intro to HPCIntro to HPC
Intro to HPC
Wendi Sapp
 
What you need to know for postgresql operation
What you need to know for postgresql operationWhat you need to know for postgresql operation
What you need to know for postgresql operation
Anton Bushmelev
 
Analyze database system using a 3 d method
Analyze database system using a 3 d methodAnalyze database system using a 3 d method
Analyze database system using a 3 d method
Ajith Narayanan
 
Performance Scenario: Diagnosing and resolving sudden slow down on two node RAC
Performance Scenario: Diagnosing and resolving sudden slow down on two node RACPerformance Scenario: Diagnosing and resolving sudden slow down on two node RAC
Performance Scenario: Diagnosing and resolving sudden slow down on two node RAC
Kristofferson A
 
Apache Spark for RDBMS Practitioners: How I Learned to Stop Worrying and Lov...
 Apache Spark for RDBMS Practitioners: How I Learned to Stop Worrying and Lov... Apache Spark for RDBMS Practitioners: How I Learned to Stop Worrying and Lov...
Apache Spark for RDBMS Practitioners: How I Learned to Stop Worrying and Lov...
Databricks
 
NSCC Training Introductory Class
NSCC Training Introductory Class NSCC Training Introductory Class
NSCC Training Introductory Class
National Supercomputing Centre Singapore
 
NSCC Training - Introductory Class
NSCC Training - Introductory ClassNSCC Training - Introductory Class
NSCC Training - Introductory Class
National Supercomputing Centre Singapore
 
10 Reasons to Start Your Analytics Project with PostgreSQL
10 Reasons to Start Your Analytics Project with PostgreSQL10 Reasons to Start Your Analytics Project with PostgreSQL
10 Reasons to Start Your Analytics Project with PostgreSQL
Satoshi Nagayasu
 
20140128 webinar-get-more-out-of-mysql-with-tokudb-140319063324-phpapp02
20140128 webinar-get-more-out-of-mysql-with-tokudb-140319063324-phpapp0220140128 webinar-get-more-out-of-mysql-with-tokudb-140319063324-phpapp02
20140128 webinar-get-more-out-of-mysql-with-tokudb-140319063324-phpapp02
Francisco Gonçalves
 
Building a Complex, Real-Time Data Management Application
Building a Complex, Real-Time Data Management ApplicationBuilding a Complex, Real-Time Data Management Application
Building a Complex, Real-Time Data Management Application
Jonathan Katz
 
Python Utilities for Managing MySQL Databases
Python Utilities for Managing MySQL DatabasesPython Utilities for Managing MySQL Databases
Python Utilities for Managing MySQL Databases
Mats Kindahl
 
Prestogres internals
Prestogres internalsPrestogres internals
Prestogres internals
Sadayuki Furuhashi
 
ELK: Moose-ively scaling your log system
ELK: Moose-ively scaling your log systemELK: Moose-ively scaling your log system
ELK: Moose-ively scaling your log system
Avleen Vig
 
Kudu - Fast Analytics on Fast Data
Kudu - Fast Analytics on Fast DataKudu - Fast Analytics on Fast Data
Kudu - Fast Analytics on Fast Data
Ryan Bosshart
 
Percona toolkit
Percona toolkitPercona toolkit
query-optimization-techniques_talk.pdf
query-optimization-techniques_talk.pdfquery-optimization-techniques_talk.pdf
query-optimization-techniques_talk.pdf
garos1
 
Oracle Database Performance Tuning Basics
Oracle Database Performance Tuning BasicsOracle Database Performance Tuning Basics
Oracle Database Performance Tuning Basics
nitin anjankar
 
orca_fosdem_FINAL
orca_fosdem_FINALorca_fosdem_FINAL
orca_fosdem_FINAL
addisonhuddy
 

Similar to Percona tool kit for MySQL DBA's (20)

Get More Out of MySQL with TokuDB
Get More Out of MySQL with TokuDBGet More Out of MySQL with TokuDB
Get More Out of MySQL with TokuDB
 
Postgres Toolkit
Postgres ToolkitPostgres Toolkit
Postgres Toolkit
 
Intro to HPC
Intro to HPCIntro to HPC
Intro to HPC
 
What you need to know for postgresql operation
What you need to know for postgresql operationWhat you need to know for postgresql operation
What you need to know for postgresql operation
 
Analyze database system using a 3 d method
Analyze database system using a 3 d methodAnalyze database system using a 3 d method
Analyze database system using a 3 d method
 
Performance Scenario: Diagnosing and resolving sudden slow down on two node RAC
Performance Scenario: Diagnosing and resolving sudden slow down on two node RACPerformance Scenario: Diagnosing and resolving sudden slow down on two node RAC
Performance Scenario: Diagnosing and resolving sudden slow down on two node RAC
 
Apache Spark for RDBMS Practitioners: How I Learned to Stop Worrying and Lov...
 Apache Spark for RDBMS Practitioners: How I Learned to Stop Worrying and Lov... Apache Spark for RDBMS Practitioners: How I Learned to Stop Worrying and Lov...
Apache Spark for RDBMS Practitioners: How I Learned to Stop Worrying and Lov...
 
NSCC Training Introductory Class
NSCC Training Introductory Class NSCC Training Introductory Class
NSCC Training Introductory Class
 
NSCC Training - Introductory Class
NSCC Training - Introductory ClassNSCC Training - Introductory Class
NSCC Training - Introductory Class
 
10 Reasons to Start Your Analytics Project with PostgreSQL
10 Reasons to Start Your Analytics Project with PostgreSQL10 Reasons to Start Your Analytics Project with PostgreSQL
10 Reasons to Start Your Analytics Project with PostgreSQL
 
20140128 webinar-get-more-out-of-mysql-with-tokudb-140319063324-phpapp02
20140128 webinar-get-more-out-of-mysql-with-tokudb-140319063324-phpapp0220140128 webinar-get-more-out-of-mysql-with-tokudb-140319063324-phpapp02
20140128 webinar-get-more-out-of-mysql-with-tokudb-140319063324-phpapp02
 
Building a Complex, Real-Time Data Management Application
Building a Complex, Real-Time Data Management ApplicationBuilding a Complex, Real-Time Data Management Application
Building a Complex, Real-Time Data Management Application
 
Python Utilities for Managing MySQL Databases
Python Utilities for Managing MySQL DatabasesPython Utilities for Managing MySQL Databases
Python Utilities for Managing MySQL Databases
 
Prestogres internals
Prestogres internalsPrestogres internals
Prestogres internals
 
ELK: Moose-ively scaling your log system
ELK: Moose-ively scaling your log systemELK: Moose-ively scaling your log system
ELK: Moose-ively scaling your log system
 
Kudu - Fast Analytics on Fast Data
Kudu - Fast Analytics on Fast DataKudu - Fast Analytics on Fast Data
Kudu - Fast Analytics on Fast Data
 
Percona toolkit
Percona toolkitPercona toolkit
Percona toolkit
 
query-optimization-techniques_talk.pdf
query-optimization-techniques_talk.pdfquery-optimization-techniques_talk.pdf
query-optimization-techniques_talk.pdf
 
Oracle Database Performance Tuning Basics
Oracle Database Performance Tuning BasicsOracle Database Performance Tuning Basics
Oracle Database Performance Tuning Basics
 
orca_fosdem_FINAL
orca_fosdem_FINALorca_fosdem_FINAL
orca_fosdem_FINAL
 

More from Remote MySQL DBA

Ansible for large scale deployment
Ansible for large scale deploymentAnsible for large scale deployment
Ansible for large scale deployment
Remote MySQL DBA
 
Scaling MySQL Using Fabric
Scaling MySQL Using FabricScaling MySQL Using Fabric
Scaling MySQL Using Fabric
Remote MySQL DBA
 
MySQL HA Percona cluster @ MySQL meetup Mumbai
MySQL HA Percona cluster @ MySQL meetup MumbaiMySQL HA Percona cluster @ MySQL meetup Mumbai
MySQL HA Percona cluster @ MySQL meetup Mumbai
Remote MySQL DBA
 
MySQL Query Optimization.
MySQL Query Optimization.MySQL Query Optimization.
MySQL Query Optimization.
Remote MySQL DBA
 
MySQL Storage Engines Basics.
MySQL Storage Engines Basics.MySQL Storage Engines Basics.
MySQL Storage Engines Basics.
Remote MySQL DBA
 
Mysql from a DBA Prespective
Mysql from a DBA PrespectiveMysql from a DBA Prespective
Mysql from a DBA Prespective
Remote MySQL DBA
 

More from Remote MySQL DBA (6)

Ansible for large scale deployment
Ansible for large scale deploymentAnsible for large scale deployment
Ansible for large scale deployment
 
Scaling MySQL Using Fabric
Scaling MySQL Using FabricScaling MySQL Using Fabric
Scaling MySQL Using Fabric
 
MySQL HA Percona cluster @ MySQL meetup Mumbai
MySQL HA Percona cluster @ MySQL meetup MumbaiMySQL HA Percona cluster @ MySQL meetup Mumbai
MySQL HA Percona cluster @ MySQL meetup Mumbai
 
MySQL Query Optimization.
MySQL Query Optimization.MySQL Query Optimization.
MySQL Query Optimization.
 
MySQL Storage Engines Basics.
MySQL Storage Engines Basics.MySQL Storage Engines Basics.
MySQL Storage Engines Basics.
 
Mysql from a DBA Prespective
Mysql from a DBA PrespectiveMysql from a DBA Prespective
Mysql from a DBA Prespective
 

Recently uploaded

Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
Neo4j
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Zilliz
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
Rohit Gautam
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
Edge AI and Vision Alliance
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 

Recently uploaded (20)

Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 

Percona tool kit for MySQL DBA's

  • 1. 1 Percona Tool kits For DBA’s
  • 2. 2 • P.R.Karthik • 3 Years plus experience in MySQL as a DBA. • Worked for various e-commerce companies in INDIA. • Currently in one of biggest MySQL server farms. • remotemysqldba.blogspot.in About me
  • 3. Percona Tool kit • Maintained by Percona Team. • Originated from Aspersa and Maakit. • Initially Designed by Baron Schwartz. • Designed for MySQL and its forks. • Works on all Linux Platforms. • Matured and proven tool. • Set of 33 cmd line tools. • Latest version 2.2.5 ( 16-10-2013) 3
  • 4. Percona Tool kit • Pt-query-digest • Pt-table-checksum • Pt-table-sync • Pt-online-schema-change • Pt-kill 4
  • 6. Pt-query-digest • Analyses the Queries. • Slow query log, Query logs. • Works on tcpdump too. Other tools for Query logs 1) Mysqldumpslow 2) mysqlsla 6
  • 9. Pt-query-digest • It collects the queries and rank them based on the usage stats. • The queries collected can be analyzed easily. Query Analyzers: Pt-Visual-explain and Visual Explain ( MySQL 5.6 Workbench ) 9
  • 11. Pt-table-checksum It helps in checking the replication integrity of mysql. Need to check: • Direct writes on slave. • Skipping the events. • Many others. 11
  • 13. Pt-table-checksum How it works : 1) Check for replication lag 2) Takes data in small chunks. 3) Make checksum on chunk with replace into select. 4) Displays the output. Note: It has more safety options. 13
  • 15. Pt-table-sync Synchronizes the data between the master and slave servers. It is a very effective tool and it can be used along with pt-table-checksum to make the data sync. 15
  • 16. Pt-table-sync • pt-table-sync --execute h=10.0.0.25,u=pttool,p=tool --sync-to-master --print --databases world 16
  • 17. Pt-table-sync How it works : 1) Check for replication lag and delay. 2) Takes data in small chunks. 3) Make the data check based on Pk or Unique index most cases. 4) Then synchronizes the data. Note: It is a read/write tool, precautions must be taken. 17
  • 19. Pt-OSC Helps in modifying the table structure without much locking. Need to alter: • Adding an index for performance. • Modifying a column. • Adding a column. • Altering the engine 19
  • 20. Pt-OSC How it works : 1) Create a new table with modified structure. 2) Creates triggers for data changes. 3) Copies data in small chunks. 4) Swaps the table. 5) Drop the old table and triggers. 20
  • 21. Pt-OSC Adding a column: pt-online-schema-change --execute --user=pttool --pass=tool --alter "add column region char(30)" D=world,t=page_city Adding a Index: pt-online-schema-change --execute --user=pttool --pass=tool --alter "add index idx_dist (District)" D=world,t=page_city Altering Engine : pt-online-schema-change --execute --user=pttool –pass=tool --alter "engine=innodb" D=world,t=hio_city 21
  • 23. Pt-kill It helps to kill queries based on the filter input. Repetitive and mass killing Need to Kill: • Application not closing the connection properly • Ill framed resource consuming queries • Too many bad queries running in parallel. 23
  • 24. Pt-kill For sleep queries: pt-kill --user kill --ask-pass --socket=/tmp/mysql.sock --database test --match- command Sleep --kill --print --victims all --interval 15 For user specific: pt-kill --user kill --ask-pass --socket=/tmp/mysql.sock --print --match-user benchmark --kill --victims all For pattern match: pt-kill --user kill --ask-pass --socket=/tmp/mysql.sock --kill-query --victims all --database test --match-info 'SELECT DISTINCT c from sbtest' 24