Server For MySQL? Why Choose Percona Cho… · • Available in Percona Server for MySQL...

26
Why Choose Percona Server For MySQL? Tyler Duzan Product Manager

Transcript of Server For MySQL? Why Choose Percona Cho… · • Available in Percona Server for MySQL...

Page 1: Server For MySQL? Why Choose Percona Cho… · • Available in Percona Server for MySQL 5.6.33-79.0 and 5.7.17-11 or later • Makes use of the ZLIB compression library, same library

Why Choose Percona Server For MySQL?

Tyler DuzanProduct Manager

Page 2: Server For MySQL? Why Choose Percona Cho… · • Available in Percona Server for MySQL 5.6.33-79.0 and 5.7.17-11 or later • Makes use of the ZLIB compression library, same library

2

Who Am I?

• My name is Tyler Duzan• Formerly an operations engineer for

more than 12 years focused on security and automation

• Now a Product Manager at Percona• Have been using MySQL in

production for around 5 years

Page 3: Server For MySQL? Why Choose Percona Cho… · • Available in Percona Server for MySQL 5.6.33-79.0 and 5.7.17-11 or later • Makes use of the ZLIB compression library, same library

3

Outline

1. Bio & Outline2. Percona Server for MySQL Overview

• What is Percona Server for MySQL?• Comparing Percona Server for MySQL to MariaDB Server• Comparing Percona Server for MySQL to MySQL Community

3. Using Percona Server for MySQL Features4. Making The Choice

• Evaluating Your Use Case• Open Source is About Choice

5. Q&A

Page 4: Server For MySQL? Why Choose Percona Cho… · • Available in Percona Server for MySQL 5.6.33-79.0 and 5.7.17-11 or later • Makes use of the ZLIB compression library, same library

Percona Server for MySQL Overview

Page 5: Server For MySQL? Why Choose Percona Cho… · • Available in Percona Server for MySQL 5.6.33-79.0 and 5.7.17-11 or later • Makes use of the ZLIB compression library, same library

5

What is Percona Server for MySQL?

• First release in December 2008• Focused on performance and stability improvements layered on top of MySQL

Community Edition• Addresses a need for deeper diagnostics and performance tuning capabilities• Provides a place to develop new storage engines and strategies

• XtraDB developed as high performance drop-in replacement for InnoDB• TokuDB focused on write-heavy workloads, supports fractal-tree indexes• MyRocks focused on write-heavy workloads, supports LSM trees

• MySQL Enterprise features available in an open-source release• Expedited bug fixes for Percona Support customers and shared with the

community

Page 6: Server For MySQL? Why Choose Percona Cho… · • Available in Percona Server for MySQL 5.6.33-79.0 and 5.7.17-11 or later • Makes use of the ZLIB compression library, same library

6

What is Percona Server for MySQL?

Page 7: Server For MySQL? Why Choose Percona Cho… · • Available in Percona Server for MySQL 5.6.33-79.0 and 5.7.17-11 or later • Makes use of the ZLIB compression library, same library

7

Percona Server vs MariaDB Server

• Maintains drop-in compatibility with MySQL, while MariaDB Server has diverged

• Higher performance default configuration for out-of-the-box speed• Contains all new MySQL features, including Group Replication• MariaDB includes Galera Cluster as a plugin, Percona has been

developing Percona XtraDB Cluster (PXC) since 2012• PXC is shipped as a special release of Percona Server for MySQL with a patched

version of Galera built-in with numerous improvements and integration with ProxySQL

Page 8: Server For MySQL? Why Choose Percona Cho… · • Available in Percona Server for MySQL 5.6.33-79.0 and 5.7.17-11 or later • Makes use of the ZLIB compression library, same library

8

Percona Server vs MySQL Community

• MySQL Enterprise features without the licensing cost• Thread Pooling• PAM Authentication

• Extra Diagnostic Features• Additional counters• Improved SHOW and EXPLAIN commands

• Improved Performance• XtraDB• Improved flushing and buffer pool scalability• Additional configuration tunables• Capability for compressed columns with dictionaries

Page 9: Server For MySQL? Why Choose Percona Cho… · • Available in Percona Server for MySQL 5.6.33-79.0 and 5.7.17-11 or later • Makes use of the ZLIB compression library, same library

9

Percona Server vs MySQL Community, Cont.• Improved Stability and Security

• XtraBackup integrations and lightweight backup locks• Ability to kill idle transactions• Improved handling of corrupted tables• Ability to enforce a specific storage engine for table creation

• Additional Storage Engines• TokuDB• MyRocks (experimental)

