SlideShare a Scribd company logo
1 of 31
© 2019 Percona1
Alkin Tezuysal
MyRocks in the Wild Wild West!
Alternate Storage Engine for MySQL
Sr. Technical Manager
FOSDEM – Feb 1st 2020
© 2019 Percona2
Who am I?
@ask_dba - Alkin Tezuysal
Born to Sail, Forced to Work
âť– Open Source Database Evangelist
âť– Global Database Operations Expert
âť– Story Teller
âť– Inspiring Technical and Strategic Leader
âť– Creative Team Builder
âť– Speaker, Mentor, and Coach
© 2019 Percona3
Agenda
• Intro and basics
• Background and Common notes
• Benchmarks
• Tools and Utilities
• Conclusion
© 2019 Percona4
Intro to MyRocks
❖ What’s MyRocks?
â—Ź Storage engine for MySQL
â—Ź Based on RocksDB, a fork of LevelDB
â—Ź Persistent key-value store
â—Ź Implemented at Facebook and introduced in 2016
â—Ź Used by FB in production others still use RocksDB
â—Ź Was only available as source code at first
© 2019 Percona5
Availability of MyRocks
âť– MyRocks Distributions
â—Ź Percona Server:
â—‹ Announced for Q1 2017
â—‹ Fully supported: 5.7.20, 8.0
â—Ź MariaDB:
â—‹ Plugin alpha since 10.2.5
â—‹ Stable since 10.3.7/10.2.16
â—Ź Getting more mature
© 2019 Percona6
Differences between distributions
âť– Compression
➢ Facebook: none, depends on what you compile with
➢ Percona Server: Zlib, ZSTD, LZ4, LZ4HC
➢ MariaDB: Snappy, Zlib (+ LZ4, LZ4HC on Ubuntu)
âť– Data file location
➢ Facebook and Percona Server: $datadir/.rocksdb
➢ MariaDB: $datadir/#rocksdb
âť– Gap lock detection
➢ Percona Server and Facebook: yes (FB off by default)
➢ MariaDB: no
© 2019 Percona7
B-tree vs LSM
Image credit: b+tree lsm
http://www.benstopford.com/2015/02/14/log-structured-merge-trees/
© 2019 Percona8
LSM vs B-tree
LSM: write-optimized B-tree: read-optimized
Sequential writes first In-place
Compaction in background Live tree re-balancing
Fast access only to leaves in the fast levels:
memory, L0
Fast access to all leaves
© 2019 Percona9
Innodb vs MyRocks
âť– InnoDB can be used with advanced replication: Galera,
Percona Xtradb Cluster, Group Replication
âť– InnoDB supports STATEMENT and MIXED binlog format
âť– InnoDB supports transactions larger than available
memory
© 2019 Percona10
MyRocks Components and Workflow
âť– Mem Table
âť– WAL (Write Ahead Log)
âť– Leveled LSM Structure
âť– Compaction
âť– Column Family
❖ … and more
© 2019 Percona11
MyRocks Engine Architecture
Memory Persistent Storage
WAL
WAL
Active MemTable
MemTable
Switch Switch
Flush
Compaction
SST Files
Write
Request
© 2019 Percona12
MemTable(s)
âť– Store writes in MyRocks
➢ Associated with each column family
➢ Changes go to WAL
➢ Limited to 64Mb
Ref:https://blog.py
thian.com/exposin
g-myrocks-
internals-via-
system-variables-
part-1-data-
writing/
© 2019 Percona13
WAL (Write Ahead Log)
âť– Immediate writes
âť– Act as redo-log
© 2019 Percona14
MyRocks Engine Architecture
Memory Persistent Storage
WAL
WAL
Active MemTable
Bloom Filter
MemTable
Bloom Filter
SST Files
Read
Request
Index and Bloom
Filters cached
Block Cache
© 2019 Percona15
LSM Leveled Compaction
Ref: https://www.percona.com/live/17/sites/default/files/slides/MyRocks_Tutorial.pdf
© 2019 Percona16
Compaction
âť– LSM compaction on Row level is better
➢ Aligned to OS sector (4Kb unit)
➢ Negligible OS page alignment overhead
âť– Percona Server LZ4 as default algorithm
➢ All levels compressed
➢ Zstd available
➢ Column families allow per table/index
© 2019 Percona17
Column Family
âť– Provides query atomicity between different key spaces.
➢ MemTables and SST files
➢ Shared transaction logs
âť– Index mapping is 1 to N
âť– MyRocks configuration parameters are per CF
âť– Index Comment per CF
© 2019 Percona18
LSM on Disk
âť– Innodb (Write Amplification on B+Tree)
➢ Lower write penalty vs Reduced fragmentation
➢ B+Tree Fragmentation over space
➢ Compression issues
âť– Higher read penalty
âť– Good fit for write heavy workloads
© 2019 Percona19
LSM on Flash
âť– Pros
➢ Smaller space with compression
➢ Lower write amplification
âť– Cons
➢ Higher read penalty
âť– Good fit for write heavy workloads
© 2019 Percona20
Locking & Isolation Levels
âť– Row locking
➢ Read-Committed
➢ Repeatable-Read
âť– Gap Lock - Not Supported
➢ Error on statement for Repeatable-Read
➢ Percona Server will detect and error out
© 2019 Percona21
Replication
âť– RBR binlog_format=ROW
➢ Large binlogs
➢ No triggers on slaves
➢ Schema incompatibilities
âť– SBR causes issues with Gap Locks
➢ Can use on slaves
➢ If safe set rocksdb_unsafe_for_binlog=1
© 2019 Percona22
Backup and Recovery
âť– XtraBackup
➢ Only in 8.0 with xtrabackup 8.0.6+
➢ Optimized for Innodb and MyRocks
➢ No partial backups for MyRocks
âť– Mariabackup
➢ 10.2.16+, 10.3.8+
➢ No partial backups for MyRocks
© 2019 Percona23
Backup and Recovery
âť– myrocks_hotbackup
➢ Original backup tool
➢ Doesn’t work with 8.0
➢ Copies RocksDB checkpoint + WAL
➢ MyRocks only, won’t do anything for innodb
➢ Supports rolling checkpoint
â–  Less WAL to apply on restore till replication
© 2019 Percona24
Backup and Recovery
âť– mysqldump
➢ Optimization can be enabled for import
➢ rocksdb_bulk_load=1
➢ mysqldump in Percona Server detects MyRocks automatically
âť– Snapshots
➢ Quite difficult to do right when mixing engines
➢ MyRocks: checkpoint + wal
© 2019 Percona25
Tool compatibility
Percona tools generally work with MyRocks
PMM Supported Built-in dashboards for MyRocks
xtrabackup Supported Since xtrabackup 8.0.6 (MySQL 8.0 only)
pt-online-schema-change Partial Only in read committed
pt-table-checksum Not supported Only ROW is supported by MyRocks
pt-table-sync Not supported Only ROW is supported by MyRocks
© 2019 Percona26
Benchmarks
© 2019 Percona27
Benchmarks
© 2019 Percona28
Why use MyRocks engine?
âť– Costs
➢ Cloud costs specifically
➢ Good for Flash
➢ Resource utilization
https://www.percona.com/blog/2019/07/19/assessing-mysql-performance-amongst-aws-options-part-two/
© 2019 Percona29
Conclusion
âť– Big data sets over 100Gb
âť– Multiple indexes
âť– Write-intensive workloads
âť– Concurrent reads without range scans
âť– Cloud efficient and cheaper to run
➢ Less IOPS, Memory, Storage
âť– Write and Read immediately
© 2019 Percona30
Special Thanks to...
âť– Yoshinori Matsunobu @matsunobu
âť– Vadim Tkachenko @VadimTk
âť– Sveta Smirnova @svetsmirnova
âť– Mark Callaghan for doing the extensive research and
development.
âť– Engineering, Experts and Services Teams at Percona
© 2019 Percona31
Credits & References
https://www.slideshare.net/matsunobu/myrocks-deep-dive
https://blog.pythian.com/exposing-myrocks-internals-via-system-variables-part-1-data-writing/
https://www.percona.com/resources/webinars/how-rock-myrocks
https://mariadb.com/kb/en/library/optimizer-statistics-in-myrocks/
http://smalldatum.blogspot.com/2017/12/myrocks-innodb-and-tokudb-summary.html
https://rockset.com/blog/rocksdb-is-eating-the-database-world/

