SlideShare a Scribd company logo
MySQL TokuDB Engine performance benchmark on FusionIO
Environment:
Machine DELL PowerEdge R720 * 2
CPU Intel(R) Xeon(R) CPU E5-2630 v2 @ 2.60GHz * 24
memory 128GB
OS CentOS release 6.5 (Final)
Kernel 2.6.32-431.el6.x86_64 #1 SMP
DB version 10.0.21-MariaDB-log MariaDB Server
raid Internal Raid
File system Ext4 with options
disk FusionIO SX300 1.6TB
Database configuration:
InnoDB:
[client]
port = 3306
socket = /storage/fioa/mysql3306/data/mysql.sock
[mysqld]
port = 3306
socket = /storage/fioa/mysql3306/data/mysql.sock
server-id = 100011
replicate_ignore_db = test
skip-name-resolve
lower_case_table_names = 1
character-set-server = utf8
replicate_wild_ignore_table = dbmon.%,sys.%,zabbix.%,mysql.%,test.%,bbs.%,slow_query_log.%
tmpdir = /storage/fioa/mysql3306/mysql-tmpdir
key_buffer_size = 64M
sort_buffer_size = 8M
read_buffer_size = 8M
read_rnd_buffer_size = 8M
query_cache_type = 0
max_allowed_packet = 628M
myisam_sort_buffer_size = 128M
tmp_table_size = 1024M
join_buffer_size = 16M
back_log = 500
open_files_limit = 6000
innodb_open_files = 4096
table_open_cache = 768
thread_cache_size = 12
max_connections = 6000
thread_concurrency = 48
datadir = /storage/fioa/mysql3306/data
tmpdir = /storage/fioa/mysql3306/mysql-tmpdir
slow_query_log = 1
long_query_time = 1
slow_query_log_file = /storage/fioa/mysql3306/mysql-slow.log
log-error = /storage/fioa/mysql3306/mysql-error.log
log-warnings
sysdate-is-now
###replication setting
log-slave-updates
sync_binlog = 0
binlog_format = row
log_bin_trust_function_creators = 1
log-bin = /storage/fioa/mysql3306/binlog/mysql-bin
log-slave-updates
relay_log_purge = 0
relay-log = /storage/fioa/mysql3306/binlog/mysql-relay-bin
relay-log-index = /storage/fioa/mysql3306/binlog/mysql-relay-bin.index
relay_log_info_file = /storage/fioa/mysql3306/binlog/relay.info
master-info-file = /storage/fioa/mysql3306/binlog/master.info
#innodb setting
innodb_data_home_dir = /storage/fioa/mysql3306/data
innodb_data_file_path = ibdata0:1024M;ibdata1:1024M;ibdata2:1024M;ibdata3:1024M:autoextend
innodb_log_group_home_dir = /storage/fioa/mysql3306/data
innodb_log_files_in_group = 2
innodb_log_file_size = 512M
innodb_buffer_pool_size = 65536M
innodb_log_buffer_size = 128M
innodb_flush_log_at_trx_commit = 2
innodb_flush_method = O_DIRECT
innodb_thread_concurrency = 6
innodb_file_per_table = 1
transaction-isolation = READ-COMMITTED
[mysqldump]
quick
max_allowed_packet = 128M
[myisamchk]
key_buffer_size = 256M
sort_buffer_size = 256M
read_buffer = 4M
write_buffer = 4M
[mysql]
max_allowed_packet = 128M
default-character-set = utf8
no_auto_rehash
prompt = "R:m:s d> "
pager = "more"
TokuDB :
[client]
port = 3306
socket = /storage/fioa/mysql3306/data/mysql.sock
[mysqld]
port = 3306
socket = /storage/fioa/mysql3306/data/mysql.sock
server-id = 100011
replicate_ignore_db = test
skip-name-resolve
lower_case_table_names = 1
character-set-server = utf8
plugin-load=ha_tokudb
tokudb_cache_size =64G
tokudb_directio=1
tokudb_commit_sync = 0
replicate_wild_ignore_table = dbmon.%,sys.%,zabbix.%,mysql.%,test.%,bbs.%,slow_query_log.%
plugin-load=ha_tokudb
tmpdir = /storage/fioa/mysql3306/mysql-tmpdir
key_buffer_size = 64M
sort_buffer_size = 8M
read_buffer_size = 8M
read_rnd_buffer_size = 8M
query_cache_type = 0
max_allowed_packet = 628M
myisam_sort_buffer_size = 128M
tmp_table_size = 1024M
join_buffer_size = 16M
back_log = 500
open_files_limit = 6000
innodb_open_files = 4096
table_open_cache = 768
thread_cache_size = 12
max_connections = 6000
thread_concurrency = 48
datadir = /storage/fioa/mysql3306/data
tmpdir = /storage/fioa/mysql3306/mysql-tmpdir
slow_query_log = 1
long_query_time = 1
slow_query_log_file = /storage/fioa/mysql3306/mysql-slow.log
log-error = /storage/fioa/mysql3306/mysql-error.log
log-warnings
sysdate-is-now
###replication setting
log-slave-updates
sync_binlog = 0
binlog_format = row
log_bin_trust_function_creators = 1
log-bin = /storage/fioa/mysql3306/binlog/mysql-bin
log-slave-updates
relay_log_purge = 0
relay-log = /storage/fioa/mysql3306/binlog/mysql-relay-bin
relay-log-index = /storage/fioa/mysql3306/binlog/mysql-relay-bin.index
relay_log_info_file = /storage/fioa/mysql3306/binlog/relay.info
master-info-file = /storage/fioa/mysql3306/binlog/master.info
#innodb setting
innodb_data_home_dir = /storage/fioa/mysql3306/data
innodb_data_file_path = ibdata0:1024M;ibdata1:1024M;ibdata2:1024M;ibdata3:1024M:autoextend
innodb_log_group_home_dir = /storage/fioa/mysql3306/data
innodb_log_files_in_group = 2
innodb_log_file_size = 512M
innodb_flush_method = O_DIRECT
innodb_buffer_pool_size = 65536M
innodb_log_buffer_size = 128M
innodb_flush_log_at_trx_commit = 2
innodb_thread_concurrency = 6
innodb_file_per_table = 1
transaction-isolation = READ-COMMITTED
[mysqldump]
quick
max_allowed_packet = 128M
[myisamchk]
key_buffer_size = 256M
sort_buffer_size = 256M
read_buffer = 4M
write_buffer = 4M
[mysql]
max_allowed_packet = 128M
default-character-set = utf8
no_auto_rehash
prompt = "R:m:s d> "
pager = "more"
We create 1000 DWs first to test on both InnoDB and TokuDB engine –separate test from 32 threads to 512 threads
TpmC result on different threads
InnoDB Threads 32 64 128 256 512 1024
TpmC 46376.699 48921.6 47090.801 41429.398 39957.102 33683.102
TokuDB Threads 32 64 128 256 512 1024
TpmC 41694.898 30663.7 22092 13243.9 N/A N/A
TokuDB does not support foreign keys, so we add indexes for queries, even so in a heavy-load environment TokuDB still has too
many system locks that result in a low TpmC.
In this test, TokuDB engine got a poor performance (TpmC decreases rapidly, many connections timeout appear due to system locks
in MySQL when threads up to 512).
Look at total size of these two engines:
InnoDB tpcc1000 DB:
TokuDB tpcc1000 DB:
Simple test table mytest10 size:
Compression ratio of these two engines is nearly 2:1
Mydbtest performance in different threads
We create four tables for this test on four modes (100% insert, 50%insert+50%select, 50%insert+50%update, mix)
mode threads 256 512
insert(innodb) Summary: exec=23768/s, qtps=47669/s Summary: exec=13319/s, qtps=54116/s
insert(tokudb) Summary: exec=23640/s, qtps=47415/s Summary: exec=12818/s, qtps=51969/s
50insert+50sel(innodb) Summary: exec=16606/s, qtps=66803/s Summary: exec=16418/s, qtps=66461/s
50insert+50sel(tokudb) Summary: exec=15324/s, qtps=61667/s Summary: exec=15317/s, qtps=61979/s
50insert+50upd(innodb) Summary: exec=10078/s, qtps=40657/s Summary: exec=10016/s, qtps=40842/s
50insert+50upd(tokudb) Summary: exec=9890/s, qtps=39890/s Summary: exec=9843/s, qtps=40155/s
mix mode(innodb) Summary: exec=7573/s, qtps=61504/s Summary: exec=7728/s, qtps=63939/s
mix mode(tokudb) Summary: exec=6788/s, qtps=55262/s Summary: exec=6833/s, qtps=56753/s
InnoDB still has a better performance than TokuDB when use simple queries to avoid MySQL locks.
option
user xxxxx/xxxx@10.128.6.35:3306:tpcc1000
name tpcc1000
time 10m
log toku_insert100%_512_parallel__%p.log
declare
a int 1 200000000
b int 40000 6000000000
c CHAR 1 20
d CHAR 1 50
e char 1 4
f CHAR 1 5
g char 1 6
h char 3 15
j int 35 555555555
h char 3 15
k date -90 -60
l int 1 49999999
begin
insert into mytest10 values(:a,:b,:c,:d,:e,:f,:g,:h,:j);
--- /*insert into mytest values (:a,:c,:d);*/
--- /*select * from mytest where a=:a;*/
--- /*insert into mytest2 values (:a,:b,:k,:h);*/
--- /*update mytest set a=a-1 where a=:a;*/
--- /*select * from mytest2 where k=:k;*/
end
Conclusion:
Reference:https://www.percona.com/blog/2015/07/24/innodb-vs-tokudb-in-linkbench-benchmark/
Though, it worth remembering, that:
 On a fast expensive storage, TokuDB provides a better compression, which allows to store more data in limited capacity
 TokuDB still writes two time less than InnoDB, that mean twice longer lifetime for SSD (still expensive).
