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

What's hot (20)

PDF
1 m+ qps on mysql galera cluster
OlinData
 
PDF
Open Source SQL databases enters millions queries per second era
Sveta Smirnova
 
PPTX
How (not) to kill your MySQL infrastructure
Miklos Szel
 
PPT
HandlerSocket - A NoSQL plugin for MySQL
Jui-Nan Lin
 
PDF
MySQL Audit using Percona audit plugin and ELK
I Goo Lee
 
PDF
Setting up mongo replica set
Sudheer Kondla
 
PPTX
Postgres-BDR with Google Cloud Platform
SungJae Yun
 
PPT
HandlerSocket plugin for MySQL (English)
akirahiguchi
 
PDF
SiteGround Tech TeamBuilding
Marian Marinov
 
PPTX
MongoDB – Sharded cluster tutorial - Percona Europe 2017
Antonios Giannopoulos
 
PDF
Как PostgreSQL работает с диском
PostgreSQL-Consulting
 
PDF
Oracle cluster installation with grid and iscsi
Chanaka Lasantha
 
PPTX
Advanced Replication
MongoDB
 
PDF
XtraDB 5.7: key performance algorithms
Laurynas Biveinis
 
PDF
Introduction to MySQL InnoDB Cluster
I Goo Lee
 
PDF
Add a bit of ACID to Cassandra. Cassandra Summit EU 2014
odnoklassniki.ru
 
PDF
Backup automation in KAKAO
I Goo Lee
 
PDF
Haproxy - zastosowania
Łukasz Jagiełło
 
PDF
Oracle cluster installation with grid and nfs
Chanaka Lasantha
 
1 m+ qps on mysql galera cluster
OlinData
 
Open Source SQL databases enters millions queries per second era
Sveta Smirnova
 
How (not) to kill your MySQL infrastructure
Miklos Szel
 
HandlerSocket - A NoSQL plugin for MySQL
Jui-Nan Lin
 
MySQL Audit using Percona audit plugin and ELK
I Goo Lee
 
Setting up mongo replica set
Sudheer Kondla
 
Postgres-BDR with Google Cloud Platform
SungJae Yun
 
HandlerSocket plugin for MySQL (English)
akirahiguchi
 
SiteGround Tech TeamBuilding
Marian Marinov
 
MongoDB – Sharded cluster tutorial - Percona Europe 2017
Antonios Giannopoulos
 
Как PostgreSQL работает с диском
PostgreSQL-Consulting
 
Oracle cluster installation with grid and iscsi
Chanaka Lasantha
 
Advanced Replication
MongoDB
 
XtraDB 5.7: key performance algorithms
Laurynas Biveinis
 
Introduction to MySQL InnoDB Cluster
I Goo Lee
 
Add a bit of ACID to Cassandra. Cassandra Summit EU 2014
odnoklassniki.ru
 
Backup automation in KAKAO
I Goo Lee
 
Haproxy - zastosowania
Łukasz Jagiełło
 
Oracle cluster installation with grid and nfs
Chanaka Lasantha
 

Viewers also liked (12)

PDF
TokuDB 高科扩展性 MySQL 和 MariaDB 数据库
YUCHENG HU
 
PDF
TokuDB - What You Need to Know
Jervin Real
 
PDF
MySQL Performance Tuning Variables
FromDual GmbH
 
PPTX
Get More Out of MySQL with TokuDB
Tim Callaghan
 
PDF
Infiniflash benchmark
Louis liu
 
PDF
HBASE Performane Test
Louis liu
 
PPTX
Visualizing Data in Elasticsearch DevFest DC 2016
David Erickson
 
PDF
Storage Methods for Nonstandard Data Patterns
Bob Burgess
 
PDF
Sql to-mongo db
Louis liu
 
PDF
MySQL 5.5 Guide to InnoDB Status
Karwin Software Solutions LLC
 
PPTX
What's new in MySQL Cluster 7.4 webinar charts
Andrew Morgan
 
PDF
Intro to column stores
Justin Swanhart
 
TokuDB 高科扩展性 MySQL 和 MariaDB 数据库
YUCHENG HU
 
TokuDB - What You Need to Know
Jervin Real
 
MySQL Performance Tuning Variables
FromDual GmbH
 
Get More Out of MySQL with TokuDB
Tim Callaghan
 
Infiniflash benchmark
Louis liu
 
HBASE Performane Test
Louis liu
 
Visualizing Data in Elasticsearch DevFest DC 2016
David Erickson
 
Storage Methods for Nonstandard Data Patterns
Bob Burgess
 
Sql to-mongo db
Louis liu
 
MySQL 5.5 Guide to InnoDB Status
Karwin Software Solutions LLC
 
What's new in MySQL Cluster 7.4 webinar charts
Andrew Morgan
 
Intro to column stores
Justin Swanhart
 
Ad

Similar to MySQL Tokudb engine benchmark (20)

PPTX
MySQLinsanity
Stanley Huang
 
PPTX
Compare mysql5.1.50 mysql5.5.8
Philip Zhong
 
PDF
Optimizing MariaDB for maximum performance
MariaDB plc
 