Page 10: Server For MySQL? Why Choose Percona Cho… · • Available in Percona Server for MySQL 5.6.33-79.0 and 5.7.17-11 or later • Makes use of the ZLIB compression library, same library

Using Percona Server for MySQL Features

Page 11: Server For MySQL? Why Choose Percona Cho… · • Available in Percona Server for MySQL 5.6.33-79.0 and 5.7.17-11 or later • Makes use of the ZLIB compression library, same library

11

Extended SHOW INNODB ENGINE STATUS• Part of the troubleshooting/informational improvements to MySQL• Available in Percona Server for MySQL 5.5.31-30.3, 5.6.11-60.3, and 5.7.10-1

or later• Adds additional information and reorganizes the output of SHOW INNODB ENGINE STATUS• In the log section

• Max checkpoint age, Checkpoint age target, Modified age, Checkpoint age• In the buffer pool and memory section

• Internal Hash Tables, Buffer pool size in bytes• In the row operations section

• Count of RW transactions occurring inside InnoDB

• Additionally lets the administrator control showing locks with the variable innodb_show_verbose_locks

Page 12: Server For MySQL? Why Choose Percona Cho… · • Available in Percona Server for MySQL 5.6.33-79.0 and 5.7.17-11 or later • Makes use of the ZLIB compression library, same library

12

MyRocks Storage Engine

• Experimental packages available starting with 5.7.19-17• Based on RocksDB, added through joint effort of Percona and Facebook• Facebook has migrated their entire user DB from InnoDB to MyRocks• Compared to InnoDB, MyRocks is better optimized for write-heavy

workloads by making use of LSM-tree based indexes• Requires less storage space on disk by implementing more efficient

on-disk format• Is SSD storage optimized to increase storage endurance• SSD storage optimizations also increase overall IO performance of the

underlying storage due to different access patterns

Page 13: Server For MySQL? Why Choose Percona Cho… · • Available in Percona Server for MySQL 5.6.33-79.0 and 5.7.17-11 or later • Makes use of the ZLIB compression library, same library

13

MyRocks Storage Engine

• Below figures are all based on Mark Callaghan’s Linkbench testing• MyRocks uses 1/2 the space on disk of Compressed InnoDB• MyRocks uses 1/3 the space on disk of Uncompressed InnoDB• MyRocks insert performance doesn't degrade when the database is larger

than memory• For IO-Bound write workloads, MyRocks has almost double the insert rate

of InnoDB• Due to better IO efficiency, MyRocks shows an almost 1.5x increase in

TPS compared to Compressed InnoDB

Page 14: Server For MySQL? Why Choose Percona Cho… · • Available in Percona Server for MySQL 5.6.33-79.0 and 5.7.17-11 or later • Makes use of the ZLIB compression library, same library

14

Enforcing the Storage Engine

• Available in Percona Server for MySQL 5.6.11-60.3 and 5.7.10-1 or later• Is implemented as a variable which can be used for enforcing the use of a

specific storage engine for table creation• When this variable is specified and a user tries to create a table using an

explicit storage engine that is not the specified enforced engine:• If the NO_ENGINE_SUBSTITUTION SQL mode is enabled the user will receive an

error• If the NO_ENGINE_SUBSTITUTION SQL mode is disabled the user will receive a

warning and the table will be created with the enforced engine in accordance with MySQL behavior with default engines

• This feature must be disabled before performing a mysql_upgrade• There also is an optional utility user with admin access for DBaaS uses

Page 15: Server For MySQL? Why Choose Percona Cho… · • Available in Percona Server for MySQL 5.6.33-79.0 and 5.7.17-11 or later • Makes use of the ZLIB compression library, same library

15

Column Compression with Dictionaries

• Based on contributions from Pinterest in conjunction with Percona• Available in Percona Server for MySQL 5.6.33-79.0 and 5.7.17-11 or later• Makes use of the ZLIB compression library, same library as is used by

InnoDB Page Compression in 5.7• Due to the ability to provide pre-defined dictionaries can be optimized for

JSON• Is a data-type modifier, so operates transparently and exists

independently from user-level SQL or InnoDB compression.• Causes the data stored in the column to be compressed on writing to storage and

decompressed on reading. For all other purposes, the data type is identical to the one without the modifier

Page 16: Server For MySQL? Why Choose Percona Cho… · • Available in Percona Server for MySQL 5.6.33-79.0 and 5.7.17-11 or later • Makes use of the ZLIB compression library, same library

16

Column Compression with Dictionaries

• Supports being used with the following data types• BLOB (including TINYBLOB, MEDIUMBLOB, LONGBLOG)• TEXT (including TINYTEXT, MEDUUMTEXT, LONGTEXT)• VARCHAR (including NATIONAL VARCHAR)• VARBINARY• JSON

