MariaDB10 TokuDB storage engine

Source: Internet
Author: User
The TokuDB storage engine, which can be seen as an upgraded version of the ARCHIVE storage engine, has intensive compression and supports transactions. Compression ratio: EngineCompressionTablesize [MB] bytes

The TokuDB storage engine, which can be seen as an upgraded version of the ARCHIVE storage engine, has intensive 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 compres

The TokuDB storage engine, which can be seen as an upgraded version of the ARCHIVE storage engine, has intensive 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


Features:

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 has been embedded with the TokuDB storage engine. The installation is extremely simple, as shown below:

650) this. width = 650; "src =" http://www.68idc.cn/help/uploads/allimg/151214/1006201301-0.jpg "title =" 4.jpg" alt = "wKiom1OtPlfCi288AAKnwHfPFQI258.jpg"/>

650) this. width = 650; "src =" http://www.68idc.cn/help/uploads/allimg/151214/1006206328-1.jpg "style =" float: none; "title =" 1.jpg" alt = "wKiom1OtM0XAGza2AAHWxjkDGtQ067.jpg"/>

650) this. width = 650; "src =" http://www.68idc.cn/help/uploads/allimg/151214/100620B44-2.jpg "style =" float: none; "title =" 2.jpg" alt = "wKioL1OtMxeBeePWAAHBl7c2-ic775.jpg"/>

650) this. width = 650; "src =" http://www.68idc.cn/help/uploads/allimg/151214/1006205953-3.jpg "style =" float: none; "title =" 3.jpg" alt = "wKiom1OtM0WD21kHAALMk2W8OOQ524.jpg"/>


Optimization:

Configuration: what's really important

As noted by Vadim long ago, "Tuning of TokuDB is much easier than InnoDB, there're only a few parameters to change, and actually out-of-box things running pretty well":
The optimization of TokuDB is much easier than that of InnoDB, but there are some parameter changes, or you can directly use the default parameter, it also runs 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) have a little less than 1G of memory and as you can see abve TokuDB is "reserving" half (50%) of them to itself. that's the default behavior but, of course, you can change it. and you must do it if you are also going to have InnoDB tables on your server-you shocould not overcommit memory between InnoDB 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, be careful. Do not use up the memory .)


Reference: http://www.mysqlperformanceblog.com/2014/06/26/percona-server-with-tokudb-beta-installation-configuration/


Note: The engine is relatively new and has no production experience. You can try to change some LOG tables to the TokuDB engine, which greatly improves the performance and disk space usage. In addition, the backup tool of this engine is charged, so cold backup can be used during Backup.

650) this. width = 650; "src =" http://www.68idc.cn/help/uploads/allimg/151214/1006202X2-4.jpg "title =" 3.jpg" alt = "wKioL1Ow1F6ihz-EAAHrNLCc_ao324.jpg"/>


Reference: http://www.mysqlperformanceblog.com/2014/06/23/getting-to-know-tokudb-for-mysql/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.