SlideShare a Scribd company logo
1 of 52
What’s New in TokuDB 7.5 
Read Free Replication 
and more! 
Tim Callaghan, Tokutek 
tim@tokutek.com 
@tmcallaghan
Company 
• Two high-performance database solutions for big data 
• NoSQL: TokuMX™ for MongoDB 
• NewSQL: TokuDB® for MySQL, MariaDB & Percona 
Server 
• Radical new storage for larger-than-RAM datasets 
• Fractal Tree® indexing technology 
• Data science research at M.I.T., Rutgers, Stony Brook 
• Open source 
• Example: Red Hat (Linux) & Canonical (Ubuntu)
Current Customers / Big Data Innovators
Ever seen this? 
IO Utilization Graph, write performance is IO limited
Agenda 
• What is a Fractal Tree index? 
• No Read Free Replication without them! 
• What Fractal Tree indexes enable in MySQL, 
MariaDB, and Percona Server 
• TokuDB! 
• What’s new in TokuDB 7.5 
• Read Free Replication and more 
• Q+A
Indexing 101: 
B-trees and 
Fractal Tree Indexes
B-trees
B-tree Overview - vocabulary 
Internal Nodes - 
Path to data 
Leaf Nodes - 
Actual Data - 
Sorted 
Pointers 
Pivots
B-tree Overview - example 
22 
10 99 
2, 3, 4 10,20 22,25 99 
• Pivot Rule is >= 
• “numbers” are keys, stored value is row data
B-tree Overview - search 
22 
10 99 
2, 3, 4 10,20 22,25 99 
“Find 25”
B-tree Overview - insert 
22 
10 99 
2, 3, 4 10,15,20 22,25 99 
“Insert 15”
Performance is IO limited when data > RAM, 
one IO is needed for each insert/update 
(actually it’s one IO for every index on the table) 
RAM 
RAM 
DISK 
B-tree Overview - performance 
22 
10 99 
2, 3, 4 10,20 22,25 99
Fractal Tree indexes
Fractal Tree indexes 
similar to B-trees 
• store data in leaf nodes 
• use index key for ordering 
message 
buffer 
message 
buffer 
message 
buffer 
All internal nodes 
have message 
buffers 
As buffers overflow, 
they cascade down 
the tree 
Messages are 
eventually applied 
to leaf nodes 
different than B-trees 
• message buffers 
• big nodes (4MB vs. ~16KB)
Doesn’t InnoDB Have Buffers? 
InnoDB Change 
Buffer 
• It sure does! 
• No buffer for the primary key index 
• One buffer for each secondary index 
• http://dev.mysql.com/doc/refman/5.5/en/innodb-performance-change_buffering.html
InnoDB Buffers Help (for a while)
InnoDB Buffers Help (for a while) 
• Buffering allows for IO amortization 
(> 1 operation per IO) 
• When data gets large enough the 
single buffer can’t help (blue = red)
Fractal Tree Indexes - sample data 
25 
10 99 
2,3,4 10,20 22,25 99 
Looks a lot like a B-tree!
Fractal Tree Indexes - insert 
insert 15; 
25 
10 99 
insert (15) 
2,3,4 10,20 22,25 99 
• search operations must consider messages along the way 
• messages cascade down the tree as buffers fill up 
• they are eventually applied to the leaf nodes, hundreds or 
thousands of operations for a single IO 
• CPU and cache are conserved as important data is not ejected
Fractal Tree Indexes - other operations 
25 
add_column(c4 bigint) 
10 99 
delete(99) 
increment(22,+5) 
... 
insert (100) 
delete(8) 
delete(2) 
insert (8) 
2,3,4 10,20 22,25 99 
Lots of operations can be messages!
MySQL/MariaDB/Percona Server 
+ 
Fractal Tree Indexes 
= 
TokuDB
22 
What is TokuDB? 
• Transactional MySQL Storage Engine - think InnoDB 
• Available for MySQL 5.5 and MariaDB 5.5 
• Percona Server 5.6 and MariaDB 10.0 too 
• ACID and MVCC 
• Free/OSS Community Edition 
• http://github.com/Tokutek/ft-engine 
• Enterprise Edition 
• Commercial support + hot backup 
Performance + Compression + Agility
TokuDB Performance 
Warning - Benchmarks Ahead!
24 
Indexed Insertion Performance 
* old numbers, now > 25K/sec
25 
Sysbench Performance (> RAM) 
The fastest IO is the one you never have to do (compression)
TokuDB Compression
27 
Compression + IO Reduction 
• Server was at 90% IO utilization with InnoDB, 
10% IO utilization with TokuDB
28 
Compression Performance 
• InnoDB performance is severely impacted by compression 
• Compression “misses” are costly 
*iiBench workload
29 
Compression Achieved 
• InnoDB compresses 16K blocks, TokuDB is 64K (or more) 
• InnoDB requires fixed on-disk size, TokuDB is flexible 
*log style data
TokuDB Agility
31 
Maintenance Windows?
32 
Schema Changes Without Downtime? 
• In TokuDB, column add/drop/expand is instant 
• “it’s just a message” – Fractal Tree index 
• No need for helper tools 
• MySQL 5.6 or Percona Tools 
• Operation is still expensive (table rewrite) 
• Or, no need to change on slave, then switch 
with master and repeat
TokuDB 7.5 
New Features
34 
TokuDB 7.5 – Small Stuff 
• Updated MySQL and MariaDB to 5.5.39 
• Allow XA transactions to skip fsync() in prepare phase 
• XA means a multi-statement transaction that includes 
TokuDB another another XA engine (InnoDB) 
• Community Contribution by Bohu TANG 
• Hot backup now supports multiple directories 
• datadir plus log_bin, tokudb_data_dir, tokudb_log_dir 
• Additional bulk fetch – this is not small! 
• Was just “select *” 
• Now includes “insert into select …”, “replace into 
select …”, “insert ignore select …”, insert into select … 
on duplicate key update …”, and “delete from select 
…”
Brief Overview of 
MySQL Replication
36 
MySQL Replication - Modes 
MySQL supports three replication modes 
• Statement Based 
• SQL statements are logged and replayed on slaves 
• "insert into foo values (1,1);" 
• Good for when statement affects a lot of rows 
• "insert into foo select * from bar;" 
• Row Based 
• Before and after images of affected rows are logged and 
replayed on slaves 
• foo : before (1,1) after (1,2) 
• Mixed 
• Statement based unless it is determined to be unsafe, at 
which point row based 
• "update foo set c1=5 limit 5;"
37 
MySQL Replication – Read Only 
Setting the slave's read_only=1 
• Puts the slave in "read only" mode 
• Except that user's with the SUPER privilege are allowed 
to insert/update/delete 
– This can break RFR!
38 
MySQL Replication – Slave Apply 
Simple (hand wavy) overview of the slave process 
• Read a replication event from the binary log 
• If "statement" 
• Execute the statement on the slave 
• If "row" 
• Insert, just write the row 
• Delete/Update, lookup the row 
• If row doesn’t exist, stop replication
39 
MySQL Replication – Slave Lag 
In MySQL 5.5, replication is single threaded 
• Masters support concurrency, slaves do not 
• Causes slaves to "lag" behind the master 
Improvements exist 
• MySQL 5.6 supports multi-threaded slaves (database) 
• MariaDB 10.0 it's own parallel replication mechanism 
All of these will work with TokuDB's Read Free Replication
TokuDB Read Free Replication
41 
Read Free Replication - Requirements 
• What is required on the master? 
• binlog_format=ROW 
• What is required on the slave? 
• read_only=1 
• tokudb_rpl_unique_checks=0 and/or 
tokudb_rpl_lookup_rows=0
42 
RFR Optimization #1 – Skip Unique Checks 
• tokudb_rpl_unique_checks=0 
• Why is it OK? 
• The master already performed the uniqueness 
check 
• Why can't InnoDB skip unique checks? 
• It could, but… 
• InnoDB doesn't support change buffering on the PK 
• So, the row must be read for maintenance 
• Since it is then in memory, there is little to be gained for 
skipping the check
RFR Optimization #2 – Skip Read/Modify/Write 
43 
• tokudb_rpl_lookup_rows=0 
• Why is it OK? 
• If RBR, master provided before/after row images 
• Why can't InnoDB skip read/modify/write? 
• InnoDB doesn't support change buffering on the PK 
• So, the row must be read for maintenance 
• Why can TokuDB skip read/modify/write? 
• Everything necessary is in the binary log 
• Simple message injection
Read Free Replication – Sysbench Benchmark 
44 
No lag 
Enabled Read 
Free Replication
Read Free Replication – Sysbench Benchmark 
45 
Additional 
Read 
Capacity 
Enabled Read 
Free Replication
Read Free Replication – Sysbench Benchmark 
46 
Mostly 
fsync() 
No reads! 
Enabled Read 
Free Replication
47 
Read Free Replication - Ideas 
#1, scale your reads 
• HA is nice, but don’t we also want to scale our reads? 
Master Slave 
IO 
IO 
Slave 
Workload 
Workload 
Readers 
Readers 
No 
RFR 
RFR 
Master 
IO 
IO
48 
Read Free Replication - Ideas 
#2, shared slaves 
Master1 Slave1 
IO 
IO 
No 
RFR 
RFR 
Slave2 Master2 
IO 
IO 
Master1 Slave1+2 
IO 
IO 
Master2 
IO 
IO 
1 machine 
2 mysqlds
49 
Read Free Replication - Ideas 
#3, high IO master (flash/SSD), low IO slave (SAS/SATA) 
Master Slave 
RFR
50 
Can we do even more? 
• Yes, Reduce fsync() calls on slaves - writes 
• This is the current choke point for RFR slaves 
• In 5.5, master.info and relay-log.info are just files 
• Each need fsync() for crash safety 
• In 5.6, these files can be InnoDB tables 
• 3 fsync() operations are now 1 
• However, this becomes an XA transaction when 
TokuDB tables are in use 
• Even more fsync() calls 
• Should be able to convert these to TokuDB
51 
TokuDB Resources 
• Website @ www.tokutek.com 
• Documentation @ docs.tokutek.com/tokudb 
• Community @ tokudb-user Google Group 
• Tokutek Blogs @ www.tokutek.com/tokuview
Thank you! 
Thank you for attending! 
Enter questions into the chat box 
Contact us: contact@tokutek.com

