SlideShare a Scribd company logo
1 of 26
Backup/Restore tools
performance
comparison
Vinicius M Grippa/Support Engineer
Jean Da Silva/Support Engineer
© 2022 Percona | Confidential
About us
• Support Engineers
• Working with MySQL and MongoDB
• Vinicius Grippa - https://www.linkedin.com/in/vinicius-
grippa/
• Jean Da Silva - https://www.linkedin.com/in/jenunes/
2
Backup Tools
© 2022 Percona | Confidential
Backup Tools
● mysqldump
● mydumper
● mysqlpump
● Xtrabackup
● MySQL shell
© 2022 Percona | Confidential
Backup Options
● Physical Backups - Copies all the physical files that belongs to
the database.
● Logical Backup - You don't take copies of files, you only
extracted data from the data files into dump files.
© 2022 Percona | Confidential
Things to
consider when
taking a backup
● Network Encryption
● File encryption
● Single Thread x Multi Thread
● Data compression
● Backup Size
● Backup Time
● Restore Time
● Total time
● PITR
● etc…
Backup Benchmark
The first side of the history…
© 2022 Percona | Confidential
Benchmark
Specs of the benchmark:
● 32 CPUs ( m5dn.8xlarge )
● 128GB Memory
● 2x io1 disks 600GB and 5000
IOPs
● Centos 7.9
Tool Version:
● MySQL 8.0.26
● MySQL shell 8.0.26
● mydumper 0.11.5 – gzip
● mydumper 0.11.5 – zstd
● Xtrabackup 8.0.26
Database:
● 96GB (In-Disk)
● 90 Tables
● Different sizes
● tpcc (sysbench)
© 2022 Percona | Confidential
Results
© 2022 Percona | Confidential
Results
© 2022 Percona | Confidential
Results
© 2022 Percona | Confidential
Results without
mysqldump
© 2022 Percona | Confidential
Questions and
comments
13
Does xtrabackup support zstd?
A: No, but we opened a FR:
https://jira.percona.com/browse/PXB-2669
You can "pipe" xtrabackup output
TCP/IP vs Socket?
A: The impact is neglectable.
SSL vs No SSL?
Compared both options with mydumper and it does not seem a big
difference:
SSL: 76s
No SSL: 72s
Restore Benchmark
The second side of the history…
© 2022 Percona | Confidential
Benchmark
Specs of the benchmark:
● 32 CPUs ( m5dn.8xlarge )
● 128GB Memory
● 2x io1 disks 600GB and 5000
IOPs
● Centos 7.9
Tool Version:
● MySQL 8.0.26
● MySQL shell 8.0.26
● mydumper 0.11.5 – gzip
● mydumper 0.11.5 – zstd
● Xtrabackup 8.0.26
Database:
● 96GB (In-Disk)
● 90 Tables
● Different sizes
● tpcc (sysbench)
© 2022 Percona | Confidential
Benchmark
© 2022 Percona | Confidential
Benchmark
(without
mysqldump)
Conclusion
The final side of the history…
© 2022 Percona | Confidential
Backup +
Restore
© 2022 Percona | Confidential
Backup +
Restore
(without
mysqldump)
© 2022 Percona | Confidential
Xtrabackup seems to offer the best balance between backup/restore time
with backup size (when using compression).
mydumper/myloader and MySQL shell are the best backup/restore options
for logical backup.
mysqlpump offers great backup capacity, but the lack of parallelism to
restore the data is a great disadvantage for the tool.
Overall, using compression does not impact significantly the performance of
backup/restore. The big advantage is disk saving.
The parallelism offers a big boost in performance. However, the benefits of
increasing the number of threads are limited by the I/O capacity.
Analysis
© 2022 Percona | Confidential
It is possible to squeeze more juice from logical restores. Disabling writes in
the binary logs, flexing ACID properties so it makes writes asynchronous,
disable double write buffer are options that can be taken if you can trade
reliability for performance.
Blog post:
How to improve InnoDB performance by 55% for write-bound loads
Example of settings:
[mysqld]
innodb_write_io_threads=8 innodb_buffer_pool_size=20G
innodb_log_file_size = X Gb #Small log files, more page flush
innodb_flush_method=O_DIRECT
innodb_flush_log_at_trx_commit=0
skip-innodb-doublewrite #commented or not depending on test
Analysis
© 2022 Percona | Confidential
Choice of the
presenter
So Vinicius/Jean, which backup and restore method would you
pick? And why?
© 2022 Percona | Confidential
Choice of the
presenter -
Vinicius Grippa
If it is a one-time backup, I would use MySQL Shell (in case of
MySQL 8) or mydumper/myloader (MySQL 5.7 and 8). I'm familiar
with the commands and they execute relatively fast, which is good
to rebuild replica servers.
If it is a backup/restore routine, I would go with xtrabackup. Mainly
because of the PITR feature.
© 2022 Percona | Confidential
Choice of the
presenter - Jean
da Silva
Generally speaking, I would choose to go with Xtrabackup.
It’s nice to see tools like MySQLShell and mydumper/myloader
with great numbers over the tests, and mainly being a viable option
for the community.
But thinking in the routine as whole or even to quickly build a
node. Xtrabackup provides the necessary means for that.
谢谢
Thank you
Grazie
Obrigado
Gracias
percona.com/contact | info@percona.com
vinicius.grippa@percona.com