Also looking at the results, I can make the conclusion that InnoDB compression is inefficient in its implementation, as it is not able to get benefits: first, from doing
less reads (well, it helps to get better than uncompressed InnoDB, but not much); and, second, from a fast storage.
In this picture, TokuDB has a better performance on IO slow storage like SATA SAS disk (Author uses M500 SSD disk for this test)
For us data quality is more important than storage cost. We have already used SSD&PCIe cards for all database system. TokuDB
has big advantage for its high compression ratio. I thinks it’s more suitable for log system rather than core system.

More Related Content

PDF
Recent my sql_performance Test detail
PDF
My sql fabric ha and sharding solutions
PDF
MyAWR another mysql awr
PDF
Nvmfs benchmark
PDF
MySQL async message subscription platform
PDF
WiredTiger In-Memory vs WiredTiger B-Tree
PDF
MongoDB Shard Cluster
PDF
New features in Performance Schema 5.7 in action
Recent my sql_performance Test detail
My sql fabric ha and sharding solutions
MyAWR another mysql awr
Nvmfs benchmark
MySQL async message subscription platform
WiredTiger In-Memory vs WiredTiger B-Tree
MongoDB Shard Cluster
New features in Performance Schema 5.7 in action

What's hot (20)

PDF
1 m+ qps on mysql galera cluster
PDF
Open Source SQL databases enters millions queries per second era
PPTX
How (not) to kill your MySQL infrastructure
PPT
HandlerSocket - A NoSQL plugin for MySQL
PDF
MySQL Audit using Percona audit plugin and ELK
PDF
Setting up mongo replica set
PPTX
Postgres-BDR with Google Cloud Platform
PPT
HandlerSocket plugin for MySQL (English)
PDF
SiteGround Tech TeamBuilding
PPTX
MongoDB – Sharded cluster tutorial - Percona Europe 2017
PDF
Как PostgreSQL работает с диском
PDF
Oracle cluster installation with grid and iscsi
PPTX
Advanced Replication
PDF
XtraDB 5.7: key performance algorithms
PDF
Introduction to MySQL InnoDB Cluster
PDF
Add a bit of ACID to Cassandra. Cassandra Summit EU 2014
PDF
Backup automation in KAKAO
PDF
Haproxy - zastosowania
PDF
Oracle cluster installation with grid and nfs
1 m+ qps on mysql galera cluster
Open Source SQL databases enters millions queries per second era
How (not) to kill your MySQL infrastructure
HandlerSocket - A NoSQL plugin for MySQL
MySQL Audit using Percona audit plugin and ELK
Setting up mongo replica set
Postgres-BDR with Google Cloud Platform
HandlerSocket plugin for MySQL (English)
SiteGround Tech TeamBuilding
MongoDB – Sharded cluster tutorial - Percona Europe 2017
Как PostgreSQL работает с диском
Oracle cluster installation with grid and iscsi
Advanced Replication
XtraDB 5.7: key performance algorithms
Introduction to MySQL InnoDB Cluster
Add a bit of ACID to Cassandra. Cassandra Summit EU 2014
Backup automation in KAKAO
Haproxy - zastosowania
Oracle cluster installation with grid and nfs
Ad

