TokuDB® v5.2, the latest version of Tokutek’s flagship storage engine for MySQL and MariaDB, is now available.
This version offers performance enhancements over previous releases, especially for multi-client scale up and point queries, and extends the cases where ALTER TABLE is non-blocking, in particular adding Hot Column Rename.
TokuDB v5.2 maintains all our established advantages: fast trickle load, fast bulk load, fast range queries through clustering indexes, hot schema changes, great compression, no fragmentation, and full MySQL compatibility for ease of installation. See our benchmark page for details.
Multi-client workloads
In TokuDB v5.2, we have reworked our locking scheme to better support multi-client workloads, and as always, we have focused on large databases. How did we do? Let’s check out some benchmark numbers.
SysBench
This is a SysBench comparison of InnoDB 1.1.8 and TokuDB v5.2. Prior to the run we started the database from a cold back-up (the cache is empty at the beginning of the 1 client thread run) and ran for 1 hour at each number of client threads. The following graph shows a significant performance improvement (10%-60%) at all measured levels of concurrency. The values shown are the average transactions per second for the final 15 minutes of the benchmark.
Image may be NSFW.
Clik here to view.
Additional details on the software settings for Sysbench can also be found in the Appendix at the end of this page.
TPCC
This is a TPCC-like comparison of InnoDB and TokuDB v5.2 on a 5000 warehouse database. The horizontal axis is the number of clients, the vertical axis shows throughput (New Order Transactions/10 seconds). Our multi-client work brings us to parity with InnoDB for this test.
Image may be NSFW.
Clik here to view.
Other key improvements
Both the Sysbench and the TPCC-like benchmarks have strong point-query components. Our improved performance over InnoDB, even with one client, shows that we are now outperforming InnoDB for point queries, at least in these tests. We’ll be blogging more specifically about point query performance so stay tuned. One way we achieve better point query performance is to have a different read-block size and write-block size. I’ll explain what that means in later blog posts, but one consequence is that read-intensive loads on RAIDed disks now perform many fewer I/Os.
In other news, we previously released Hot Indexing (HI) and Hot Column Addition and Deletion (HCAD). In both cases, the downtime of these Alter Table operations goes from hours to seconds.
In v5.2, we have added Hot Column Rename to the suite of online operations we support. You’ll be able to change the name of a column in a matter of seconds, just as you can now add or delete columns. We have also made Optimize Table hot, but it’s important to note that in TokuDB, Optimize Table only flushes background work, such as that produced by a column addition or deletion. It does not rebuild indexes, nor does it need to, because TokuDB indexes don’t fragment.
Summary
TokuDB v5.2 offers great scaling with increasing client thread count, improved point query performance, and Hot Column Rename. In the next couple of weeks, we’ll be posting more performance information, so stay tuned. TokuDB v5.2 is available for download.
Appendix – Configuration Details
Hardware
Centos 5.7; 2x Xeon L5520; 72GB RAM; 8x 300GB 10k SAS in RAID10. TokuDB (running MySQL 5.1.52) is configured to use 36GB cache, and InnoDB (running MySQL 5.5.16) with 52GB cache.
The difference is because InnoDB uses direct I/O whereas TokuDB reserves space for the OS cache.
TokuDB MySQL Config File (TokuDB v5.2 on MySQL 5.1.52)
[mysqld] max_connections=400 table_open_cache=2048
InnoDB MySQL Config File (InnoDB v1.1.8 on MySQL 5.5.16)
[mysqld] innodb_flush_method=O_DIRECT innodb_thread_concurrency=0 innodb_log_file_size=1900M innodb_log_files_in_group=2 innodb_file_per_table=true innodb_log_buffer_size=16M innodb_file_format=barracuda innodb_buffer_pool_size=52G innodb_flush_log_at_trx_commit=1 max_connections=400 table_open_cache=2048
TPCC
All TPCC-like benchmarks were run with the following command line:
tpcc-mysql/tpcc_start localhost tpcc root 5000 \ ${num_threads} 10 3600
Sysbench
All sysbench benchmarks were run with the following command line:
sysbench --test sysbench-0.5/sysbench/tests/db/oltp.lua --oltp_tables_count 16 --oltp-table-size 50000000 --rand-init on --num-threads ${num_threads} --oltp-read-only off --report-interval 10 --rand-type uniform --mysql-socket /tmp/mysql.sock --mysql-table-engine tokudb --max-time 3600 --mysql-user root --mysql-password --mysql-db sbtest --max-requests 0 --percentile 99 run
PlanetMySQL Voting: Vote UP / Vote DOWN