More Related Content

What's hot

Mysql 8 vs Mariadb 10.4 Webinar 2020 Feb
Mysql 8 vs Mariadb 10.4 Webinar 2020 FebMysql 8 vs Mariadb 10.4 Webinar 2020 Feb
Mysql 8 vs Mariadb 10.4 Webinar 2020 FebAlkin Tezuysal
 
How to upgrade like a boss to my sql 8.0?
How to upgrade like a boss to my sql 8.0?How to upgrade like a boss to my sql 8.0?
How to upgrade like a boss to my sql 8.0?Alkin Tezuysal
 
Best practices for MySQL High Availability Tutorial
Best practices for MySQL High Availability TutorialBest practices for MySQL High Availability Tutorial
Best practices for MySQL High Availability TutorialColin Charles
 
MySQL High Availability Solutions
MySQL High Availability SolutionsMySQL High Availability Solutions
MySQL High Availability SolutionsLenz Grimmer
 
Distributions from the view a package
Distributions from the view a packageDistributions from the view a package
Distributions from the view a packageColin Charles
 
MySQL highav Availability
MySQL highav AvailabilityMySQL highav Availability
MySQL highav AvailabilityBaruch Osoveskiy
 
M|18 How Facebook Migrated to MyRocks
M|18 How Facebook Migrated to MyRocksM|18 How Facebook Migrated to MyRocks
M|18 How Facebook Migrated to MyRocksMariaDB plc
 
The Proxy Wars - MySQL Router, ProxySQL, MariaDB MaxScale
The Proxy Wars - MySQL Router, ProxySQL, MariaDB MaxScaleThe Proxy Wars - MySQL Router, ProxySQL, MariaDB MaxScale
The Proxy Wars - MySQL Router, ProxySQL, MariaDB MaxScaleColin Charles
 
Tuning Linux for your database FLOSSUK 2016
Tuning Linux for your database FLOSSUK 2016Tuning Linux for your database FLOSSUK 2016
Tuning Linux for your database FLOSSUK 2016Colin Charles
 