More Related Content

What's hot

Conquering "big data": An introduction to shard query
Conquering "big data": An introduction to shard queryConquering "big data": An introduction to shard query
Conquering "big data": An introduction to shard queryJustin Swanhart
 
The InnoDB Storage Engine for MySQL
The InnoDB Storage Engine for MySQLThe InnoDB Storage Engine for MySQL
The InnoDB Storage Engine for MySQLMorgan Tocker
 
What'sNnew in 3.0 Webinar
What'sNnew in 3.0 WebinarWhat'sNnew in 3.0 Webinar
What'sNnew in 3.0 WebinarMongoDB
 
An introduction to SQL Server in-memory OLTP Engine
An introduction to SQL Server in-memory OLTP EngineAn introduction to SQL Server in-memory OLTP Engine
An introduction to SQL Server in-memory OLTP EngineKrishnakumar S
 
InnoDB Architecture and Performance Optimization, Peter Zaitsev
InnoDB Architecture and Performance Optimization, Peter ZaitsevInnoDB Architecture and Performance Optimization, Peter Zaitsev
InnoDB Architecture and Performance Optimization, Peter ZaitsevFuenteovejuna
 
In memory databases presentation
In memory databases presentationIn memory databases presentation
In memory databases presentationMichael Keane
 
Linux tuning to improve PostgreSQL performance
Linux tuning to improve PostgreSQL performanceLinux tuning to improve PostgreSQL performance
Linux tuning to improve PostgreSQL performancePostgreSQL-Consulting
 