More Related Content

Similar to MySQL backup and restore performance

Open Source Data Deduplication
Open Source Data DeduplicationOpen Source Data Deduplication
Open Source Data DeduplicationRedWireServices
 
Percona XtraBackup - New Features and Improvements
Percona XtraBackup - New Features and ImprovementsPercona XtraBackup - New Features and Improvements
Percona XtraBackup - New Features and ImprovementsMarcelo Altmann
 
Implementing data and databases on K8s within the Dutch government
Implementing data and databases on K8s within the Dutch governmentImplementing data and databases on K8s within the Dutch government
Implementing data and databases on K8s within the Dutch governmentDoKC
 
MariaDB und mehr - MariaDB Roadshow Summer 2014 Hamburg Berlin Frankfurt
MariaDB und mehr - MariaDB Roadshow Summer 2014 Hamburg Berlin FrankfurtMariaDB und mehr - MariaDB Roadshow Summer 2014 Hamburg Berlin Frankfurt
MariaDB und mehr - MariaDB Roadshow Summer 2014 Hamburg Berlin FrankfurtMariaDB Corporation
 
Faster, better, stronger: The new InnoDB
Faster, better, stronger: The new InnoDBFaster, better, stronger: The new InnoDB
Faster, better, stronger: The new InnoDBMariaDB plc
 
High Performance Object Storage in 30 Minutes with Supermicro and MinIO
High Performance Object Storage in 30 Minutes with Supermicro and MinIOHigh Performance Object Storage in 30 Minutes with Supermicro and MinIO
High Performance Object Storage in 30 Minutes with Supermicro and MinIORebekah Rodriguez
 
https://docs.google.com/presentation/d/1DcL4zK6i3HZRDD4xTGX1VpSOwyu2xBeWLT6a_...
https://docs.google.com/presentation/d/1DcL4zK6i3HZRDD4xTGX1VpSOwyu2xBeWLT6a_...https://docs.google.com/presentation/d/1DcL4zK6i3HZRDD4xTGX1VpSOwyu2xBeWLT6a_...
https://docs.google.com/presentation/d/1DcL4zK6i3HZRDD4xTGX1VpSOwyu2xBeWLT6a_...MongoDB
 
Benchmarking your cloud performance with top 4 global public clouds
Benchmarking your cloud performance with top 4 global public cloudsBenchmarking your cloud performance with top 4 global public clouds
Benchmarking your cloud performance with top 4 global public cloudsdata://disrupted®
 
INFINIDAT InfiniGuard - 20220330.pdf
INFINIDAT InfiniGuard - 20220330.pdfINFINIDAT InfiniGuard - 20220330.pdf
INFINIDAT InfiniGuard - 20220330.pdfMarketingArrowECS_CZ
 
Advanced MySql Data-at-Rest Encryption in Percona Server
Advanced MySql Data-at-Rest Encryption in Percona ServerAdvanced MySql Data-at-Rest Encryption in Percona Server
Advanced MySql Data-at-Rest Encryption in Percona ServerSeveralnines
 
NetflixOSS Meetup season 3 episode 1
NetflixOSS Meetup season 3 episode 1NetflixOSS Meetup season 3 episode 1
NetflixOSS Meetup season 3 episode 1Ruslan Meshenberg
 
Troubleshooting MySQL from a MySQL Developer Perspective
Troubleshooting MySQL from a MySQL Developer PerspectiveTroubleshooting MySQL from a MySQL Developer Perspective
Troubleshooting MySQL from a MySQL Developer PerspectiveMarcelo Altmann
 
