Zabbix Database Replacement TOKUDB engine

Source: Internet
Author: User
Tags percona

Zabbix Replace the TOKUDB process (I'm using Percona db):
wget http://www.percona.com/redir/downloads/Percona-Server-5.6/LATEST/binary/redhat/6/x86_64/ percona-server-tokudb-56-5.6.19-rel67.0.el6.x86_64.rpm Yum Install JEMALLOCRPM-IVH percona-server-tokudb-56-5.6.19-rel67.0.el6.x86_64.rpm

Perform:

Mysql-e "INSTALL PLUGIN tokudb SONAME ' ha_tokudb.so ';" Mysql-e "INSTALL PLUGIN tokudb_file_map SONAME ' ha_tokudb.so ';" Mysql-e "INSTALL PLUGIN tokudb_fractal_tree_info SONAME ' ha_tokudb.so ';" Mysql-e "INSTALL PLUGIN tokudb_fractal_tree_block_map SONAME ' ha_tokudb.so ';" Mysql-e "INSTALL PLUGIN tokudb_trx SONAME ' ha_tokudb.so ';" Mysql-e "INSTALL PLUGIN tokudb_locks SONAME ' ha_tokudb.so ';" Mysql-e "INSTALL PLUGIN tokudb_lock_waits SONAME ' ha_tokudb.so ';"

To modify the My.cnf file:
Plugin-dir =/usr/lib64/mysql/pluginplugin-load=ha_tokudb.sotokudb_row_format = Tokudb_fasttokudb_cache_size = 8gtokudb_commit_sync = 0tokudb_directio = 1tokudb_read_block_size = 128ktokudb_read_buf_size = 128K

Restart MySQL Service
/etc/init.d/mysql restart

To modify the table engine:
Mysql>use zabbixmysql>alter table History_uint engine=tokudb;mysql>alter table History engine=tokudb;

When you are finished, look at the file:

409M _zabbix_sql_8a46_c_key_history_uint_1_f_1_19_b_0.tokudb190m _zabbix_sql_8a46_c_key_history_1_26c_1_19_b_0. Tokudb

The compression ratio is still strong.

Prevent memory leaks, execute:
echo never >/sys/kernel/mm/redhat_transparent_hugepage/defragecho never >/sys/kernel/mm/redhat_transparent_ Hugepage/enabledecho never >/sys/kernel/mm/transparent_hugepage/enabledecho never >/sys/kernel/mm/ Transparent_hugepage/defrag


Finally, how to use Tokudb?

If you want to store BLOBs, do not use tokudb because it restricts records to be too large;
If you have too many records, use TOKUDB;
If you pay attention to the performance of update, do not use TOKUDB, it does not innodb fast;
If you want to store old records, use TOKUDB;
If you want to reduce the amount of storage space used by the data, use TOKUDB;

View :http://rdc.taobao.com/blog/cs/?p=1176

Reference: Http://itindex.net/detail/50162-zabbix-%E6%95%B0%E6%8D%AE%E5%BA%93-tokudb





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.