SlideShare a Scribd company logo
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 query
Justin Swanhart
 
The InnoDB Storage Engine for MySQL
The InnoDB Storage Engine for MySQLThe InnoDB Storage Engine for MySQL
The InnoDB Storage Engine for MySQL
Morgan Tocker
 
What'sNnew in 3.0 Webinar
What'sNnew in 3.0 WebinarWhat'sNnew in 3.0 Webinar
What'sNnew in 3.0 Webinar
MongoDB
 
Fudcon talk.ppt
Fudcon talk.pptFudcon talk.ppt
Fudcon talk.ppt
webhostingguy
 
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
Krishnakumar 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 Zaitsev
Fuenteovejuna
 
In memory databases presentation
In memory databases presentationIn memory databases presentation
In memory databases presentation
Michael Keane
 
Linux tuning to improve PostgreSQL performance
Linux tuning to improve PostgreSQL performanceLinux tuning to improve PostgreSQL performance
Linux tuning to improve PostgreSQL performance
PostgreSQL-Consulting
 
In-memory Databases
In-memory DatabasesIn-memory Databases
In-memory Databases
Robert Friberg
 
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 latency
hyeongchae lee
 
MySQL 5.6 Performance
MySQL 5.6 PerformanceMySQL 5.6 Performance
MySQL 5.6 Performance
MYXPLAIN
 
MyRocks Deep Dive
MyRocks Deep DiveMyRocks Deep Dive
MyRocks Deep Dive
Yoshinori Matsunobu
 
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 Landscape
Colin Charles
 
Technical Introduction to PostgreSQL and PPAS
Technical Introduction to PostgreSQL and PPASTechnical Introduction to PostgreSQL and PPAS
Technical Introduction to PostgreSQL and PPAS
Ashnikbiz
 
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
Sameer Kumar
 
Postgres-XC: Symmetric PostgreSQL Cluster
Postgres-XC: Symmetric PostgreSQL ClusterPostgres-XC: Symmetric PostgreSQL Cluster
Postgres-XC: Symmetric PostgreSQL Cluster
Pavan 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-phpapp02
Francisco 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 Charles
NETWAYS
 
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
Colin Charles
 
Why MariaDB?
Why MariaDB?Why MariaDB?
Why MariaDB?
Colin 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 InnoDB
Mario 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 2017
Ivan 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 slideshare
Colin 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 deployment
Yoshinori 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 Availability
Colin 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 Writes
Liran 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 Learned
Tim Callaghan
 
JSSUG: SQL Sever Performance Tuning
JSSUG: SQL Sever Performance TuningJSSUG: SQL Sever Performance Tuning
JSSUG: SQL Sever Performance Tuning
Kenichiro Nakamura
 
Running MySQL on Linux
Running MySQL on LinuxRunning MySQL on Linux
Running MySQL on Linux
Great Wide Open
 
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
 
MySQL 和 InnoDB 性能
MySQL 和 InnoDB 性能MySQL 和 InnoDB 性能
MySQL 和 InnoDB 性能
YUCHENG HU
 

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)
 
MySQL 和 InnoDB 性能
MySQL 和 InnoDB 性能MySQL 和 InnoDB 性能
MySQL 和 InnoDB 性能
 

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 Performance
Tim Callaghan
 
Benchmarking MongoDB for Fame and Fortune
Benchmarking MongoDB for Fame and FortuneBenchmarking MongoDB for Fame and Fortune
Benchmarking MongoDB for Fame and Fortune
Tim 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 Guru
Tim Callaghan
 
5 Pitfalls to Avoid with MongoDB
5 Pitfalls to Avoid with MongoDB5 Pitfalls to Avoid with MongoDB
5 Pitfalls to Avoid with MongoDB
Tim 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 Guru
Tim 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 Works
Tim Callaghan
 
VoltDB : A Technical Overview
VoltDB : A Technical OverviewVoltDB : A Technical Overview
VoltDB : A Technical Overview
Tim 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