Webseminar: MariaDB Enterprise und MariaDB Enterprise Cluster
Webseminar: MariaDB Enterprise und MariaDB Enterprise ClusterWebseminar: MariaDB Enterprise und MariaDB Enterprise Cluster
Webseminar: MariaDB Enterprise und MariaDB Enterprise ClusterMariaDB Corporation
 
Galaxy Big Data with MariaDB
Galaxy Big Data with MariaDBGalaxy Big Data with MariaDB
Galaxy Big Data with MariaDBMariaDB Corporation
 
Databases in the hosted cloud
Databases in the hosted cloudDatabases in the hosted cloud
Databases in the hosted cloudColin Charles
 
High Performance Drupal with MariaDB
High Performance Drupal with MariaDBHigh Performance Drupal with MariaDB
High Performance Drupal with MariaDBMariaDB Corporation
 
Meet MariaDB 10.1 at the Bulgaria Web Summit
Meet MariaDB 10.1 at the Bulgaria Web SummitMeet MariaDB 10.1 at the Bulgaria Web Summit
Meet MariaDB 10.1 at the Bulgaria Web SummitColin Charles
 
My first moments with MongoDB
My first moments with MongoDBMy first moments with MongoDB
My first moments with MongoDBColin Charles
 
Mysql ecosystem in 2018
Mysql ecosystem in 2018Mysql ecosystem in 2018
Mysql ecosystem in 2018Alkin Tezuysal
 
Tips to drive maria db cluster performance for nextcloud
Tips to drive maria db cluster performance for nextcloudTips to drive maria db cluster performance for nextcloud
Tips to drive maria db cluster performance for nextcloudSeveralnines
 
Securing your MySQL / MariaDB Server data
Securing your MySQL / MariaDB Server dataSecuring your MySQL / MariaDB Server data
Securing your MySQL / MariaDB Server dataColin Charles
 
Lessons from database failures
Lessons from database failuresLessons from database failures
Lessons from database failuresColin Charles
 

What's hot (20)

Mysql 8 vs Mariadb 10.4 Webinar 2020 Feb
Mysql 8 vs Mariadb 10.4 Webinar 2020 FebMysql 8 vs Mariadb 10.4 Webinar 2020 Feb
Mysql 8 vs Mariadb 10.4 Webinar 2020 Feb
 
How to upgrade like a boss to my sql 8.0?
How to upgrade like a boss to my sql 8.0?How to upgrade like a boss to my sql 8.0?
How to upgrade like a boss to my sql 8.0?
 
Best practices for MySQL High Availability Tutorial
Best practices for MySQL High Availability TutorialBest practices for MySQL High Availability Tutorial
Best practices for MySQL High Availability Tutorial
 
KubeCon_NA_2021
KubeCon_NA_2021KubeCon_NA_2021
KubeCon_NA_2021
 
MySQL High Availability Solutions
MySQL High Availability SolutionsMySQL High Availability Solutions
MySQL High Availability Solutions
 
Distributions from the view a package
Distributions from the view a packageDistributions from the view a package
Distributions from the view a package
 
MySQL highav Availability
MySQL highav AvailabilityMySQL highav Availability
MySQL highav Availability
 
M|18 How Facebook Migrated to MyRocks
M|18 How Facebook Migrated to MyRocksM|18 How Facebook Migrated to MyRocks
M|18 How Facebook Migrated to MyRocks
 
The Proxy Wars - MySQL Router, ProxySQL, MariaDB MaxScale
The Proxy Wars - MySQL Router, ProxySQL, MariaDB MaxScaleThe Proxy Wars - MySQL Router, ProxySQL, MariaDB MaxScale
The Proxy Wars - MySQL Router, ProxySQL, MariaDB MaxScale
 
Tuning Linux for your database FLOSSUK 2016
Tuning Linux for your database FLOSSUK 2016Tuning Linux for your database FLOSSUK 2016
Tuning Linux for your database FLOSSUK 2016
 
Webseminar: MariaDB Enterprise und MariaDB Enterprise Cluster
Webseminar: MariaDB Enterprise und MariaDB Enterprise ClusterWebseminar: MariaDB Enterprise und MariaDB Enterprise Cluster
Webseminar: MariaDB Enterprise und MariaDB Enterprise Cluster
 
Galaxy Big Data with MariaDB
Galaxy Big Data with MariaDBGalaxy Big Data with MariaDB
Galaxy Big Data with MariaDB
 
Databases in the hosted cloud
Databases in the hosted cloudDatabases in the hosted cloud
Databases in the hosted cloud
 
High Performance Drupal with MariaDB
High Performance Drupal with MariaDBHigh Performance Drupal with MariaDB
High Performance Drupal with MariaDB
 
Meet MariaDB 10.1 at the Bulgaria Web Summit
Meet MariaDB 10.1 at the Bulgaria Web SummitMeet MariaDB 10.1 at the Bulgaria Web Summit
Meet MariaDB 10.1 at the Bulgaria Web Summit
 
My first moments with MongoDB
My first moments with MongoDBMy first moments with MongoDB
My first moments with MongoDB
 
Mysql ecosystem in 2018
Mysql ecosystem in 2018Mysql ecosystem in 2018
Mysql ecosystem in 2018
 
Tips to drive maria db cluster performance for nextcloud
Tips to drive maria db cluster performance for nextcloudTips to drive maria db cluster performance for nextcloud
Tips to drive maria db cluster performance for nextcloud
 