Countdown to PostgreSQL v9.5 - Foriegn Tables can be part of Inheritance Tree
Countdown to PostgreSQL v9.5 - Foriegn Tables can be part of Inheritance Tree Countdown to PostgreSQL v9.5 - Foriegn Tables can be part of Inheritance Tree
Countdown to PostgreSQL v9.5 - Foriegn Tables can be part of Inheritance Tree Ashnikbiz
 
in-memory database system and low latency
in-memory database system and low latencyin-memory database system and low latency
in-memory database system and low latencyhyeongchae lee
 
MySQL 5.6 Performance
MySQL 5.6 PerformanceMySQL 5.6 Performance
MySQL 5.6 PerformanceMYXPLAIN
 
When is MyRocks good?
When is MyRocks good? When is MyRocks good?
When is MyRocks good? Alkin Tezuysal
 
MongoDB 3.0 and WiredTiger (Event: An Evening with MongoDB Dallas 3/10/15)
MongoDB 3.0 and WiredTiger (Event: An Evening with MongoDB Dallas 3/10/15)MongoDB 3.0 and WiredTiger (Event: An Evening with MongoDB Dallas 3/10/15)
MongoDB 3.0 and WiredTiger (Event: An Evening with MongoDB Dallas 3/10/15)MongoDB
 
MySQL Storage Engines Landscape
MySQL Storage Engines LandscapeMySQL Storage Engines Landscape
MySQL Storage Engines LandscapeColin Charles
 
Technical Introduction to PostgreSQL and PPAS
Technical Introduction to PostgreSQL and PPASTechnical Introduction to PostgreSQL and PPAS
Technical Introduction to PostgreSQL and PPASAshnikbiz
 
Beyond Postgres: Interesting Projects, Tools and forks
Beyond Postgres: Interesting Projects, Tools and forksBeyond Postgres: Interesting Projects, Tools and forks
Beyond Postgres: Interesting Projects, Tools and forksSameer Kumar
 
Postgres-XC: Symmetric PostgreSQL Cluster
Postgres-XC: Symmetric PostgreSQL ClusterPostgres-XC: Symmetric PostgreSQL Cluster
Postgres-XC: Symmetric PostgreSQL ClusterPavan Deolasee
 

What's hot (19)

Conquering "big data": An introduction to shard query
Conquering "big data": An introduction to shard queryConquering "big data": An introduction to shard query
Conquering "big data": An introduction to shard query
 
The InnoDB Storage Engine for MySQL
The InnoDB Storage Engine for MySQLThe InnoDB Storage Engine for MySQL
The InnoDB Storage Engine for MySQL
 
What'sNnew in 3.0 Webinar
What'sNnew in 3.0 WebinarWhat'sNnew in 3.0 Webinar
What'sNnew in 3.0 Webinar
 
Fudcon talk.ppt
Fudcon talk.pptFudcon talk.ppt
Fudcon talk.ppt
 
An introduction to SQL Server in-memory OLTP Engine
An introduction to SQL Server in-memory OLTP EngineAn introduction to SQL Server in-memory OLTP Engine
An introduction to SQL Server in-memory OLTP Engine
 
InnoDB Architecture and Performance Optimization, Peter Zaitsev
InnoDB Architecture and Performance Optimization, Peter ZaitsevInnoDB Architecture and Performance Optimization, Peter Zaitsev
InnoDB Architecture and Performance Optimization, Peter Zaitsev
 