Principle of conventional tomography-Bibash Shahi ppt..pptx
Principle of conventional tomography-Bibash Shahi ppt..pptxPrinciple of conventional tomography-Bibash Shahi ppt..pptx
Principle of conventional tomography-Bibash Shahi ppt..pptx
BibashShahi
 
"What does it really mean for your system to be available, or how to define w...
"What does it really mean for your system to be available, or how to define w..."What does it really mean for your system to be available, or how to define w...
"What does it really mean for your system to be available, or how to define w...
Fwdays
 
Leveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and StandardsLeveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and Standards
Neo4j
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
Fwdays
 
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Pitangent Analytics & Technology Solutions Pvt. Ltd
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
Javier Junquera
 
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance PanelsNorthern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving
 
Session 1 - Intro to Robotic Process Automation.pdf
Session 1 - Intro to Robotic Process Automation.pdfSession 1 - Intro to Robotic Process Automation.pdf
Session 1 - Intro to Robotic Process Automation.pdf
UiPathCommunity
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
Jakub Marek
 
Y-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PPY-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PP
c5vrf27qcz
 
Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
Antonios Katsarakis
 
Mutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented ChatbotsMutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented Chatbots
Pablo Gómez Abajo
 
Poznań ACE event - 19.06.2024 Team 24 Wrapup slidedeck
Poznań ACE event - 19.06.2024 Team 24 Wrapup slidedeckPoznań ACE event - 19.06.2024 Team 24 Wrapup slidedeck
Poznań ACE event - 19.06.2024 Team 24 Wrapup slidedeck
FilipTomaszewski5
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
Miro Wengner
 
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving
 
The Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptxThe Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptx
operationspcvita
 
QA or the Highway - Component Testing: Bridging the gap between frontend appl...
QA or the Highway - Component Testing: Bridging the gap between frontend appl...QA or the Highway - Component Testing: Bridging the gap between frontend appl...
QA or the Highway - Component Testing: Bridging the gap between frontend appl...
zjhamm304
 
Apps Break Data
Apps Break DataApps Break Data
Apps Break Data
Ivo Velitchkov
 
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
DanBrown980551
 

Recently uploaded (20)

Principle of conventional tomography-Bibash Shahi ppt..pptx
Principle of conventional tomography-Bibash Shahi ppt..pptxPrinciple of conventional tomography-Bibash Shahi ppt..pptx
Principle of conventional tomography-Bibash Shahi ppt..pptx
 
"What does it really mean for your system to be available, or how to define w...
"What does it really mean for your system to be available, or how to define w..."What does it really mean for your system to be available, or how to define w...
"What does it really mean for your system to be available, or how to define w...
 
Leveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and StandardsLeveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and Standards
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
 
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
 
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance PanelsNorthern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
 
Session 1 - Intro to Robotic Process Automation.pdf
Session 1 - Intro to Robotic Process Automation.pdfSession 1 - Intro to Robotic Process Automation.pdf
Session 1 - Intro to Robotic Process Automation.pdf
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
 
Y-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PPY-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PP
 
Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
 
Mutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented ChatbotsMutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented Chatbots
 
Poznań ACE event - 19.06.2024 Team 24 Wrapup slidedeck
Poznań ACE event - 19.06.2024 Team 24 Wrapup slidedeckPoznań ACE event - 19.06.2024 Team 24 Wrapup slidedeck
Poznań ACE event - 19.06.2024 Team 24 Wrapup slidedeck
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
 
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024
 
The Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptxThe Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptx
 
QA or the Highway - Component Testing: Bridging the gap between frontend appl...
QA or the Highway - Component Testing: Bridging the gap between frontend appl...QA or the Highway - Component Testing: Bridging the gap between frontend appl...
QA or the Highway - Component Testing: Bridging the gap between frontend appl...
 
Apps Break Data
Apps Break DataApps Break Data
Apps Break Data
 
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
 

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