Securing your MySQL / MariaDB Server data
Securing your MySQL / MariaDB Server dataSecuring your MySQL / MariaDB Server data
Securing your MySQL / MariaDB Server data
 
Lessons from database failures
Lessons from database failuresLessons from database failures
Lessons from database failures
 

Similar to Myrocks in the wild wild west! FOSDEM 2020

Mysql ecosystem in 2019
Mysql ecosystem in 2019Mysql ecosystem in 2019
Mysql ecosystem in 2019Alkin Tezuysal
 
Automating OpenStack Deployment with Fuel
Automating OpenStack Deployment with FuelAutomating OpenStack Deployment with Fuel
Automating OpenStack Deployment with FuelTomasz Zen Napierala
 
Percona Xtrabackup - Highly Efficient Backups
Percona Xtrabackup - Highly Efficient BackupsPercona Xtrabackup - Highly Efficient Backups
Percona Xtrabackup - Highly Efficient BackupsMydbops
 
Introduction to Apache NiFi 1.10
Introduction to Apache NiFi 1.10Introduction to Apache NiFi 1.10
Introduction to Apache NiFi 1.10Timothy Spann
 
Netflix Open Source Meetup Season 4 Episode 2
Netflix Open Source Meetup Season 4 Episode 2Netflix Open Source Meetup Season 4 Episode 2
Netflix Open Source Meetup Season 4 Episode 2aspyker
 
Container Attached Storage (CAS) with OpenEBS - SDC 2018
Container Attached Storage (CAS) with OpenEBS -  SDC 2018Container Attached Storage (CAS) with OpenEBS -  SDC 2018
Container Attached Storage (CAS) with OpenEBS - SDC 2018OpenEBS
 
MyRocks introduction and production deployment
MyRocks introduction and production deploymentMyRocks introduction and production deployment
MyRocks introduction and production deploymentYoshinori Matsunobu
 
Apache Pulsar: The Next Generation Messaging and Queuing System
Apache Pulsar: The Next Generation Messaging and Queuing SystemApache Pulsar: The Next Generation Messaging and Queuing System
Apache Pulsar: The Next Generation Messaging and Queuing SystemDatabricks
 
OpenStack and NetApp - Chen Reuven - OpenStack Day Israel 2017
OpenStack and NetApp - Chen Reuven - OpenStack Day Israel 2017OpenStack and NetApp - Chen Reuven - OpenStack Day Israel 2017
OpenStack and NetApp - Chen Reuven - OpenStack Day Israel 2017Cloud Native Day Tel Aviv
 
Migrating from InnoDB and HBase to MyRocks at Facebook
Migrating from InnoDB and HBase to MyRocks at FacebookMigrating from InnoDB and HBase to MyRocks at Facebook
Migrating from InnoDB and HBase to MyRocks at FacebookMariaDB plc
 
What You Missed: DockerCon 2016
What You Missed: DockerCon 2016 What You Missed: DockerCon 2016
What You Missed: DockerCon 2016 NetApp
 
Application Caching: The Hidden Microservice
Application Caching: The Hidden MicroserviceApplication Caching: The Hidden Microservice
Application Caching: The Hidden MicroserviceScott Mansfield
 
IMC Summit 2016 Breakout - Brian Bulkowski - NVMe, Storage Class Memory and O...
IMC Summit 2016 Breakout - Brian Bulkowski - NVMe, Storage Class Memory and O...IMC Summit 2016 Breakout - Brian Bulkowski - NVMe, Storage Class Memory and O...
IMC Summit 2016 Breakout - Brian Bulkowski - NVMe, Storage Class Memory and O...In-Memory Computing Summit
 
Benchmarking for postgresql workloads in kubernetes
Benchmarking for postgresql workloads in kubernetesBenchmarking for postgresql workloads in kubernetes
Benchmarking for postgresql workloads in kubernetesDoKC
 
LINE's Private Cloud - Meet Cloud Native World
LINE's Private Cloud - Meet Cloud Native WorldLINE's Private Cloud - Meet Cloud Native World
LINE's Private Cloud - Meet Cloud Native WorldLINE Corporation
 
YugabyteDB - Distributed SQL Database on Kubernetes
YugabyteDB - Distributed SQL Database on KubernetesYugabyteDB - Distributed SQL Database on Kubernetes
YugabyteDB - Distributed SQL Database on KubernetesDoKC
 
Cross region replication in Percona Kubernetes operator
 Cross region replication in Percona Kubernetes operator Cross region replication in Percona Kubernetes operator
Cross region replication in Percona Kubernetes operatorDoKC
 
Avishay Traeger & Shimshon Zimmerman, Stratoscale - Deploying OpenStack Cinde...
Avishay Traeger & Shimshon Zimmerman, Stratoscale - Deploying OpenStack Cinde...Avishay Traeger & Shimshon Zimmerman, Stratoscale - Deploying OpenStack Cinde...
Avishay Traeger & Shimshon Zimmerman, Stratoscale - Deploying OpenStack Cinde...Cloud Native Day Tel Aviv
 
MySQL Technology Overview
MySQL Technology OverviewMySQL Technology Overview
MySQL Technology OverviewKeith Hollman
 
Matthew Mosesohn - Configuration Management at Large Companies
Matthew Mosesohn - Configuration Management at Large Companies Matthew Mosesohn - Configuration Management at Large Companies
Matthew Mosesohn - Configuration Management at Large Companies Yandex
 