MongoDB: Advantages of an Open Source NoSQL Database
MongoDB: Advantages of an Open Source NoSQL DatabaseMongoDB: Advantages of an Open Source NoSQL Database
MongoDB: Advantages of an Open Source NoSQL DatabaseFITC
 
IBM Analytics Accelerator Trends & Directions Namk Hrle
IBM Analytics Accelerator  Trends & Directions Namk Hrle IBM Analytics Accelerator  Trends & Directions Namk Hrle
IBM Analytics Accelerator Trends & Directions Namk Hrle Surekha Parekh
 
IBM DB2 Analytics Accelerator Trends & Directions by Namik Hrle
IBM DB2 Analytics Accelerator  Trends & Directions by Namik Hrle IBM DB2 Analytics Accelerator  Trends & Directions by Namik Hrle
IBM DB2 Analytics Accelerator Trends & Directions by Namik Hrle Surekha Parekh
 
Nagios Conference 2012 - Dan Wittenberg - Case Study: Scaling Nagios Core at ...
Nagios Conference 2012 - Dan Wittenberg - Case Study: Scaling Nagios Core at ...Nagios Conference 2012 - Dan Wittenberg - Case Study: Scaling Nagios Core at ...
Nagios Conference 2012 - Dan Wittenberg - Case Study: Scaling Nagios Core at ...Nagios
 
The Proper Care and Feeding of MySQL Databases
The Proper Care and Feeding of MySQL DatabasesThe Proper Care and Feeding of MySQL Databases
The Proper Care and Feeding of MySQL DatabasesDave Stokes
 

Similar to MySQL backup and restore performance (20)

Open Source Data Deduplication
Open Source Data DeduplicationOpen Source Data Deduplication
Open Source Data Deduplication
 
Percona XtraBackup - New Features and Improvements
Percona XtraBackup - New Features and ImprovementsPercona XtraBackup - New Features and Improvements
Percona XtraBackup - New Features and Improvements
 
The Accidental DBA
The Accidental DBAThe Accidental DBA
The Accidental DBA
 
OpenStack Days Krakow
OpenStack Days KrakowOpenStack Days Krakow
OpenStack Days Krakow
 
Introducing PMDK into PostgreSQL
Introducing PMDK into PostgreSQLIntroducing PMDK into PostgreSQL
Introducing PMDK into PostgreSQL
 
Implementing data and databases on K8s within the Dutch government
Implementing data and databases on K8s within the Dutch governmentImplementing data and databases on K8s within the Dutch government
Implementing data and databases on K8s within the Dutch government
 
MariaDB und mehr - MariaDB Roadshow Summer 2014 Hamburg Berlin Frankfurt
MariaDB und mehr - MariaDB Roadshow Summer 2014 Hamburg Berlin FrankfurtMariaDB und mehr - MariaDB Roadshow Summer 2014 Hamburg Berlin Frankfurt
MariaDB und mehr - MariaDB Roadshow Summer 2014 Hamburg Berlin Frankfurt
 
Faster, better, stronger: The new InnoDB
Faster, better, stronger: The new InnoDBFaster, better, stronger: The new InnoDB
Faster, better, stronger: The new InnoDB
 
High Performance Object Storage in 30 Minutes with Supermicro and MinIO
High Performance Object Storage in 30 Minutes with Supermicro and MinIOHigh Performance Object Storage in 30 Minutes with Supermicro and MinIO
High Performance Object Storage in 30 Minutes with Supermicro and MinIO
 
https://docs.google.com/presentation/d/1DcL4zK6i3HZRDD4xTGX1VpSOwyu2xBeWLT6a_...
https://docs.google.com/presentation/d/1DcL4zK6i3HZRDD4xTGX1VpSOwyu2xBeWLT6a_...https://docs.google.com/presentation/d/1DcL4zK6i3HZRDD4xTGX1VpSOwyu2xBeWLT6a_...
https://docs.google.com/presentation/d/1DcL4zK6i3HZRDD4xTGX1VpSOwyu2xBeWLT6a_...
 
Benchmarking your cloud performance with top 4 global public clouds
Benchmarking your cloud performance with top 4 global public cloudsBenchmarking your cloud performance with top 4 global public clouds
Benchmarking your cloud performance with top 4 global public clouds
 
