zoukankan      html  css  js  c++  java
  • zabbix使用tokudb引擎替换innodb引擎

    zabbix数据量大,数据量增长很快,使用tokudb可以更好的压缩
    使用tokudb,用percona 或mariadb数据库
    1.查看数据库版本
    (1)登录数据库的时候可以看到
    (2)status
    (3)查看安装的软件包
    2.TokuDB has been included with MariaDB since MariaDB 5.5.34 and MariaDB 10.0.6 and does not require separate installation. tokudb已经集成到了mariadb,从5.5.34和10.0.6版本开始
    3.tokudb需要linux内核支持,否则会导致内核泄漏
    Transparent Hugepages启用了,需要disable,如果enable,报错信息如下:
    never > /sys/kernel/mm/transparent_hugepage/enabled never > /sys/kernel/mm/transparent_hugepage/defrag
    MariaDB's default  files come with a section for TokuDB. To enable TokuDB just remove the '#' comment markers from the options in the TokuDB section.
    默认的my.cnf有tokudb的配置,只需要取消注释
    也可以单独建一个tokudb.conf配置文件,通过my.cnf导入
    5.需要用到外键的表继续保留InnoDB引擎,其他表都可以转成TokuDB,history_str、trends、trends_uint、history、history_uint等几个大表是一定要转成TokuDB的,events由于需要用到外键,所以继续保留InnoDB引擎。
    6.修改表引擎
    mysql>alter table history engine=TokuDB;
    ......
  • 相关阅读:
    ansible 批量在远程主机上执行命令
    SQLAlchemy
    operator, itertools
    mongodb基础语法
    django model Meta选项
    __getattr__,settr
    django的contenttype表
    time和datetime和tzinfo
    全局钩子的改名
    dom中文字居中
  • 原文地址:https://www.cnblogs.com/mikeluwen/p/5849696.html
Copyright © 2011-2022 走看看