Similar to Myrocks in the wild wild west! FOSDEM 2020 (20)

Mysql ecosystem in 2019
Mysql ecosystem in 2019Mysql ecosystem in 2019
Mysql ecosystem in 2019
 
Automating OpenStack Deployment with Fuel
Automating OpenStack Deployment with FuelAutomating OpenStack Deployment with Fuel
Automating OpenStack Deployment with Fuel
 
Percona Xtrabackup - Highly Efficient Backups
Percona Xtrabackup - Highly Efficient BackupsPercona Xtrabackup - Highly Efficient Backups
Percona Xtrabackup - Highly Efficient Backups
 
Introduction to Apache NiFi 1.10
Introduction to Apache NiFi 1.10Introduction to Apache NiFi 1.10
Introduction to Apache NiFi 1.10
 
Netflix Open Source Meetup Season 4 Episode 2
Netflix Open Source Meetup Season 4 Episode 2Netflix Open Source Meetup Season 4 Episode 2
Netflix Open Source Meetup Season 4 Episode 2
 
Container Attached Storage (CAS) with OpenEBS - SDC 2018
Container Attached Storage (CAS) with OpenEBS -  SDC 2018Container Attached Storage (CAS) with OpenEBS -  SDC 2018
Container Attached Storage (CAS) with OpenEBS - SDC 2018
 
MyRocks introduction and production deployment
MyRocks introduction and production deploymentMyRocks introduction and production deployment
MyRocks introduction and production deployment
 
Apache Pulsar: The Next Generation Messaging and Queuing System
Apache Pulsar: The Next Generation Messaging and Queuing SystemApache Pulsar: The Next Generation Messaging and Queuing System
Apache Pulsar: The Next Generation Messaging and Queuing System
 
OpenStack and NetApp - Chen Reuven - OpenStack Day Israel 2017
OpenStack and NetApp - Chen Reuven - OpenStack Day Israel 2017OpenStack and NetApp - Chen Reuven - OpenStack Day Israel 2017
OpenStack and NetApp - Chen Reuven - OpenStack Day Israel 2017
 
Migrating from InnoDB and HBase to MyRocks at Facebook
Migrating from InnoDB and HBase to MyRocks at FacebookMigrating from InnoDB and HBase to MyRocks at Facebook
Migrating from InnoDB and HBase to MyRocks at Facebook
 
What You Missed: DockerCon 2016
What You Missed: DockerCon 2016 What You Missed: DockerCon 2016
What You Missed: DockerCon 2016
 
Application Caching: The Hidden Microservice
Application Caching: The Hidden MicroserviceApplication Caching: The Hidden Microservice
Application Caching: The Hidden Microservice
 
IMC Summit 2016 Breakout - Brian Bulkowski - NVMe, Storage Class Memory and O...
IMC Summit 2016 Breakout - Brian Bulkowski - NVMe, Storage Class Memory and O...IMC Summit 2016 Breakout - Brian Bulkowski - NVMe, Storage Class Memory and O...
IMC Summit 2016 Breakout - Brian Bulkowski - NVMe, Storage Class Memory and O...
 
Benchmarking for postgresql workloads in kubernetes
Benchmarking for postgresql workloads in kubernetesBenchmarking for postgresql workloads in kubernetes
Benchmarking for postgresql workloads in kubernetes
 
LINE's Private Cloud - Meet Cloud Native World
LINE's Private Cloud - Meet Cloud Native WorldLINE's Private Cloud - Meet Cloud Native World
LINE's Private Cloud - Meet Cloud Native World
 
YugabyteDB - Distributed SQL Database on Kubernetes
YugabyteDB - Distributed SQL Database on KubernetesYugabyteDB - Distributed SQL Database on Kubernetes
YugabyteDB - Distributed SQL Database on Kubernetes
 
Cross region replication in Percona Kubernetes operator
 Cross region replication in Percona Kubernetes operator Cross region replication in Percona Kubernetes operator
Cross region replication in Percona Kubernetes operator
 
Avishay Traeger & Shimshon Zimmerman, Stratoscale - Deploying OpenStack Cinde...
Avishay Traeger & Shimshon Zimmerman, Stratoscale - Deploying OpenStack Cinde...Avishay Traeger & Shimshon Zimmerman, Stratoscale - Deploying OpenStack Cinde...
Avishay Traeger & Shimshon Zimmerman, Stratoscale - Deploying OpenStack Cinde...
 
MySQL Technology Overview
MySQL Technology OverviewMySQL Technology Overview
MySQL Technology Overview
 
Matthew Mosesohn - Configuration Management at Large Companies
Matthew Mosesohn - Configuration Management at Large Companies Matthew Mosesohn - Configuration Management at Large Companies
Matthew Mosesohn - Configuration Management at Large Companies
 

More from Alkin Tezuysal

Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024
Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024
Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024Alkin Tezuysal
 
FOSSASIA - MySQL Cookbook 4e Journey APR 2023.pdf
FOSSASIA - MySQL Cookbook 4e Journey APR 2023.pdfFOSSASIA - MySQL Cookbook 4e Journey APR 2023.pdf
FOSSASIA - MySQL Cookbook 4e Journey APR 2023.pdfAlkin Tezuysal
 