INFINIDAT InfiniGuard - 20220330.pdf
INFINIDAT InfiniGuard - 20220330.pdfINFINIDAT InfiniGuard - 20220330.pdf
INFINIDAT InfiniGuard - 20220330.pdf
 
Advanced MySql Data-at-Rest Encryption in Percona Server
Advanced MySql Data-at-Rest Encryption in Percona ServerAdvanced MySql Data-at-Rest Encryption in Percona Server
Advanced MySql Data-at-Rest Encryption in Percona Server
 
NetflixOSS Meetup season 3 episode 1
NetflixOSS Meetup season 3 episode 1NetflixOSS Meetup season 3 episode 1
NetflixOSS Meetup season 3 episode 1
 
Troubleshooting MySQL from a MySQL Developer Perspective
Troubleshooting MySQL from a MySQL Developer PerspectiveTroubleshooting MySQL from a MySQL Developer Perspective
Troubleshooting MySQL from a MySQL Developer Perspective
 
MongoDB: Advantages of an Open Source NoSQL Database
MongoDB: Advantages of an Open Source NoSQL DatabaseMongoDB: Advantages of an Open Source NoSQL Database
MongoDB: Advantages of an Open Source NoSQL Database
 
IBM Analytics Accelerator Trends & Directions Namk Hrle
IBM Analytics Accelerator  Trends & Directions Namk Hrle IBM Analytics Accelerator  Trends & Directions Namk Hrle
IBM Analytics Accelerator Trends & Directions Namk Hrle
 
IBM DB2 Analytics Accelerator Trends & Directions by Namik Hrle
IBM DB2 Analytics Accelerator  Trends & Directions by Namik Hrle IBM DB2 Analytics Accelerator  Trends & Directions by Namik Hrle
IBM DB2 Analytics Accelerator Trends & Directions by Namik Hrle
 
Nagios Conference 2012 - Dan Wittenberg - Case Study: Scaling Nagios Core at ...
Nagios Conference 2012 - Dan Wittenberg - Case Study: Scaling Nagios Core at ...Nagios Conference 2012 - Dan Wittenberg - Case Study: Scaling Nagios Core at ...
Nagios Conference 2012 - Dan Wittenberg - Case Study: Scaling Nagios Core at ...
 
The Proper Care and Feeding of MySQL Databases
The Proper Care and Feeding of MySQL DatabasesThe Proper Care and Feeding of MySQL Databases
The Proper Care and Feeding of MySQL Databases
 

More from Vinicius M Grippa

MySQL up and running 30 minutes.pdf
MySQL up and running 30 minutes.pdfMySQL up and running 30 minutes.pdf
MySQL up and running 30 minutes.pdfVinicius M Grippa
 
Moving mongo db to the cloud strategies and points to consider
Moving mongo db to the cloud  strategies and points to considerMoving mongo db to the cloud  strategies and points to consider
Moving mongo db to the cloud strategies and points to considerVinicius M Grippa
 
Cpu analysis with flamegraphs
Cpu analysis with flamegraphsCpu analysis with flamegraphs
Cpu analysis with flamegraphsVinicius M Grippa
 
Percona Live 2019 - MySQL Security
Percona Live 2019 - MySQL SecurityPercona Live 2019 - MySQL Security
Percona Live 2019 - MySQL SecurityVinicius M Grippa
 

More from Vinicius M Grippa (9)

MySQL up and running 30 minutes.pdf
MySQL up and running 30 minutes.pdfMySQL up and running 30 minutes.pdf
MySQL up and running 30 minutes.pdf
 
Moving mongo db to the cloud strategies and points to consider
Moving mongo db to the cloud  strategies and points to considerMoving mongo db to the cloud  strategies and points to consider
Moving mongo db to the cloud strategies and points to consider
 
Guob - MySQL e LGPD
Guob - MySQL e LGPDGuob - MySQL e LGPD
Guob - MySQL e LGPD
 
Cpu analysis with flamegraphs
Cpu analysis with flamegraphsCpu analysis with flamegraphs
Cpu analysis with flamegraphs
 
Enhancing MySQL Security
Enhancing MySQL SecurityEnhancing MySQL Security
Enhancing MySQL Security
 
Percona Live 2019 - MySQL Security
Percona Live 2019 - MySQL SecurityPercona Live 2019 - MySQL Security
Percona Live 2019 - MySQL Security
 