• A few limitations due exist for which columns can be compressed• Compressed columns cannot be used in indices (neither on their own nor as parts of

composite keys).• ALTER TABLE ... DISCARD/IMPORT TABLESPACE is not supported for tables with

compressed columns.

Page 17: Server For MySQL? Why Choose Percona Cho… · • Available in Percona Server for MySQL 5.6.33-79.0 and 5.7.17-11 or later • Makes use of the ZLIB compression library, same library

17

Column Compression with DictionariesData size, %

Page 18: Server For MySQL? Why Choose Percona Cho… · • Available in Percona Server for MySQL 5.6.33-79.0 and 5.7.17-11 or later • Makes use of the ZLIB compression library, same library

18

Column Compression with DictionariesQuery time, %

Page 19: Server For MySQL? Why Choose Percona Cho… · • Available in Percona Server for MySQL 5.6.33-79.0 and 5.7.17-11 or later • Makes use of the ZLIB compression library, same library

19

User Statistics

• Part of the troubleshooting/informational improvements in MySQL• Feature contributed by Google and Percona• Available in Percona Server for MySQL 5.5.24-26.0, 5.6.11-60.3, and

5.7.10-1 or later• This feature adds several INFORMATION_SCHEMA tables, several

commands, and the userstat variable. The tables and commands can be used to understand the server activity better and identify the source of the load.

• It is disabled by default, and must be enabled by setting userstat to ON• Works by keeping several hash tables in memory, so does incur some

overhead.

Page 20: Server For MySQL? Why Choose Percona Cho… · • Available in Percona Server for MySQL 5.6.33-79.0 and 5.7.17-11 or later • Makes use of the ZLIB compression library, same library

20

User Statistics

• To avoid contention over global mutexes, each connection has its own local statistics, which are occasionally merged into the global statistics, and the local statistics are then reset to 0.

• Adds the following tables to INFORMATION_SCHEMA• CLIENT_STATISTICS• INDEX_STATISTICS• TABLE_STATISTICS• THREAD_STATISTICS• USER_STATISTICS

• Provides FLUSH and SHOW commands for each of these tables• These commands accept WHERE clauses, but ignore LIKE clauses

Page 21: Server For MySQL? Why Choose Percona Cho… · • Available in Percona Server for MySQL 5.6.33-79.0 and 5.7.17-11 or later • Makes use of the ZLIB compression library, same library

Making the Choice

Page 22: Server For MySQL? Why Choose Percona Cho… · • Available in Percona Server for MySQL 5.6.33-79.0 and 5.7.17-11 or later • Makes use of the ZLIB compression library, same library

22

Evaluating Your Use Case

• Do you need to maintain compatibility with MySQL for your application, such as migrating from an older version of MySQL?

• Percona Server or Oracle MySQL offer the better choice because of drop-in compatibility

• Do you prioritize performance with minimal tuning required?• Percona Server is built with performance in mind, releasing performances fixes and

new options. Default settings are more performant than those in MariaDB Server or MySQL Community

• Are you interested in new storage engines or have write-heavy workloads?

• Percona Server is the primary point of development for TokuDB and MyRocks, both write-performance focused storage engines

Page 23: Server For MySQL? Why Choose Percona Cho… · • Available in Percona Server for MySQL 5.6.33-79.0 and 5.7.17-11 or later • Makes use of the ZLIB compression library, same library

23

Open Source is About Choice

• Oracle MySQL, MariaDB Server, and Percona Server for MySQL are all great choices to use as the database for your application

• Percona is committed to supporting all three databases for our customers, including continued support for MariaDB as it diverges from MySQL

• Open source software is about choice, pick what is right for your use case whether that’s Percona Server for MySQL or something else

Page 24: Server For MySQL? Why Choose Percona Cho… · • Available in Percona Server for MySQL 5.6.33-79.0 and 5.7.17-11 or later • Makes use of the ZLIB compression library, same library

Questions?

Page 25: Server For MySQL? Why Choose Percona Cho… · • Available in Percona Server for MySQL 5.6.33-79.0 and 5.7.17-11 or later • Makes use of the ZLIB compression library, same library

25

Thank You Sponsors!

Page 26: Server For MySQL? Why Choose Percona Cho… · • Available in Percona Server for MySQL 5.6.33-79.0 and 5.7.17-11 or later • Makes use of the ZLIB compression library, same library

26

SAVE THE DATE!

CALL FOR PAPERS OPENING SOON!www.perconalive.com

April 23-25, 2018Santa Clara Convention Center