MySQL Ecosystem in 2023 - FOSSASIA'23 - Alkin.pptx.pdf
MySQL Ecosystem in 2023 - FOSSASIA'23 - Alkin.pptx.pdfMySQL Ecosystem in 2023 - FOSSASIA'23 - Alkin.pptx.pdf
MySQL Ecosystem in 2023 - FOSSASIA'23 - Alkin.pptx.pdfAlkin Tezuysal
 
How OLTP to OLAP Archival Demystified
How OLTP to OLAP Archival DemystifiedHow OLTP to OLAP Archival Demystified
How OLTP to OLAP Archival DemystifiedAlkin Tezuysal
 
MySQL Cookbook: Recipes for Developers, Alkin Tezuysal and Sveta Smirnova - P...
MySQL Cookbook: Recipes for Developers, Alkin Tezuysal and Sveta Smirnova - P...MySQL Cookbook: Recipes for Developers, Alkin Tezuysal and Sveta Smirnova - P...
MySQL Cookbook: Recipes for Developers, Alkin Tezuysal and Sveta Smirnova - P...Alkin Tezuysal
 
My first 90 days with ClickHouse.pdf
My first 90 days with ClickHouse.pdfMy first 90 days with ClickHouse.pdf
My first 90 days with ClickHouse.pdfAlkin Tezuysal
 
Vitess: Scalable Database Architecture - Kubernetes Community Days Africa Ap...
Vitess: Scalable Database Architecture -  Kubernetes Community Days Africa Ap...Vitess: Scalable Database Architecture -  Kubernetes Community Days Africa Ap...
Vitess: Scalable Database Architecture - Kubernetes Community Days Africa Ap...Alkin Tezuysal
 
How to shard MariaDB like a pro - FOSDEM 2021
How to shard MariaDB like a pro  - FOSDEM 2021How to shard MariaDB like a pro  - FOSDEM 2021
How to shard MariaDB like a pro - FOSDEM 2021Alkin Tezuysal
 
Vitess - Data on Kubernetes
Vitess -  Data on Kubernetes  Vitess -  Data on Kubernetes
Vitess - Data on Kubernetes Alkin Tezuysal
 
PXC (Xtradb) Failure and Recovery
PXC (Xtradb) Failure and RecoveryPXC (Xtradb) Failure and Recovery
PXC (Xtradb) Failure and RecoveryAlkin Tezuysal
 
Securing your database servers from external attacks
Securing your database servers from external attacksSecuring your database servers from external attacks
Securing your database servers from external attacksAlkin Tezuysal
 
Mysql query optimization best practices and indexing
Mysql query optimization  best practices and indexingMysql query optimization  best practices and indexing
Mysql query optimization best practices and indexingAlkin Tezuysal
 
Proxysql use case scenarios hl++ 2017
Proxysql use case scenarios    hl++ 2017 Proxysql use case scenarios    hl++ 2017
Proxysql use case scenarios hl++ 2017 Alkin Tezuysal
 
Proxysql use case scenarios fosdem17
Proxysql use case scenarios    fosdem17Proxysql use case scenarios    fosdem17
Proxysql use case scenarios fosdem17Alkin Tezuysal
 
Proxysql use case scenarios plam 2016
Proxysql use case scenarios    plam 2016Proxysql use case scenarios    plam 2016
Proxysql use case scenarios plam 2016Alkin Tezuysal
 
Building DBA as a Service (Global) Team - DBAaaST
Building DBA as a Service (Global) Team - DBAaaSTBuilding DBA as a Service (Global) Team - DBAaaST
Building DBA as a Service (Global) Team - DBAaaSTAlkin Tezuysal
 

More from Alkin Tezuysal (18)

Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024
Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024
Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024
 
FOSSASIA - MySQL Cookbook 4e Journey APR 2023.pdf
FOSSASIA - MySQL Cookbook 4e Journey APR 2023.pdfFOSSASIA - MySQL Cookbook 4e Journey APR 2023.pdf
FOSSASIA - MySQL Cookbook 4e Journey APR 2023.pdf
 
MySQL Ecosystem in 2023 - FOSSASIA'23 - Alkin.pptx.pdf
MySQL Ecosystem in 2023 - FOSSASIA'23 - Alkin.pptx.pdfMySQL Ecosystem in 2023 - FOSSASIA'23 - Alkin.pptx.pdf
MySQL Ecosystem in 2023 - FOSSASIA'23 - Alkin.pptx.pdf
 
How OLTP to OLAP Archival Demystified
How OLTP to OLAP Archival DemystifiedHow OLTP to OLAP Archival Demystified
How OLTP to OLAP Archival Demystified
 
MySQL Cookbook: Recipes for Developers, Alkin Tezuysal and Sveta Smirnova - P...
MySQL Cookbook: Recipes for Developers, Alkin Tezuysal and Sveta Smirnova - P...MySQL Cookbook: Recipes for Developers, Alkin Tezuysal and Sveta Smirnova - P...
MySQL Cookbook: Recipes for Developers, Alkin Tezuysal and Sveta Smirnova - P...
 
My first 90 days with ClickHouse.pdf
My first 90 days with ClickHouse.pdfMy first 90 days with ClickHouse.pdf
My first 90 days with ClickHouse.pdf
 