Viewers also liked (12)

PDF
TokuDB 高科扩展性 MySQL 和 MariaDB 数据库
PDF
TokuDB - What You Need to Know
PDF
MySQL Performance Tuning Variables
PPTX
Get More Out of MySQL with TokuDB
PDF
Infiniflash benchmark
PDF
HBASE Performane Test
PPTX
Visualizing Data in Elasticsearch DevFest DC 2016
PDF
Storage Methods for Nonstandard Data Patterns
PDF
Sql to-mongo db
PDF
MySQL 5.5 Guide to InnoDB Status
PPTX
What's new in MySQL Cluster 7.4 webinar charts
PDF
Intro to column stores
TokuDB 高科扩展性 MySQL 和 MariaDB 数据库
TokuDB - What You Need to Know
MySQL Performance Tuning Variables
Get More Out of MySQL with TokuDB
Infiniflash benchmark
HBASE Performane Test
Visualizing Data in Elasticsearch DevFest DC 2016
Storage Methods for Nonstandard Data Patterns
Sql to-mongo db
MySQL 5.5 Guide to InnoDB Status
What's new in MySQL Cluster 7.4 webinar charts
Intro to column stores
Ad

Similar to MySQL Tokudb engine benchmark (20)

PPTX
MySQLinsanity
PPTX
Compare mysql5.1.50 mysql5.5.8
PDF
Optimizing MariaDB for maximum performance
PDF
監査ログをもっと身近に!〜統合監査のすすめ〜
PPTX
Percona Live UK 2014 Part III
PDF
Javantura v2 - Replication with MongoDB - what could go wrong... - Philipp Krenn
PDF
Multiple instances on linux
PDF
Applying profilers to my sql (fosdem 2017)
PDF
SequoiaDB Distributed Relational Database
PDF
MySQL 5.7 in a Nutshell
DOCX
Multiple instances second method
PDF
Restore MySQL database from mysqlbackup
PDF
Operation outbreak
PDF
DUG'20: 12 - DAOS in Lenovo’s HPC Innovation Center
PDF
Crash_Report_Mechanism_In_Tizen
PDF
MySQL Spider Architecture
PDF
Spider Setup with AWS/sandbox
PDF
A little systemtap
PDF
A little systemtap
PPTX
MySQL InnoDB Cluster 미리보기 (remote cluster test)
MySQLinsanity
Compare mysql5.1.50 mysql5.5.8
Optimizing MariaDB for maximum performance
監査ログをもっと身近に!〜統合監査のすすめ〜
Percona Live UK 2014 Part III
Javantura v2 - Replication with MongoDB - what could go wrong... - Philipp Krenn
Multiple instances on linux
Applying profilers to my sql (fosdem 2017)
SequoiaDB Distributed Relational Database
MySQL 5.7 in a Nutshell
Multiple instances second method
Restore MySQL database from mysqlbackup
Operation outbreak
DUG'20: 12 - DAOS in Lenovo’s HPC Innovation Center
Crash_Report_Mechanism_In_Tizen
MySQL Spider Architecture
Spider Setup with AWS/sandbox
A little systemtap
A little systemtap
MySQL InnoDB Cluster 미리보기 (remote cluster test)

