TOKUDB storage Engine, you can think of it as an upgraded version of the archive storage engine, which has dense compression and supports transactions.
Compression ratio:
Engine |
Compression |
Table size [MB] |
InnoDB |
None |
2272 |
InnoDB |
Key_block_size=8 |
1144 |
InnoDB |
Key_block_size=4 |
584 |
MyISAM |
None |
1810 |
MyISAM |
Compressed with Myisampack |
809 |
Archive |
Default |
211 |
Tokudb |
ZLIB |
284 |
Tokudb |
LZMA |
208 |
Characteristics:
Feature |
Archive |
MyISAM (compressed) |
InnoDB |
Tokudb |
Dml |
Only inserts |
No |
Yes |
Yes |
Transactions |
No |
No |
Yes |
Yes |
ACID |
No |
No |
Yes |
Yes |
Indexes |
No |
Yes |
Yes |
Yes |
Online DDL |
No |
No |
Yes * |
Yes * * |
MARIADB10, the TOKUDB storage engine has been embedded, the installation is very simple, as follows:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/37/A0/wKiom1OtPlfCi288AAKnwHfPFQI258.jpg "title=" 4.jpg " alt= "Wkiom1otplfci288aaknwhfpfqi258.jpg"/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/37/95/wKiom1OtM0XAGza2AAHWxjkDGtQ067.jpg "style=" float: none; "title=" 1.jpg "alt=" Wkiom1otm0xagza2aahwxjkdgtq067.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/37/94/wKioL1OtMxeBeePWAAHBl7c2-ic775.jpg "style=" float: none; "title=" 2.jpg "alt=" Wkiol1otmxebeepwaahbl7c2-ic775.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/37/95/wKiom1OtM0WD21kHAALMk2W8OOQ524.jpg "style=" float: none; "title=" 3.jpg "alt=" Wkiom1otm0wd21khaalmk2w8ooq524.jpg "/>
Tuning:
Configuration:what ' s really important
As noted by Vadim long ago, "Tuning of tokudb are much easier than InnoDB, there ' re only a few parameters to the change, and Actually out-of-box things running pretty well ":
tokudb tuning is much simpler than InnoDB, just a few parameter changes , or you can use the default parameters directly, and also run well.
mariadb [(none)]> show variables like '%tokudb% '; +-------------------------------- -+-------------+| variable_name | value |+------------ ---------------------+-------------+| tokudb_alter_print_error | off | | tokudb_analyze_time | 5 | | tokudb_block_size | 4194304 | | tokudb_cache_size | 120926208 | | tokudb_checkpoint_lock | off | | tokudb_checkpoint_on_flush_logs | off | | tokudb_checkpointing_period | 60 | | tokudb_cleaner_iterations | 5 | | tokudb_cleaner_period | 1 | | tokudb_commit_sync | on | | tokudb_create_index_online | on | | tokudb_data_dir | | | tokudb_debug | 0 | | tokudb_directio | off | | tokudb_disable_hot_alter | OFF | | tokudb_disable_prefetching | OFF | | tokudb_disable_slow_alter | off | | tokudb_empty_scan | rl | | tokudb_fs_reserve_percent | 5 | | tokudb_fsync_log_period | 0 | | tokudb_hide_default_row_format | ON | | tokudb_init_flags | 11403457 | | tokudb_killed_time | 4000 | | tokudb_last_lock_timeout | | | tokudb_load_save_space | ON | | tokudb_loader_memory_size | 100000000 | | tokudb_lock_timeout | 4000 | | tokudb_lock_timeout_debug | 1 | | tokudb_log_dir | | | tokudb_max_lock_memory | 15115776 | | tokudb_pk_insert_mode | 1 | | tokudb_prelock_empty | on | | tokudb_read_block_size | 65536 | | tokudb_read_buf_size | 131072 | | tokudb_read_status_frequency | 10000 | | tokudb_row_format | tokudb_zlib | | tokudb_tmp_dir | | | tokudb_version | 7.1.6 | | tokudb_write_status_frequency | 1000 |+---------------------------------+-------------+39 rows in set (0.01 sec)
The most important of the tokudb_ variables is arguably tokudb_cache_size. The test server where I ran those tests (test01) has a little less than 1G of memory and as can see above tokudb is " Reserving "half (50%) of them to itself. That's the default behavior but, for course, you can change it. And you must does it if you is also going to the InnoDB tables on your server–you should not overcommit memory between I Nnodb and TOKUDB engines. Shlomi Noach wrote a good post explaining the main tokudb-specific variables and what they do. It ' s definitely a worth read.
(The most important parameter is Tokudb_cache_size, which is similar to Innodb_buffer_pool_size, if your server runs two engines InnoDB and TOKUDB, then you have to be careful not to run out of memory.) )
Reference: http://www.mysqlperformanceblog.com/2014/06/26/percona-server-with-tokudb-beta-installation-configuration/
Note: Therefore, the engine is relatively new, there is no production experience, you can try to change some log log table to the TOKUDB engine, so that the performance and disk space utilization has a significant increase. In addition, the Backup utility for the engine is charged, so a cold backup can be taken when backing up.
This article is from the "Spring Yang Technical column" blog, please be sure to keep this source http://hcymysql.blog.51cto.com/5223301/1431698