Vitess: Scalable Database Architecture - Kubernetes Community Days Africa Ap...
Vitess: Scalable Database Architecture -  Kubernetes Community Days Africa Ap...Vitess: Scalable Database Architecture -  Kubernetes Community Days Africa Ap...
Vitess: Scalable Database Architecture - Kubernetes Community Days Africa Ap...
 
How to shard MariaDB like a pro - FOSDEM 2021
How to shard MariaDB like a pro  - FOSDEM 2021How to shard MariaDB like a pro  - FOSDEM 2021
How to shard MariaDB like a pro - FOSDEM 2021
 
Vitess - Data on Kubernetes
Vitess -  Data on Kubernetes  Vitess -  Data on Kubernetes
Vitess - Data on Kubernetes
 
PXC (Xtradb) Failure and Recovery
PXC (Xtradb) Failure and RecoveryPXC (Xtradb) Failure and Recovery
PXC (Xtradb) Failure and Recovery
 
Securing your database servers from external attacks
Securing your database servers from external attacksSecuring your database servers from external attacks
Securing your database servers from external attacks
 
Serverless
ServerlessServerless
Serverless
 
Mysql query optimization best practices and indexing
Mysql query optimization  best practices and indexingMysql query optimization  best practices and indexing
Mysql query optimization best practices and indexing
 
Proxysql use case scenarios hl++ 2017
Proxysql use case scenarios    hl++ 2017 Proxysql use case scenarios    hl++ 2017
Proxysql use case scenarios hl++ 2017
 
Proxysql use case scenarios fosdem17
Proxysql use case scenarios    fosdem17Proxysql use case scenarios    fosdem17
Proxysql use case scenarios fosdem17
 
Proxysql use case scenarios plam 2016
Proxysql use case scenarios    plam 2016Proxysql use case scenarios    plam 2016
Proxysql use case scenarios plam 2016
 
Building DBA as a Service (Global) Team - DBAaaST
Building DBA as a Service (Global) Team - DBAaaSTBuilding DBA as a Service (Global) Team - DBAaaST
Building DBA as a Service (Global) Team - DBAaaST
 

Recently uploaded

What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx959SahilShah
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
 
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoĂŁo Esperancinha
 
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZTE
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.eptoze12
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLDeelipZope
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 

Recently uploaded (20)

What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
 
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCL
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 