In memory databases presentation
In memory databases presentationIn memory databases presentation
In memory databases presentation
 
Linux tuning to improve PostgreSQL performance
Linux tuning to improve PostgreSQL performanceLinux tuning to improve PostgreSQL performance
Linux tuning to improve PostgreSQL performance
 
In-memory Databases
In-memory DatabasesIn-memory Databases
In-memory Databases
 
Countdown to PostgreSQL v9.5 - Foriegn Tables can be part of Inheritance Tree
Countdown to PostgreSQL v9.5 - Foriegn Tables can be part of Inheritance Tree Countdown to PostgreSQL v9.5 - Foriegn Tables can be part of Inheritance Tree
Countdown to PostgreSQL v9.5 - Foriegn Tables can be part of Inheritance Tree
 
in-memory database system and low latency
in-memory database system and low latencyin-memory database system and low latency
in-memory database system and low latency
 
MySQL 5.6 Performance
MySQL 5.6 PerformanceMySQL 5.6 Performance
MySQL 5.6 Performance
 
MyRocks Deep Dive
MyRocks Deep DiveMyRocks Deep Dive
MyRocks Deep Dive
 
When is MyRocks good?
When is MyRocks good? When is MyRocks good?
When is MyRocks good?
 
MongoDB 3.0 and WiredTiger (Event: An Evening with MongoDB Dallas 3/10/15)
MongoDB 3.0 and WiredTiger (Event: An Evening with MongoDB Dallas 3/10/15)MongoDB 3.0 and WiredTiger (Event: An Evening with MongoDB Dallas 3/10/15)
MongoDB 3.0 and WiredTiger (Event: An Evening with MongoDB Dallas 3/10/15)
 
MySQL Storage Engines Landscape
MySQL Storage Engines LandscapeMySQL Storage Engines Landscape
MySQL Storage Engines Landscape
 
Technical Introduction to PostgreSQL and PPAS
Technical Introduction to PostgreSQL and PPASTechnical Introduction to PostgreSQL and PPAS
Technical Introduction to PostgreSQL and PPAS
 
Beyond Postgres: Interesting Projects, Tools and forks
Beyond Postgres: Interesting Projects, Tools and forksBeyond Postgres: Interesting Projects, Tools and forks
Beyond Postgres: Interesting Projects, Tools and forks
 
Postgres-XC: Symmetric PostgreSQL Cluster
Postgres-XC: Symmetric PostgreSQL ClusterPostgres-XC: Symmetric PostgreSQL Cluster
Postgres-XC: Symmetric PostgreSQL Cluster
 

Similar to Introduction to TokuDB v7.5 and Read Free Replication

20140128 webinar-get-more-out-of-mysql-with-tokudb-140319063324-phpapp02
20140128 webinar-get-more-out-of-mysql-with-tokudb-140319063324-phpapp0220140128 webinar-get-more-out-of-mysql-with-tokudb-140319063324-phpapp02
20140128 webinar-get-more-out-of-mysql-with-tokudb-140319063324-phpapp02Francisco Gonçalves
 
OSDC 2016 - Tuning Linux for your Database by Colin Charles
OSDC 2016 - Tuning Linux for your Database by Colin CharlesOSDC 2016 - Tuning Linux for your Database by Colin Charles
OSDC 2016 - Tuning Linux for your Database by Colin CharlesNETWAYS
 
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
 
OSDC 2018 | Scaling & High Availability MySQL learnings from the past decade+...
OSDC 2018 | Scaling & High Availability MySQL learnings from the past decade+...OSDC 2018 | Scaling & High Availability MySQL learnings from the past decade+...
OSDC 2018 | Scaling & High Availability MySQL learnings from the past decade+...NETWAYS
 
MySQL 5.7: Focus on InnoDB
MySQL 5.7: Focus on InnoDBMySQL 5.7: Focus on InnoDB
MySQL 5.7: Focus on InnoDBMario Beck
 
MySQL Performance Tuning London Meetup June 2017
MySQL Performance Tuning London Meetup June 2017MySQL Performance Tuning London Meetup June 2017
MySQL Performance Tuning London Meetup June 2017Ivan Zoratti
 
Your backend architecture is what matters slideshare
Your backend architecture is what matters slideshareYour backend architecture is what matters slideshare
Your backend architecture is what matters slideshareColin Charles
 
[db tech showcase Tokyo 2014] B15: Scalability with MariaDB and MaxScale by ...
[db tech showcase Tokyo 2014] B15: Scalability with MariaDB and MaxScale  by ...[db tech showcase Tokyo 2014] B15: Scalability with MariaDB and MaxScale  by ...
[db tech showcase Tokyo 2014] B15: Scalability with MariaDB and MaxScale by ...Insight Technology, Inc.
 
InnoDB architecture and performance optimization (Пётр Зайцев)
InnoDB architecture and performance optimization (Пётр Зайцев)InnoDB architecture and performance optimization (Пётр Зайцев)
InnoDB architecture and performance optimization (Пётр Зайцев)Ontico
 
MyRocks introduction and production deployment
MyRocks introduction and production deploymentMyRocks introduction and production deployment
MyRocks introduction and production deploymentYoshinori Matsunobu
 