K8s - Setting up minikube
K8s  - Setting up minikubeK8s  - Setting up minikube
K8s - Setting up minikube
 
Proxy SQL 2.0 with PXC
Proxy SQL 2.0 with PXCProxy SQL 2.0 with PXC
Proxy SQL 2.0 with PXC
 
Enhancing MySQL Security
Enhancing MySQL SecurityEnhancing MySQL Security
Enhancing MySQL Security
 

Recently uploaded

The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningVitsRangannavar
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
buds n tech IT solutions
buds n  tech IT                solutionsbuds n  tech IT                solutions
buds n tech IT solutionsmonugehlot87
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsMehedi Hasan Shohan
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 

Recently uploaded (20)

The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learning
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
buds n tech IT solutions
buds n  tech IT                solutionsbuds n  tech IT                solutions
buds n tech IT solutions
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software Solutions
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 

MySQL backup and restore performance

  • 1. Backup/Restore tools performance comparison Vinicius M Grippa/Support Engineer Jean Da Silva/Support Engineer
  • 2. © 2022 Percona | Confidential About us • Support Engineers • Working with MySQL and MongoDB • Vinicius Grippa - https://www.linkedin.com/in/vinicius- grippa/ • Jean Da Silva - https://www.linkedin.com/in/jenunes/ 2
  • 4. © 2022 Percona | Confidential Backup Tools ● mysqldump ● mydumper ● mysqlpump ● Xtrabackup ● MySQL shell
  • 5. © 2022 Percona | Confidential Backup Options ● Physical Backups - Copies all the physical files that belongs to the database. ● Logical Backup - You don't take copies of files, you only extracted data from the data files into dump files.
  • 6. © 2022 Percona | Confidential Things to consider when taking a backup ● Network Encryption ● File encryption ● Single Thread x Multi Thread ● Data compression ● Backup Size ● Backup Time ● Restore Time ● Total time ● PITR ● etc…
  • 7. Backup Benchmark The first side of the history…
  • 8. © 2022 Percona | Confidential Benchmark Specs of the benchmark: ● 32 CPUs ( m5dn.8xlarge ) ● 128GB Memory ● 2x io1 disks 600GB and 5000 IOPs ● Centos 7.9 Tool Version: ● MySQL 8.0.26 ● MySQL shell 8.0.26 ● mydumper 0.11.5 – gzip ● mydumper 0.11.5 – zstd ● Xtrabackup 8.0.26 Database: ● 96GB (In-Disk) ● 90 Tables ● Different sizes ● tpcc (sysbench)
  • 9. © 2022 Percona | Confidential Results
  • 10. © 2022 Percona | Confidential Results
  • 11. © 2022 Percona | Confidential Results
  • 12. © 2022 Percona | Confidential Results without mysqldump
  • 13. © 2022 Percona | Confidential Questions and comments 13 Does xtrabackup support zstd? A: No, but we opened a FR: https://jira.percona.com/browse/PXB-2669 You can "pipe" xtrabackup output TCP/IP vs Socket? A: The impact is neglectable. SSL vs No SSL? Compared both options with mydumper and it does not seem a big difference: SSL: 76s No SSL: 72s
  • 14. Restore Benchmark The second side of the history…
  • 15. © 2022 Percona | Confidential Benchmark Specs of the benchmark: ● 32 CPUs ( m5dn.8xlarge ) ● 128GB Memory ● 2x io1 disks 600GB and 5000 IOPs ● Centos 7.9 Tool Version: ● MySQL 8.0.26 ● MySQL shell 8.0.26 ● mydumper 0.11.5 – gzip ● mydumper 0.11.5 – zstd ● Xtrabackup 8.0.26 Database: ● 96GB (In-Disk) ● 90 Tables ● Different sizes ● tpcc (sysbench)
  • 16. © 2022 Percona | Confidential Benchmark
  • 17. © 2022 Percona | Confidential Benchmark (without mysqldump)
  • 18. Conclusion The final side of the history…
  • 19. © 2022 Percona | Confidential Backup + Restore
  • 20. © 2022 Percona | Confidential Backup + Restore (without mysqldump)
  • 21. © 2022 Percona | Confidential Xtrabackup seems to offer the best balance between backup/restore time with backup size (when using compression). mydumper/myloader and MySQL shell are the best backup/restore options for logical backup. mysqlpump offers great backup capacity, but the lack of parallelism to restore the data is a great disadvantage for the tool. Overall, using compression does not impact significantly the performance of backup/restore. The big advantage is disk saving. The parallelism offers a big boost in performance. However, the benefits of increasing the number of threads are limited by the I/O capacity. Analysis
  • 22. © 2022 Percona | Confidential It is possible to squeeze more juice from logical restores. Disabling writes in the binary logs, flexing ACID properties so it makes writes asynchronous, disable double write buffer are options that can be taken if you can trade reliability for performance. Blog post: How to improve InnoDB performance by 55% for write-bound loads Example of settings: [mysqld] innodb_write_io_threads=8 innodb_buffer_pool_size=20G innodb_log_file_size = X Gb #Small log files, more page flush innodb_flush_method=O_DIRECT innodb_flush_log_at_trx_commit=0 skip-innodb-doublewrite #commented or not depending on test Analysis
  • 23. © 2022 Percona | Confidential Choice of the presenter So Vinicius/Jean, which backup and restore method would you pick? And why?
  • 24. © 2022 Percona | Confidential Choice of the presenter - Vinicius Grippa If it is a one-time backup, I would use MySQL Shell (in case of MySQL 8) or mydumper/myloader (MySQL 5.7 and 8). I'm familiar with the commands and they execute relatively fast, which is good to rebuild replica servers. If it is a backup/restore routine, I would go with xtrabackup. Mainly because of the PITR feature.
  • 25. © 2022 Percona | Confidential Choice of the presenter - Jean da Silva Generally speaking, I would choose to go with Xtrabackup. It’s nice to see tools like MySQLShell and mydumper/myloader with great numbers over the tests, and mainly being a viable option for the community. But thinking in the routine as whole or even to quickly build a node. Xtrabackup provides the necessary means for that.
  • 26. 谢谢 Thank you Grazie Obrigado Gracias percona.com/contact | info@percona.com vinicius.grippa@percona.com