Myrocks in the wild wild west! FOSDEM 2020

  • 1. © 2019 Percona1 Alkin Tezuysal MyRocks in the Wild Wild West! Alternate Storage Engine for MySQL Sr. Technical Manager FOSDEM – Feb 1st 2020
  • 2. © 2019 Percona2 Who am I? @ask_dba - Alkin Tezuysal Born to Sail, Forced to Work âť– Open Source Database Evangelist âť– Global Database Operations Expert âť– Story Teller âť– Inspiring Technical and Strategic Leader âť– Creative Team Builder âť– Speaker, Mentor, and Coach
  • 3. © 2019 Percona3 Agenda • Intro and basics • Background and Common notes • Benchmarks • Tools and Utilities • Conclusion
  • 4. © 2019 Percona4 Intro to MyRocks âť– What’s MyRocks? â—Ź Storage engine for MySQL â—Ź Based on RocksDB, a fork of LevelDB â—Ź Persistent key-value store â—Ź Implemented at Facebook and introduced in 2016 â—Ź Used by FB in production others still use RocksDB â—Ź Was only available as source code at first
  • 5. © 2019 Percona5 Availability of MyRocks âť– MyRocks Distributions â—Ź Percona Server: â—‹ Announced for Q1 2017 â—‹ Fully supported: 5.7.20, 8.0 â—Ź MariaDB: â—‹ Plugin alpha since 10.2.5 â—‹ Stable since 10.3.7/10.2.16 â—Ź Getting more mature
  • 6. © 2019 Percona6 Differences between distributions âť– Compression ➢ Facebook: none, depends on what you compile with ➢ Percona Server: Zlib, ZSTD, LZ4, LZ4HC ➢ MariaDB: Snappy, Zlib (+ LZ4, LZ4HC on Ubuntu) âť– Data file location ➢ Facebook and Percona Server: $datadir/.rocksdb ➢ MariaDB: $datadir/#rocksdb âť– Gap lock detection ➢ Percona Server and Facebook: yes (FB off by default) ➢ MariaDB: no
  • 7. © 2019 Percona7 B-tree vs LSM Image credit: b+tree lsm http://www.benstopford.com/2015/02/14/log-structured-merge-trees/
  • 8. © 2019 Percona8 LSM vs B-tree LSM: write-optimized B-tree: read-optimized Sequential writes first In-place Compaction in background Live tree re-balancing Fast access only to leaves in the fast levels: memory, L0 Fast access to all leaves
  • 9. © 2019 Percona9 Innodb vs MyRocks âť– InnoDB can be used with advanced replication: Galera, Percona Xtradb Cluster, Group Replication âť– InnoDB supports STATEMENT and MIXED binlog format âť– InnoDB supports transactions larger than available memory
  • 10. © 2019 Percona10 MyRocks Components and Workflow âť– Mem Table âť– WAL (Write Ahead Log) âť– Leveled LSM Structure âť– Compaction âť– Column Family âť– … and more
  • 11. © 2019 Percona11 MyRocks Engine Architecture Memory Persistent Storage WAL WAL Active MemTable MemTable Switch Switch Flush Compaction SST Files Write Request
  • 12. © 2019 Percona12 MemTable(s) âť– Store writes in MyRocks ➢ Associated with each column family ➢ Changes go to WAL ➢ Limited to 64Mb Ref:https://blog.py thian.com/exposin g-myrocks- internals-via- system-variables- part-1-data- writing/
  • 13. © 2019 Percona13 WAL (Write Ahead Log) âť– Immediate writes âť– Act as redo-log
  • 14. © 2019 Percona14 MyRocks Engine Architecture Memory Persistent Storage WAL WAL Active MemTable Bloom Filter MemTable Bloom Filter SST Files Read Request Index and Bloom Filters cached Block Cache
  • 15. © 2019 Percona15 LSM Leveled Compaction Ref: https://www.percona.com/live/17/sites/default/files/slides/MyRocks_Tutorial.pdf
  • 16. © 2019 Percona16 Compaction âť– LSM compaction on Row level is better ➢ Aligned to OS sector (4Kb unit) ➢ Negligible OS page alignment overhead âť– Percona Server LZ4 as default algorithm ➢ All levels compressed ➢ Zstd available ➢ Column families allow per table/index
  • 17. © 2019 Percona17 Column Family âť– Provides query atomicity between different key spaces. ➢ MemTables and SST files ➢ Shared transaction logs âť– Index mapping is 1 to N âť– MyRocks configuration parameters are per CF âť– Index Comment per CF
  • 18. © 2019 Percona18 LSM on Disk âť– Innodb (Write Amplification on B+Tree) ➢ Lower write penalty vs Reduced fragmentation ➢ B+Tree Fragmentation over space ➢ Compression issues âť– Higher read penalty âť– Good fit for write heavy workloads
  • 19. © 2019 Percona19 LSM on Flash âť– Pros ➢ Smaller space with compression ➢ Lower write amplification âť– Cons ➢ Higher read penalty âť– Good fit for write heavy workloads
  • 20. © 2019 Percona20 Locking & Isolation Levels âť– Row locking ➢ Read-Committed ➢ Repeatable-Read âť– Gap Lock - Not Supported ➢ Error on statement for Repeatable-Read ➢ Percona Server will detect and error out
  • 21. © 2019 Percona21 Replication âť– RBR binlog_format=ROW ➢ Large binlogs ➢ No triggers on slaves ➢ Schema incompatibilities âť– SBR causes issues with Gap Locks ➢ Can use on slaves ➢ If safe set rocksdb_unsafe_for_binlog=1
  • 22. © 2019 Percona22 Backup and Recovery âť– XtraBackup ➢ Only in 8.0 with xtrabackup 8.0.6+ ➢ Optimized for Innodb and MyRocks ➢ No partial backups for MyRocks âť– Mariabackup ➢ 10.2.16+, 10.3.8+ ➢ No partial backups for MyRocks
  • 23. © 2019 Percona23 Backup and Recovery âť– myrocks_hotbackup ➢ Original backup tool ➢ Doesn’t work with 8.0 ➢ Copies RocksDB checkpoint + WAL ➢ MyRocks only, won’t do anything for innodb ➢ Supports rolling checkpoint â–  Less WAL to apply on restore till replication
  • 24. © 2019 Percona24 Backup and Recovery âť– mysqldump ➢ Optimization can be enabled for import ➢ rocksdb_bulk_load=1 ➢ mysqldump in Percona Server detects MyRocks automatically âť– Snapshots ➢ Quite difficult to do right when mixing engines ➢ MyRocks: checkpoint + wal
  • 25. © 2019 Percona25 Tool compatibility Percona tools generally work with MyRocks PMM Supported Built-in dashboards for MyRocks xtrabackup Supported Since xtrabackup 8.0.6 (MySQL 8.0 only) pt-online-schema-change Partial Only in read committed pt-table-checksum Not supported Only ROW is supported by MyRocks pt-table-sync Not supported Only ROW is supported by MyRocks
  • 28. © 2019 Percona28 Why use MyRocks engine? âť– Costs ➢ Cloud costs specifically ➢ Good for Flash ➢ Resource utilization https://www.percona.com/blog/2019/07/19/assessing-mysql-performance-amongst-aws-options-part-two/
  • 29. © 2019 Percona29 Conclusion âť– Big data sets over 100Gb âť– Multiple indexes âť– Write-intensive workloads âť– Concurrent reads without range scans âť– Cloud efficient and cheaper to run ➢ Less IOPS, Memory, Storage âť– Write and Read immediately
  • 30. © 2019 Percona30 Special Thanks to... âť– Yoshinori Matsunobu @matsunobu âť– Vadim Tkachenko @VadimTk âť– Sveta Smirnova @svetsmirnova âť– Mark Callaghan for doing the extensive research and development. âť– Engineering, Experts and Services Teams at Percona
  • 31. © 2019 Percona31 Credits & References https://www.slideshare.net/matsunobu/myrocks-deep-dive https://blog.pythian.com/exposing-myrocks-internals-via-system-variables-part-1-data-writing/ https://www.percona.com/resources/webinars/how-rock-myrocks https://mariadb.com/kb/en/library/optimizer-statistics-in-myrocks/ http://smalldatum.blogspot.com/2017/12/myrocks-innodb-and-tokudb-summary.html https://rockset.com/blog/rocksdb-is-eating-the-database-world/