More from Louis liu (20)

PDF
Tcpcopy benchmark
PDF
JK Log-Center architect
PDF
Wdt Test
PDF
JKDB BACKUP Introduction
PDF
MySQL 5.7 milestone
PDF
MySQL Oslayer performace optimization
PDF
Jkcn MySQLDB 架构
PDF
基于Mongodb的压力评测工具 ycsb的一些概括
PDF
NetApp ef540 SSD Storage Test
PPTX
Exadata best practice on E-commerce area
PDF
MySQL 5.5&5.6 new features summary
PDF
Ssd gc review
PDF
1号店数据库架构
PDF
Architecture of YHD
PPT
Oracle dgha
PDF
Think of oracle and mysql bind value
PDF
ION performance brief hp dl980-8b
PDF
How to study oracle by louis liu
PDF
Advanced tips of dbms statas
PPT
Optimizer in oracle 11g by wwf from ebay COC
Tcpcopy benchmark
JK Log-Center architect
Wdt Test
JKDB BACKUP Introduction
MySQL 5.7 milestone
MySQL Oslayer performace optimization
Jkcn MySQLDB 架构
基于Mongodb的压力评测工具 ycsb的一些概括
NetApp ef540 SSD Storage Test
Exadata best practice on E-commerce area
MySQL 5.5&5.6 new features summary
Ssd gc review
1号店数据库架构
Architecture of YHD
Oracle dgha
Think of oracle and mysql bind value
ION performance brief hp dl980-8b
How to study oracle by louis liu
Advanced tips of dbms statas
Optimizer in oracle 11g by wwf from ebay COC

