添加percona源
安装libjemalloc
sudo apt install libjemalloc-dev
添加libjemalloc到配置
在/etc/mysql/percona-server.conf.d/mysqld\_safe.cnf文件中添加
[mysqld_safe]
malloc-lib= /usr/include/jemalloc
关闭Transparent huge pages
查看Transparent huge pages状态
cat /sys/kernel/mm/transparent_hugepage/enabled
关闭Transparent huge pages需要以root身份运行
echo never > /sys/kernel/mm/transparent_hugepage/enabled
echo never > /sys/kernel/mm/transparent_hugepage/defrag
安装包
apt-get install percona-server-tokudb-5.7
激活Tokudb引擎
sudo ps_tokudb_admin --enable -uroot -pPassw0rd
查看状态
mysql> SHOW ENGINES;
mysql> SELECT @@tokudb_version;
mariadb
本条目发布于[2017年6月3日](https://c4ys.com/archives/883 "22:27")。属于[Database](https://c4ys.com/archives/category/database)分类,被贴了 [Tokudb](https://c4ys.com/archives/tag/tokudb) 标签。