PDF
監査ログをもっと身近に!〜統合監査のすすめ〜
Michitoshi Yoshida
 
PPTX
Percona Live UK 2014 Part III
Alkin Tezuysal
 
PDF
Javantura v2 - Replication with MongoDB - what could go wrong... - Philipp Krenn
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
PDF
Multiple instances on linux
Vasudeva Rao
 
PDF
Applying profilers to my sql (fosdem 2017)
Valeriy Kravchuk
 
PDF
SequoiaDB Distributed Relational Database
wangzhonnew
 
PDF
MySQL 5.7 in a Nutshell
Emily Ikuta
 
DOCX
Multiple instances second method
Vasudeva Rao
 
PDF
Restore MySQL database from mysqlbackup
AllDatabaseSolutions
 
PDF
Operation outbreak
Prathan Phongthiproek
 
PDF
DUG'20: 12 - DAOS in Lenovo’s HPC Innovation Center
Andrey Kudryavtsev
 
PDF
Crash_Report_Mechanism_In_Tizen
Lex Yu
 
PDF
Spider Setup with AWS/sandbox
I Goo Lee
 
PDF
MySQL Spider Architecture
I Goo Lee
 
PDF
A little systemtap
yang bingwu
 
PDF
A little systemtap
yang bingwu
 
PPTX
MySQL InnoDB Cluster 미리보기 (remote cluster test)
Seungmin Yu
 
MySQLinsanity
Stanley Huang
 
Compare mysql5.1.50 mysql5.5.8
Philip Zhong
 
Optimizing MariaDB for maximum performance
MariaDB plc
 
監査ログをもっと身近に!〜統合監査のすすめ〜
Michitoshi Yoshida
 
Percona Live UK 2014 Part III
Alkin Tezuysal
 
Javantura v2 - Replication with MongoDB - what could go wrong... - Philipp Krenn
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
Multiple instances on linux
Vasudeva Rao
 
Applying profilers to my sql (fosdem 2017)
Valeriy Kravchuk
 
SequoiaDB Distributed Relational Database
wangzhonnew
 
MySQL 5.7 in a Nutshell
Emily Ikuta
 
Multiple instances second method
Vasudeva Rao
 
Restore MySQL database from mysqlbackup
AllDatabaseSolutions
 
Operation outbreak
Prathan Phongthiproek
 
DUG'20: 12 - DAOS in Lenovo’s HPC Innovation Center
Andrey Kudryavtsev
 
Crash_Report_Mechanism_In_Tizen
Lex Yu
 
Spider Setup with AWS/sandbox
I Goo Lee
 
MySQL Spider Architecture
I Goo Lee
 
A little systemtap
yang bingwu
 
A little systemtap
yang bingwu
 
MySQL InnoDB Cluster 미리보기 (remote cluster test)
Seungmin Yu
 
Ad

More from Louis liu (20)

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

Recently uploaded (20)

PPTX
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
PDF
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
PDF
The Future of Mobile Is Context-Aware—Are You Ready?
iProgrammer Solutions Private Limited
 
PDF
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
PDF
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
PPTX
Applied-Statistics-Mastering-Data-Driven-Decisions.pptx
parmaryashparmaryash
 
PPTX
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
PDF
introduction to computer hardware and sofeware
chauhanshraddha2007
 
PDF
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
PPTX
Agile Chennai 18-19 July 2025 | Emerging patterns in Agentic AI by Bharani Su...
AgileNetwork
 
PDF
Brief History of Internet - Early Days of Internet
sutharharshit158
 
PDF
NewMind AI Weekly Chronicles – July’25, Week III
NewMind AI
 
PDF
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
PDF
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
PDF
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
PDF
The Future of Artificial Intelligence (AI)
Mukul
 
PPTX
Farrell_Programming Logic and Design slides_10e_ch02_PowerPoint.pptx
bashnahara11
 
PPTX
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
PDF
State-Dependent Conformal Perception Bounds for Neuro-Symbolic Verification
Ivan Ruchkin
 
PDF
TrustArc Webinar - Navigating Data Privacy in LATAM: Laws, Trends, and Compli...
TrustArc
 
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
The Future of Mobile Is Context-Aware—Are You Ready?
iProgrammer Solutions Private Limited
 
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
Applied-Statistics-Mastering-Data-Driven-Decisions.pptx
parmaryashparmaryash
 
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
introduction to computer hardware and sofeware
chauhanshraddha2007
 
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
Agile Chennai 18-19 July 2025 | Emerging patterns in Agentic AI by Bharani Su...
AgileNetwork
 
Brief History of Internet - Early Days of Internet
sutharharshit158
 
NewMind AI Weekly Chronicles – July’25, Week III
NewMind AI
 
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
The Future of Artificial Intelligence (AI)
Mukul
 
Farrell_Programming Logic and Design slides_10e_ch02_PowerPoint.pptx
bashnahara11
 
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
State-Dependent Conformal Perception Bounds for Neuro-Symbolic Verification
Ivan Ruchkin
 
TrustArc Webinar - Navigating Data Privacy in LATAM: Laws, Trends, and Compli...
TrustArc
 

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/[email protected]: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.