Recently uploaded (20)

PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Empathic Computing: Creating Shared Understanding
PPTX
Spectroscopy.pptx food analysis technology
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Approach and Philosophy of On baking technology
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPT
Teaching material agriculture food technology
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
cuic standard and advanced reporting.pdf
PPTX
MYSQL Presentation for SQL database connectivity
PPTX
Cloud computing and distributed systems.
PPTX
Big Data Technologies - Introduction.pptx
Reach Out and Touch Someone: Haptics and Empathic Computing
Empathic Computing: Creating Shared Understanding
Spectroscopy.pptx food analysis technology
Spectral efficient network and resource selection model in 5G networks
Approach and Philosophy of On baking technology
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Encapsulation_ Review paper, used for researhc scholars
The Rise and Fall of 3GPP – Time for a Sabbatical?
Teaching material agriculture food technology
Programs and apps: productivity, graphics, security and other tools
Digital-Transformation-Roadmap-for-Companies.pptx
MIND Revenue Release Quarter 2 2025 Press Release
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Unlocking AI with Model Context Protocol (MCP)
cuic standard and advanced reporting.pdf
MYSQL Presentation for SQL database connectivity
Cloud computing and distributed systems.
Big Data Technologies - Introduction.pptx

MySQL Tokudb engine benchmark

  • 1. MySQL TokuDB Engine performance benchmark on FusionIO Environment: Machine DELL PowerEdge R720 * 2 CPU Intel(R) Xeon(R) CPU E5-2630 v2 @ 2.60GHz * 24 memory 128GB OS CentOS release 6.5 (Final) Kernel 2.6.32-431.el6.x86_64 #1 SMP DB version 10.0.21-MariaDB-log MariaDB Server raid Internal Raid File system Ext4 with options disk FusionIO SX300 1.6TB
  • 2. Database configuration: InnoDB: [client] port = 3306 socket = /storage/fioa/mysql3306/data/mysql.sock [mysqld] port = 3306 socket = /storage/fioa/mysql3306/data/mysql.sock server-id = 100011 replicate_ignore_db = test skip-name-resolve lower_case_table_names = 1 character-set-server = utf8 replicate_wild_ignore_table = dbmon.%,sys.%,zabbix.%,mysql.%,test.%,bbs.%,slow_query_log.% tmpdir = /storage/fioa/mysql3306/mysql-tmpdir key_buffer_size = 64M sort_buffer_size = 8M read_buffer_size = 8M read_rnd_buffer_size = 8M query_cache_type = 0 max_allowed_packet = 628M myisam_sort_buffer_size = 128M tmp_table_size = 1024M
  • 3. join_buffer_size = 16M back_log = 500 open_files_limit = 6000 innodb_open_files = 4096 table_open_cache = 768 thread_cache_size = 12 max_connections = 6000 thread_concurrency = 48 datadir = /storage/fioa/mysql3306/data tmpdir = /storage/fioa/mysql3306/mysql-tmpdir slow_query_log = 1 long_query_time = 1 slow_query_log_file = /storage/fioa/mysql3306/mysql-slow.log log-error = /storage/fioa/mysql3306/mysql-error.log log-warnings sysdate-is-now ###replication setting log-slave-updates sync_binlog = 0 binlog_format = row log_bin_trust_function_creators = 1 log-bin = /storage/fioa/mysql3306/binlog/mysql-bin log-slave-updates relay_log_purge = 0 relay-log = /storage/fioa/mysql3306/binlog/mysql-relay-bin relay-log-index = /storage/fioa/mysql3306/binlog/mysql-relay-bin.index
  • 4. relay_log_info_file = /storage/fioa/mysql3306/binlog/relay.info master-info-file = /storage/fioa/mysql3306/binlog/master.info #innodb setting innodb_data_home_dir = /storage/fioa/mysql3306/data innodb_data_file_path = ibdata0:1024M;ibdata1:1024M;ibdata2:1024M;ibdata3:1024M:autoextend innodb_log_group_home_dir = /storage/fioa/mysql3306/data innodb_log_files_in_group = 2 innodb_log_file_size = 512M innodb_buffer_pool_size = 65536M innodb_log_buffer_size = 128M innodb_flush_log_at_trx_commit = 2 innodb_flush_method = O_DIRECT innodb_thread_concurrency = 6 innodb_file_per_table = 1 transaction-isolation = READ-COMMITTED [mysqldump] quick max_allowed_packet = 128M [myisamchk] key_buffer_size = 256M sort_buffer_size = 256M read_buffer = 4M write_buffer = 4M [mysql] max_allowed_packet = 128M default-character-set = utf8
  • 5. no_auto_rehash prompt = "R:m:s d> " pager = "more" TokuDB : [client] port = 3306 socket = /storage/fioa/mysql3306/data/mysql.sock [mysqld] port = 3306 socket = /storage/fioa/mysql3306/data/mysql.sock server-id = 100011 replicate_ignore_db = test skip-name-resolve lower_case_table_names = 1 character-set-server = utf8 plugin-load=ha_tokudb tokudb_cache_size =64G tokudb_directio=1 tokudb_commit_sync = 0 replicate_wild_ignore_table = dbmon.%,sys.%,zabbix.%,mysql.%,test.%,bbs.%,slow_query_log.% plugin-load=ha_tokudb tmpdir = /storage/fioa/mysql3306/mysql-tmpdir
  • 6. key_buffer_size = 64M sort_buffer_size = 8M read_buffer_size = 8M read_rnd_buffer_size = 8M query_cache_type = 0 max_allowed_packet = 628M myisam_sort_buffer_size = 128M tmp_table_size = 1024M join_buffer_size = 16M back_log = 500 open_files_limit = 6000 innodb_open_files = 4096 table_open_cache = 768 thread_cache_size = 12 max_connections = 6000 thread_concurrency = 48 datadir = /storage/fioa/mysql3306/data tmpdir = /storage/fioa/mysql3306/mysql-tmpdir slow_query_log = 1 long_query_time = 1 slow_query_log_file = /storage/fioa/mysql3306/mysql-slow.log log-error = /storage/fioa/mysql3306/mysql-error.log log-warnings sysdate-is-now ###replication setting log-slave-updates
  • 7. sync_binlog = 0 binlog_format = row log_bin_trust_function_creators = 1 log-bin = /storage/fioa/mysql3306/binlog/mysql-bin log-slave-updates relay_log_purge = 0 relay-log = /storage/fioa/mysql3306/binlog/mysql-relay-bin relay-log-index = /storage/fioa/mysql3306/binlog/mysql-relay-bin.index relay_log_info_file = /storage/fioa/mysql3306/binlog/relay.info master-info-file = /storage/fioa/mysql3306/binlog/master.info #innodb setting innodb_data_home_dir = /storage/fioa/mysql3306/data innodb_data_file_path = ibdata0:1024M;ibdata1:1024M;ibdata2:1024M;ibdata3:1024M:autoextend innodb_log_group_home_dir = /storage/fioa/mysql3306/data innodb_log_files_in_group = 2 innodb_log_file_size = 512M innodb_flush_method = O_DIRECT innodb_buffer_pool_size = 65536M innodb_log_buffer_size = 128M innodb_flush_log_at_trx_commit = 2 innodb_thread_concurrency = 6 innodb_file_per_table = 1 transaction-isolation = READ-COMMITTED [mysqldump] quick max_allowed_packet = 128M
  • 8. [myisamchk] key_buffer_size = 256M sort_buffer_size = 256M read_buffer = 4M write_buffer = 4M [mysql] max_allowed_packet = 128M default-character-set = utf8 no_auto_rehash prompt = "R:m:s d> " pager = "more" We create 1000 DWs first to test on both InnoDB and TokuDB engine –separate test from 32 threads to 512 threads
  • 9. TpmC result on different threads InnoDB Threads 32 64 128 256 512 1024 TpmC 46376.699 48921.6 47090.801 41429.398 39957.102 33683.102 TokuDB Threads 32 64 128 256 512 1024 TpmC 41694.898 30663.7 22092 13243.9 N/A N/A TokuDB does not support foreign keys, so we add indexes for queries, even so in a heavy-load environment TokuDB still has too many system locks that result in a low TpmC. In this test, TokuDB engine got a poor performance (TpmC decreases rapidly, many connections timeout appear due to system locks in MySQL when threads up to 512).
  • 10. Look at total size of these two engines: InnoDB tpcc1000 DB: TokuDB tpcc1000 DB:
  • 11. Simple test table mytest10 size:
  • 12. Compression ratio of these two engines is nearly 2:1
  • 13. Mydbtest performance in different threads We create four tables for this test on four modes (100% insert, 50%insert+50%select, 50%insert+50%update, mix) mode threads 256 512 insert(innodb) Summary: exec=23768/s, qtps=47669/s Summary: exec=13319/s, qtps=54116/s insert(tokudb) Summary: exec=23640/s, qtps=47415/s Summary: exec=12818/s, qtps=51969/s 50insert+50sel(innodb) Summary: exec=16606/s, qtps=66803/s Summary: exec=16418/s, qtps=66461/s 50insert+50sel(tokudb) Summary: exec=15324/s, qtps=61667/s Summary: exec=15317/s, qtps=61979/s 50insert+50upd(innodb) Summary: exec=10078/s, qtps=40657/s Summary: exec=10016/s, qtps=40842/s 50insert+50upd(tokudb) Summary: exec=9890/s, qtps=39890/s Summary: exec=9843/s, qtps=40155/s mix mode(innodb) Summary: exec=7573/s, qtps=61504/s Summary: exec=7728/s, qtps=63939/s mix mode(tokudb) Summary: exec=6788/s, qtps=55262/s Summary: exec=6833/s, qtps=56753/s InnoDB still has a better performance than TokuDB when use simple queries to avoid MySQL locks.
  • 14. option user xxxxx/xxxx@10.128.6.35:3306:tpcc1000 name tpcc1000 time 10m log toku_insert100%_512_parallel__%p.log declare a int 1 200000000 b int 40000 6000000000 c CHAR 1 20 d CHAR 1 50 e char 1 4 f CHAR 1 5 g char 1 6 h char 3 15 j int 35 555555555 h char 3 15 k date -90 -60 l int 1 49999999 begin insert into mytest10 values(:a,:b,:c,:d,:e,:f,:g,:h,:j); --- /*insert into mytest values (:a,:c,:d);*/ --- /*select * from mytest where a=:a;*/ --- /*insert into mytest2 values (:a,:b,:k,:h);*/ --- /*update mytest set a=a-1 where a=:a;*/ --- /*select * from mytest2 where k=:k;*/ end
  • 15. Conclusion: Reference:https://www.percona.com/blog/2015/07/24/innodb-vs-tokudb-in-linkbench-benchmark/ Though, it worth remembering, that:  On a fast expensive storage, TokuDB provides a better compression, which allows to store more data in limited capacity  TokuDB still writes two time less than InnoDB, that mean twice longer lifetime for SSD (still expensive). Also looking at the results, I can make the conclusion that InnoDB compression is inefficient in its implementation, as it is not able to get benefits: first, from doing less reads (well, it helps to get better than uncompressed InnoDB, but not much); and, second, from a fast storage.
  • 16. In this picture, TokuDB has a better performance on IO slow storage like SATA SAS disk (Author uses M500 SSD disk for this test) For us data quality is more important than storage cost. We have already used SSD&PCIe cards for all database system. TokuDB has big advantage for its high compression ratio. I thinks it’s more suitable for log system rather than core system.