Best practices for MySQL/MariaDB Server/Percona Server High Availability
Best practices for MySQL/MariaDB Server/Percona Server High AvailabilityBest practices for MySQL/MariaDB Server/Percona Server High Availability
Best practices for MySQL/MariaDB Server/Percona Server High AvailabilityColin Charles
 
Making the case for write-optimized database algorithms / Mark Callaghan (Fac...
Making the case for write-optimized database algorithms / Mark Callaghan (Fac...Making the case for write-optimized database algorithms / Mark Callaghan (Fac...
Making the case for write-optimized database algorithms / Mark Callaghan (Fac...Ontico
 
Handling Massive Writes
Handling Massive WritesHandling Massive Writes
Handling Massive WritesLiran Zelkha
 
Scalable and High available Distributed File System Metadata Service Using gR...
Scalable and High available Distributed File System Metadata Service Using gR...Scalable and High available Distributed File System Metadata Service Using gR...
Scalable and High available Distributed File System Metadata Service Using gR...Alluxio, Inc.
 
Performance Benchmarking: Tips, Tricks, and Lessons Learned
Performance Benchmarking: Tips, Tricks, and Lessons LearnedPerformance Benchmarking: Tips, Tricks, and Lessons Learned
Performance Benchmarking: Tips, Tricks, and Lessons LearnedTim Callaghan
 
JSSUG: SQL Sever Performance Tuning
JSSUG: SQL Sever Performance TuningJSSUG: SQL Sever Performance Tuning
JSSUG: SQL Sever Performance TuningKenichiro Nakamura
 
Maria db 10 and the mariadb foundation(colin)
Maria db 10 and the mariadb foundation(colin)Maria db 10 and the mariadb foundation(colin)
Maria db 10 and the mariadb foundation(colin)kayokogoto
 
OSDC 2010 | MySQL and InnoDB Performance - what we know, what we don't by Ba...
OSDC 2010 |  MySQL and InnoDB Performance - what we know, what we don't by Ba...OSDC 2010 |  MySQL and InnoDB Performance - what we know, what we don't by Ba...
OSDC 2010 | MySQL and InnoDB Performance - what we know, what we don't by Ba...NETWAYS
 

Similar to Introduction to TokuDB v7.5 and Read Free Replication (20)

20140128 webinar-get-more-out-of-mysql-with-tokudb-140319063324-phpapp02
20140128 webinar-get-more-out-of-mysql-with-tokudb-140319063324-phpapp0220140128 webinar-get-more-out-of-mysql-with-tokudb-140319063324-phpapp02
20140128 webinar-get-more-out-of-mysql-with-tokudb-140319063324-phpapp02
 
OSDC 2016 - Tuning Linux for your Database by Colin Charles
OSDC 2016 - Tuning Linux for your Database by Colin CharlesOSDC 2016 - Tuning Linux for your Database by Colin Charles
OSDC 2016 - Tuning Linux for your Database by Colin 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 2016
 
Why MariaDB?
Why MariaDB?Why MariaDB?
Why MariaDB?
 
OSDC 2018 | Scaling & High Availability MySQL learnings from the past decade+...
OSDC 2018 | Scaling & High Availability MySQL learnings from the past decade+...OSDC 2018 | Scaling & High Availability MySQL learnings from the past decade+...
OSDC 2018 | Scaling & High Availability MySQL learnings from the past decade+...
 
MySQL 5.7: Focus on InnoDB
MySQL 5.7: Focus on InnoDBMySQL 5.7: Focus on InnoDB
MySQL 5.7: Focus on InnoDB
 
MySQL Performance Tuning London Meetup June 2017
MySQL Performance Tuning London Meetup June 2017MySQL Performance Tuning London Meetup June 2017
MySQL Performance Tuning London Meetup June 2017
 
Your backend architecture is what matters slideshare
Your backend architecture is what matters slideshareYour backend architecture is what matters slideshare
Your backend architecture is what matters slideshare
 
[db tech showcase Tokyo 2014] B15: Scalability with MariaDB and MaxScale by ...
[db tech showcase Tokyo 2014] B15: Scalability with MariaDB and MaxScale  by ...[db tech showcase Tokyo 2014] B15: Scalability with MariaDB and MaxScale  by ...
[db tech showcase Tokyo 2014] B15: Scalability with MariaDB and MaxScale by ...
 
InnoDB architecture and performance optimization (Пётр Зайцев)
InnoDB architecture and performance optimization (Пётр Зайцев)InnoDB architecture and performance optimization (Пётр Зайцев)
InnoDB architecture and performance optimization (Пётр Зайцев)
 
MyRocks introduction and production deployment
MyRocks introduction and production deploymentMyRocks introduction and production deployment
MyRocks introduction and production deployment
 
Best practices for MySQL/MariaDB Server/Percona Server High Availability
Best practices for MySQL/MariaDB Server/Percona Server High AvailabilityBest practices for MySQL/MariaDB Server/Percona Server High Availability
Best practices for MySQL/MariaDB Server/Percona Server High Availability
 
Making the case for write-optimized database algorithms / Mark Callaghan (Fac...
Making the case for write-optimized database algorithms / Mark Callaghan (Fac...Making the case for write-optimized database algorithms / Mark Callaghan (Fac...
Making the case for write-optimized database algorithms / Mark Callaghan (Fac...
 
Handling Massive Writes
Handling Massive WritesHandling Massive Writes
Handling Massive Writes
 
Scalable and High available Distributed File System Metadata Service Using gR...
Scalable and High available Distributed File System Metadata Service Using gR...Scalable and High available Distributed File System Metadata Service Using gR...
Scalable and High available Distributed File System Metadata Service Using gR...
 
Performance Benchmarking: Tips, Tricks, and Lessons Learned
Performance Benchmarking: Tips, Tricks, and Lessons LearnedPerformance Benchmarking: Tips, Tricks, and Lessons Learned
Performance Benchmarking: Tips, Tricks, and Lessons Learned
 
JSSUG: SQL Sever Performance Tuning
JSSUG: SQL Sever Performance TuningJSSUG: SQL Sever Performance Tuning
JSSUG: SQL Sever Performance Tuning
 
Running MySQL on Linux
Running MySQL on LinuxRunning MySQL on Linux
Running MySQL on Linux
 
Maria db 10 and the mariadb foundation(colin)
Maria db 10 and the mariadb foundation(colin)Maria db 10 and the mariadb foundation(colin)
Maria db 10 and the mariadb foundation(colin)
 
OSDC 2010 | MySQL and InnoDB Performance - what we know, what we don't by Ba...
OSDC 2010 |  MySQL and InnoDB Performance - what we know, what we don't by Ba...OSDC 2010 |  MySQL and InnoDB Performance - what we know, what we don't by Ba...
OSDC 2010 | MySQL and InnoDB Performance - what we know, what we don't by Ba...
 

More from Tim Callaghan

Is It Fast? : Measuring MongoDB Performance
Is It Fast? : Measuring MongoDB PerformanceIs It Fast? : Measuring MongoDB Performance
Is It Fast? : Measuring MongoDB PerformanceTim Callaghan
 
Benchmarking MongoDB for Fame and Fortune
Benchmarking MongoDB for Fame and FortuneBenchmarking MongoDB for Fame and Fortune
Benchmarking MongoDB for Fame and FortuneTim Callaghan
 
So you want to be a software developer? (version 2.0)
So you want to be a software developer? (version 2.0)So you want to be a software developer? (version 2.0)
So you want to be a software developer? (version 2.0)Tim Callaghan
 
Use Your MySQL Knowledge to Become an Instant Cassandra Guru
Use Your MySQL Knowledge to Become an Instant Cassandra GuruUse Your MySQL Knowledge to Become an Instant Cassandra Guru
Use Your MySQL Knowledge to Become an Instant Cassandra GuruTim Callaghan
 
5 Pitfalls to Avoid with MongoDB
5 Pitfalls to Avoid with MongoDB5 Pitfalls to Avoid with MongoDB
5 Pitfalls to Avoid with MongoDBTim Callaghan
 
Use Your MySQL Knowledge to Become a MongoDB Guru
Use Your MySQL Knowledge to Become a MongoDB GuruUse Your MySQL Knowledge to Become a MongoDB Guru
Use Your MySQL Knowledge to Become a MongoDB GuruTim Callaghan
 
Creating a Benchmarking Infrastructure That Just Works
Creating a Benchmarking Infrastructure That Just WorksCreating a Benchmarking Infrastructure That Just Works
Creating a Benchmarking Infrastructure That Just WorksTim Callaghan
 
VoltDB : A Technical Overview
VoltDB : A Technical OverviewVoltDB : A Technical Overview
VoltDB : A Technical OverviewTim Callaghan
 

More from Tim Callaghan (8)

Is It Fast? : Measuring MongoDB Performance
Is It Fast? : Measuring MongoDB PerformanceIs It Fast? : Measuring MongoDB Performance
Is It Fast? : Measuring MongoDB Performance
 
Benchmarking MongoDB for Fame and Fortune
Benchmarking MongoDB for Fame and FortuneBenchmarking MongoDB for Fame and Fortune
Benchmarking MongoDB for Fame and Fortune
 
So you want to be a software developer? (version 2.0)
So you want to be a software developer? (version 2.0)So you want to be a software developer? (version 2.0)
So you want to be a software developer? (version 2.0)
 
Use Your MySQL Knowledge to Become an Instant Cassandra Guru
Use Your MySQL Knowledge to Become an Instant Cassandra GuruUse Your MySQL Knowledge to Become an Instant Cassandra Guru
Use Your MySQL Knowledge to Become an Instant Cassandra Guru
 
5 Pitfalls to Avoid with MongoDB
5 Pitfalls to Avoid with MongoDB5 Pitfalls to Avoid with MongoDB
5 Pitfalls to Avoid with MongoDB
 
Use Your MySQL Knowledge to Become a MongoDB Guru
Use Your MySQL Knowledge to Become a MongoDB GuruUse Your MySQL Knowledge to Become a MongoDB Guru
Use Your MySQL Knowledge to Become a MongoDB Guru
 
Creating a Benchmarking Infrastructure That Just Works
Creating a Benchmarking Infrastructure That Just WorksCreating a Benchmarking Infrastructure That Just Works
Creating a Benchmarking Infrastructure That Just Works
 
VoltDB : A Technical Overview
VoltDB : A Technical OverviewVoltDB : A Technical Overview
VoltDB : A Technical Overview
 

Recently uploaded

TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 

Recently uploaded (20)

TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 

Introduction to TokuDB v7.5 and Read Free Replication

  • 1. What’s New in TokuDB 7.5 Read Free Replication and more! Tim Callaghan, Tokutek tim@tokutek.com @tmcallaghan
  • 2. Company • Two high-performance database solutions for big data • NoSQL: TokuMX™ for MongoDB • NewSQL: TokuDB® for MySQL, MariaDB & Percona Server • Radical new storage for larger-than-RAM datasets • Fractal Tree® indexing technology • Data science research at M.I.T., Rutgers, Stony Brook • Open source • Example: Red Hat (Linux) & Canonical (Ubuntu)
  • 3. Current Customers / Big Data Innovators
  • 4. Ever seen this? IO Utilization Graph, write performance is IO limited
  • 5. Agenda • What is a Fractal Tree index? • No Read Free Replication without them! • What Fractal Tree indexes enable in MySQL, MariaDB, and Percona Server • TokuDB! • What’s new in TokuDB 7.5 • Read Free Replication and more • Q+A
  • 6. Indexing 101: B-trees and Fractal Tree Indexes
  • 8. B-tree Overview - vocabulary Internal Nodes - Path to data Leaf Nodes - Actual Data - Sorted Pointers Pivots
  • 9. B-tree Overview - example 22 10 99 2, 3, 4 10,20 22,25 99 • Pivot Rule is >= • “numbers” are keys, stored value is row data
  • 10. B-tree Overview - search 22 10 99 2, 3, 4 10,20 22,25 99 “Find 25”
  • 11. B-tree Overview - insert 22 10 99 2, 3, 4 10,15,20 22,25 99 “Insert 15”
  • 12. Performance is IO limited when data > RAM, one IO is needed for each insert/update (actually it’s one IO for every index on the table) RAM RAM DISK B-tree Overview - performance 22 10 99 2, 3, 4 10,20 22,25 99
  • 14. Fractal Tree indexes similar to B-trees • store data in leaf nodes • use index key for ordering message buffer message buffer message buffer All internal nodes have message buffers As buffers overflow, they cascade down the tree Messages are eventually applied to leaf nodes different than B-trees • message buffers • big nodes (4MB vs. ~16KB)
  • 15. Doesn’t InnoDB Have Buffers? InnoDB Change Buffer • It sure does! • No buffer for the primary key index • One buffer for each secondary index • http://dev.mysql.com/doc/refman/5.5/en/innodb-performance-change_buffering.html
  • 16. InnoDB Buffers Help (for a while)
  • 17. InnoDB Buffers Help (for a while) • Buffering allows for IO amortization (> 1 operation per IO) • When data gets large enough the single buffer can’t help (blue = red)
  • 18. Fractal Tree Indexes - sample data 25 10 99 2,3,4 10,20 22,25 99 Looks a lot like a B-tree!
  • 19. Fractal Tree Indexes - insert insert 15; 25 10 99 insert (15) 2,3,4 10,20 22,25 99 • search operations must consider messages along the way • messages cascade down the tree as buffers fill up • they are eventually applied to the leaf nodes, hundreds or thousands of operations for a single IO • CPU and cache are conserved as important data is not ejected
  • 20. Fractal Tree Indexes - other operations 25 add_column(c4 bigint) 10 99 delete(99) increment(22,+5) ... insert (100) delete(8) delete(2) insert (8) 2,3,4 10,20 22,25 99 Lots of operations can be messages!
  • 21. MySQL/MariaDB/Percona Server + Fractal Tree Indexes = TokuDB
  • 22. 22 What is TokuDB? • Transactional MySQL Storage Engine - think InnoDB • Available for MySQL 5.5 and MariaDB 5.5 • Percona Server 5.6 and MariaDB 10.0 too • ACID and MVCC • Free/OSS Community Edition • http://github.com/Tokutek/ft-engine • Enterprise Edition • Commercial support + hot backup Performance + Compression + Agility
  • 23. TokuDB Performance Warning - Benchmarks Ahead!
  • 24. 24 Indexed Insertion Performance * old numbers, now > 25K/sec
  • 25. 25 Sysbench Performance (> RAM) The fastest IO is the one you never have to do (compression)
  • 27. 27 Compression + IO Reduction • Server was at 90% IO utilization with InnoDB, 10% IO utilization with TokuDB
  • 28. 28 Compression Performance • InnoDB performance is severely impacted by compression • Compression “misses” are costly *iiBench workload
  • 29. 29 Compression Achieved • InnoDB compresses 16K blocks, TokuDB is 64K (or more) • InnoDB requires fixed on-disk size, TokuDB is flexible *log style data
  • 32. 32 Schema Changes Without Downtime? • In TokuDB, column add/drop/expand is instant • “it’s just a message” – Fractal Tree index • No need for helper tools • MySQL 5.6 or Percona Tools • Operation is still expensive (table rewrite) • Or, no need to change on slave, then switch with master and repeat
  • 33. TokuDB 7.5 New Features
  • 34. 34 TokuDB 7.5 – Small Stuff • Updated MySQL and MariaDB to 5.5.39 • Allow XA transactions to skip fsync() in prepare phase • XA means a multi-statement transaction that includes TokuDB another another XA engine (InnoDB) • Community Contribution by Bohu TANG • Hot backup now supports multiple directories • datadir plus log_bin, tokudb_data_dir, tokudb_log_dir • Additional bulk fetch – this is not small! • Was just “select *” • Now includes “insert into select …”, “replace into select …”, “insert ignore select …”, insert into select … on duplicate key update …”, and “delete from select …”
  • 35. Brief Overview of MySQL Replication
  • 36. 36 MySQL Replication - Modes MySQL supports three replication modes • Statement Based • SQL statements are logged and replayed on slaves • "insert into foo values (1,1);" • Good for when statement affects a lot of rows • "insert into foo select * from bar;" • Row Based • Before and after images of affected rows are logged and replayed on slaves • foo : before (1,1) after (1,2) • Mixed • Statement based unless it is determined to be unsafe, at which point row based • "update foo set c1=5 limit 5;"
  • 37. 37 MySQL Replication – Read Only Setting the slave's read_only=1 • Puts the slave in "read only" mode • Except that user's with the SUPER privilege are allowed to insert/update/delete – This can break RFR!
  • 38. 38 MySQL Replication – Slave Apply Simple (hand wavy) overview of the slave process • Read a replication event from the binary log • If "statement" • Execute the statement on the slave • If "row" • Insert, just write the row • Delete/Update, lookup the row • If row doesn’t exist, stop replication
  • 39. 39 MySQL Replication – Slave Lag In MySQL 5.5, replication is single threaded • Masters support concurrency, slaves do not • Causes slaves to "lag" behind the master Improvements exist • MySQL 5.6 supports multi-threaded slaves (database) • MariaDB 10.0 it's own parallel replication mechanism All of these will work with TokuDB's Read Free Replication
  • 40. TokuDB Read Free Replication
  • 41. 41 Read Free Replication - Requirements • What is required on the master? • binlog_format=ROW • What is required on the slave? • read_only=1 • tokudb_rpl_unique_checks=0 and/or tokudb_rpl_lookup_rows=0
  • 42. 42 RFR Optimization #1 – Skip Unique Checks • tokudb_rpl_unique_checks=0 • Why is it OK? • The master already performed the uniqueness check • Why can't InnoDB skip unique checks? • It could, but… • InnoDB doesn't support change buffering on the PK • So, the row must be read for maintenance • Since it is then in memory, there is little to be gained for skipping the check
  • 43. RFR Optimization #2 – Skip Read/Modify/Write 43 • tokudb_rpl_lookup_rows=0 • Why is it OK? • If RBR, master provided before/after row images • Why can't InnoDB skip read/modify/write? • InnoDB doesn't support change buffering on the PK • So, the row must be read for maintenance • Why can TokuDB skip read/modify/write? • Everything necessary is in the binary log • Simple message injection
  • 44. Read Free Replication – Sysbench Benchmark 44 No lag Enabled Read Free Replication
  • 45. Read Free Replication – Sysbench Benchmark 45 Additional Read Capacity Enabled Read Free Replication
  • 46. Read Free Replication – Sysbench Benchmark 46 Mostly fsync() No reads! Enabled Read Free Replication
  • 47. 47 Read Free Replication - Ideas #1, scale your reads • HA is nice, but don’t we also want to scale our reads? Master Slave IO IO Slave Workload Workload Readers Readers No RFR RFR Master IO IO
  • 48. 48 Read Free Replication - Ideas #2, shared slaves Master1 Slave1 IO IO No RFR RFR Slave2 Master2 IO IO Master1 Slave1+2 IO IO Master2 IO IO 1 machine 2 mysqlds
  • 49. 49 Read Free Replication - Ideas #3, high IO master (flash/SSD), low IO slave (SAS/SATA) Master Slave RFR
  • 50. 50 Can we do even more? • Yes, Reduce fsync() calls on slaves - writes • This is the current choke point for RFR slaves • In 5.5, master.info and relay-log.info are just files • Each need fsync() for crash safety • In 5.6, these files can be InnoDB tables • 3 fsync() operations are now 1 • However, this becomes an XA transaction when TokuDB tables are in use • Even more fsync() calls • Should be able to convert these to TokuDB
  • 51. 51 TokuDB Resources • Website @ www.tokutek.com • Documentation @ docs.tokutek.com/tokudb • Community @ tokudb-user Google Group • Tokutek Blogs @ www.tokutek.com/tokuview
  • 52. Thank you! Thank you for attending! Enter questions into the chat box Contact us: contact@tokutek.com

Editor's Notes

  1. - Compression misses are very expensive
  2. - InnoDB is capped at 16x compression