Editor's Notes

  1. Thank you, Vinnie, and hello everyone. Let’s keep the pace, but at this time, speaking about the restore results. As you might know, a good backup policy needs to consider the restore process as well, and for that, we are going to share the number we got over the tests that can help you with your decisions.
  2. The restore process did run at the same machine. Here is a brief review to refresh that information: 32 CPUs Two nvme disks with the same size and throughput capacity. The tools were on the latest version at that time. And database size of 98GB.
  3. Let’s start with the restore time. As we can see, mysqldump took around 27hrs to finish the restore. On the other hand, the other tools did perform way better. But we can not forget to mention that as a single threaded tool, and theses results with mysqldump was expected on our side. For a clear visualization, let's zoom in and look into that information without the noise of mysqldump.
  4. Here we can see that either MySQLShell or myloader performed very well. Myloader was the fastest, but by a slight margin running a no compressed restore, it took around 36minutes while MySQLShell took around 37 minutes, not that much, right?! But very good results for both, even during the higher parallelism tests. But do you remember what I said at the begging of my presentation? So, yeah A good backup policy needs to consider a restore process as well. I’m pointing out that because mysqlpump had a great battle during the backup tests. But unfortunately, when we moved to restoration, the lack of parallelism had a critical impact on its performance. And last but not least, we have Xtrabackup with 2 minutes to restore non-compressed data and 7 minutes with a compressed dataset. ====================================== # time cp no_compress/* /mysql/ -R real 4m34.742s 274 seconds + 3 seconds prepare = 277 seconds # time xtrabackup --prepare --target-dir=/backup/xtrabackup/no_compress/ real 0m3.013s # time xtrabackup --decompress --parallel=16 --target-dir=/backup/xtrabackup/compress real 2m28.039s
  5. After these rounds of testing, let’s summarize backup and restore and see what we got at the end of this battle.
  6. Here we have the result in seconds. And seem before, the battle between MySQLShell and myloader/mydumper didn’t finish. Let’s zoom in again and see the numbers closer.
  7. By a very close margin, the result time varies a little between both, and at this point, to pick a side, it goes more on personal preferences than numbers themselves, since both got very good values. Mysqlpump had a great start with the power of parallelism for backups. However, when requested for restores, it, unfortunately, lacks such a feature, which caused the bump in the numbers leading the entire procedure to take around 3hours to complete. And again, with excellent numbers, we have Xtrabackup, which took less than 10min to run a backup and restore routine.
  8. Vinicius
  9. Vinicius