精华内容
下载资源
问答
  • TokuDB

    2020-03-09 16:39:34
    TokuDB的底层存储结构为Fractal Tree。Fractal Tree的结构与B+树有所类似,只是在Fractal Tree中除了每一个指针key,都需要指向指向一个child节点,child节点带一个Message Buffer,这个Message Buffer 是一个先进先...

    TokuDB的底层存储结构为Fractal Tree。Fractal Tree的结构与B+树有所类似,只是在Fractal Tree中除了每一个指针key,都需要指向指向一个child节点,child节点带一个Message Buffer,这个Message Buffer 是一个先进先出队列,用来缓存更新操作,具体的数据结构如图。

    这样,每一次插入操作都只需落在某节点的Message Buffer 上,就可以马上返回,并不需要搜索到叶子节点。这些缓存的更新操作会在后台异步合并并更新到对应节点上。

    TokuDB在线添加索引,不影响读写操作,有非常高的写入性能,主要适用于要求写入速度快、访问频率不高的数据或历史数据归档。

    展开全文
  • tokudb

    2015-08-19 16:12:00
    经测试,tokudb 的事务会锁表,不管有没有用到索引,触发器也会锁表,(可能触发器和事务的原理是一样的吧)。innodb 只会锁行。 竟然把这么坑的数据库用到线上来了,这下坑爹了。 转载于:...

     经测试,tokudb 的事务会锁表,不管有没有用到索引,触发器也会锁表,(可能触发器和事务的原理是一样的吧)。innodb 只会锁行。

    竟然把这么坑的数据库用到线上来了,这下坑爹了。

    转载于:https://www.cnblogs.com/olivetree123/p/4742562.html

    展开全文
  • tokudb_TokuDB 安装

    2020-12-23 01:01:46
    安装TokuDB:0、关闭内存大页echo never > /sys/kernel/mm/transparent_hugepage/enabledecho never > /sys/kernel/mm/transparent_hugepage/defrag查看下cat /sys/kernel/mm/transparent_hugepage/...

    安装TokuDB:

    0、关闭内存大页

    echo never > /sys/kernel/mm/transparent_hugepage/enabled

    echo never > /sys/kernel/mm/transparent_hugepage/defrag

    查看下

    cat /sys/kernel/mm/transparent_hugepage/enabled

    always madvise [never]

    cat /sys/kernel/mm/transparent_hugepage/defrag

    always madvise [never]

    tokuDB内存分配需要jemalloc支持,因此使用之前需要安装jemalloc

    yum install -y jemalloc

    rpm -qa |grep jemalloc

    jemalloc-3.6.0-1.el7.x86_64

    rpm -ql jemalloc-3.6.0-1.el7.x86_64

    /usr/bin/jemalloc.sh

    /usr/lib64/libjemalloc.so.1

    /usr/share/doc/jemalloc-3.6.0

    /usr/share/doc/jemalloc-3.6.0/COPYING

    /usr/share/doc/jemalloc-3.6.0/README

    /usr/share/doc/jemalloc-3.6.0/VERSION

    /usr/share/doc/jemalloc-3.6.0/jemalloc.html

    tar xf Percona-Server-5.7.21-21-Linux.x86_64.ssl101.tar.gz

    mv Percona-Server-5.7.21-21-Linux.x86_64.ssl101 tokudb57

    mkdir /home/work/data/mysql3504

    2、初如化

    /home/work/tokudb57/bin/mysqld --defaults-file=/home/work/data/my3504.conf --basedir=/home/work/tokudb57/ --user=work --initialize-insecure

    --initialize-insecure 初如化MySQL是空密码

    --defaults-file= 指定配置文件,最好放在前面,不要放在最后

    3、配置文件my3306.conf

    加入:

    [mysqld_safe]

    thp-setting=never

    malloc-lib=/usr/lib64/libjemalloc.so.1

    3、启动

    chown -R work:work /home/work/data/mysql3306/

    改密码:

    set password=password('123456');

    /home/work/tokudb57/bin/mysqld_safe --defaults-file=/home/work/data/mysql3306/my3306.conf --user=work &

    4、安装TokuDB

    cd /home/work/tokudb57/bin/

    ps_tokudb_admin --enable -u'root' -p -S /home/work/tmp/mysql3306.sock

    /home/work/tokudb57/bin/ps_tokudb_admin --enable --user=root --password='' --socket=/home/work/tmp/mysql3306.sock

    Enter password:

    WARNING: This script is deprecated and will be removed in 8.0. You can use ps-admin script which has more functionality.

    Checking SELinux status...

    INFO: SELinux is disabled.

    Checking if Percona Server is running with jemalloc enabled...

    INFO: Percona Server is running with jemalloc enabled.

    Checking transparent huge pages status on the system...

    INFO: Transparent huge pages are currently disabled on the system.

    Checking if thp-setting=never option is already set in config file...

    INFO: Option thp-setting=never is not set in the config file.

    (needed only if THP is not disabled permanently on the system)

    Checking TokuDB engine plugin status...

    INFO: TokuDB engine plugin is not installed.

    Adding thp-setting=never option into /etc/my.cnf

    INFO: Successfully added thp-setting=never option into /etc/my.cnf

    Installing TokuDB engine...

    INFO: Successfully installed TokuDB engine plugin.

    (root@(none))>show engines;

    Engine

    Support

    Comment

    Transactions

    XA

    Savepoints

    PERFORMANCE_SCHEMA

    YES

    Performance Schema

    NO

    NO

    NO

    MRG_MYISAM

    YES

    Collection of identical MyISAM tables

    NO

    NO

    NO

    CSV

    YES

    CSV storage engine

    NO

    NO

    NO

    BLACKHOLE

    YES

    /dev/null storage engine (anything you write to it disappears)

    NO

    NO

    NO

    MyISAM

    YES

    MyISAM storage engine

    NO

    NO

    NO

    TokuDB

    YES

    Percona TokuDB Storage Engine with Fractal Tree(tm) Technology

    YES

    YES

    YES

    InnoDB

    DEFAULT

    Percona-XtraDB, Supports transactions, row-level locking, and foreign keys

    YES

    YES

    YES

    ARCHIVE

    YES

    Archive storage engine

    NO

    NO

    NO

    MEMORY

    YES

    Hash based, stored in memory, useful for temporary tables

    NO

    NO

    NO

    FEDERATED

    NO

    Federated MySQL storage engine

    NULL

    NULL

    NULL

    10 rows in set (0.00 sec)

    此时InnoDB还是默认引擎 重启下server,并在my3306.conf [mysqld]添加如下配置:

    ------------- tokudb ---------------

    default-storage-engine = TokuDB

    tokudb_directio = on

    tokudb_cache_size = 2G

    tokudb_row_format = tokudb_lzma

    tokudb_commit_sync = 0

    tokudb_fsync_log_period = 1000

    重启后TokuDB 就是默认存储引擎了

    mysql> show engines;

    Engine

    Support

    Comment

    Transactions

    XA

    Savepoints

    PERFORMANCE_SCHEMA

    YES

    Performance Schema

    NO

    NO

    NO

    MRG_MYISAM

    YES

    Collection of identical MyISAM tables

    NO

    NO

    NO

    CSV

    YES

    CSV storage engine

    NO

    NO

    NO

    BLACKHOLE

    YES

    /dev/null storage engine (anything you write to it disappears)

    NO

    NO

    NO

    MyISAM

    YES

    MyISAM storage engine

    NO

    NO

    NO

    TokuDB

    DEFAULT

    Percona TokuDB Storage Engine with Fractal Tree(tm) Technology

    YES

    YES

    YES

    InnoDB

    YES

    Percona-XtraDB, Supports transactions, row-level locking, and foreign keys

    YES

    YES

    YES

    ARCHIVE

    YES

    Archive storage engine

    NO

    NO

    NO

    MEMORY

    YES

    Hash based, stored in memory, useful for temporary tables

    NO

    NO

    NO

    FEDERATED

    NO

    Federated MySQL storage engine

    NULL

    NULL

    NULL

    10 rows in set (0.00 sec)

    错误:

    一、 初始化错误

    [ERROR] InnoDB: Expected to open 4 undo tablespaces but was able to find only 0 undo tablespaces.Set the innodb_undo_tablespaces parameter to the correct value and retry. Suggested value is 0

    解决:

    报错原因:

    在初始化数据库的时候没有指定innodb_undo_tablespaces参数

    解决方法:

    在初始化数据库的时候写上--defaults-file参数,在对应的配置文件中写上对应的innodb_undo_tablespaces参数

    /home/work/tokudb57/bin/mysqld --defaults-file=/home/work/data/my3504.conf --basedir=/home/work/tokudb57/ --user=work --initialize-insecure

    二、tokudb安装:

    root@dqd-stat-mysql-slave01.bj.uc:/home/work/data# ps_tokudb_admin --enable -u'root' -p'123456' -h 127.0.0.1 -P 3504

    WARNING: This script is deprecated and will be removed in 8.0. You can use ps-admin script which has more functionality.

    Checking SELinux status...

    INFO: SELinux is disabled.

    ERROR: Failed to list mysql plugins! Please check username, password and other options for connecting to server...

    用户名和密码都是正常的

    解决:

    /home/work/tokudb57/bin/ps_tokudb_admin --enable --user=root --password='' --socket=/home/work/tmp/mysql3306.sock

    三、 Percona Server 未启动

    /home/work/tokudb57/bin/ps_tokudb_admin --enable --user=root --password='' --socket=/home/work/tmp/mysql3504.sock

    WARNING: This script is deprecated and will be removed in 8.0. You can use ps-admin script which has more functionality.

    Checking SELinux status...

    INFO: SELinux is disabled.

    cat: dqd-stat-mysql-slave01.bj.uc.pid: No such file or directory

    Checking if Percona Server is running with jemalloc enabled...

    grep: /proc//environ: No such file or directory

    which: no mysqld in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/home/itools/python/bin/:/home/work/local/mysql/bin:/root/opt/bin/:/home/work/opbin/xtrabackup/bin:/home/work/nodejs/bin:/root/bin)

    ldd: missing file arguments

    Try `ldd --help' for more information.

    ERROR: Percona Server is not running with jemalloc, please restart mysql service to enable it and then run this script...

    搞了老错误,又来新错误, server是启动的

    解决:

    root@dqd-stat-mysql-slave01.bj.uc:/home/work/data# grep "Percona Server is not running" /home/work/tokudb57/bin/ps_tokudb_admin

    printf "ERROR: Percona Server is not running with jemalloc, please restart mysql service to enable it and then run this script...\n\n";

    printf "ERROR: Percona Server is not running with libHotBackup.so preloaded, please restart mysql service to enable it and then run this script again...\n\n";

    vim /home/work/tokudb57/bin/ps_tokudb_admin

    if [ $ENABLE_TOKUBACKUP = 1 ]; then

    printf "Checking if Percona Server is running with libHotBackup.so preloaded...n"

    LIBHOTBACKUP_STATUS=$(grep -c libHotBackup.so /proc/${PID_NUM}/environ)

    if [ $LIBHOTBACKUP_STATUS = 0 ]; then

    printf "ERROR: Percona Server is not running with libHotBackup.so preloaded, please restart mysql service to enable it and then run this script again...\n\n";

    exit 1

    else

    printf "INFO: Percona Server is running with libHotBackup.so preloaded.\n\n";

    fi

    fi

    打开脚本和pid 有关 ,那就回一个pid

    root@dqd-stat-mysql-slave01.bj.uc:/home/work/data# grep "pid" /home/work/data/mysql3306/my3306.conf

    pid-file = /home/work/tmp/mysql.pid

    展开全文
  • tokudb_TokuDB安装

    2020-12-23 01:00:46
    安装TokuDB1, 创建mysql数据目录 #顺便把临时目录创建好mkdir -p /data/mysql/tmpgroupadd -r mysqluseradd -g mysql -r -s /sbin/nologin -M -d /data/mysql mysqlchown -R mysql:mysql /data/mysql2, 编辑配置文件...

    安装TokuDB

    1, 创建mysql数据目录 #顺便把临时目录创建好

    mkdir -p /data/mysql/tmp

    groupadd -r mysql

    useradd -g mysql -r -s /sbin/nologin -M -d /data/mysql mysql

    chown -R mysql:mysql /data/mysql

    2, 编辑配置文件vim /etc/my.cnf

    [mysqld]

    datadir=/data/mysql

    socket=/var/lib/mysql/mysql.sock

    user=mysql

    # Disabling symbolic-links is recommended to prevent assorted security risks

    symbolic-links=0

    bind-address=xx(替换为内网IP地址)

    #unique_checks=OFF

    #tokudb_commit_sync=OFF

    #tokudb_fsync_log_period=1000

    max_connections=1000

    #default-storage-engine=TokuDB#先把这一条配置注释掉,因为这时候还没安装TokuDB,不注释的话mysql会启动失败,等安装完TokuDB引擎后再打开这行配置

    tmpdir=/data/mysql/tmp/ #修改临时数据存放目录(默认是tmp下面,如果查日志时临时数据比较大的话会差不到,会报警磁盘不够。)

    [mysqld_safe]

    thp-setting=never

    log-error=/var/log/mysqld.log

    pid-file=/var/run/mysqld/mysqld.pid

    3, 安装

    yum install http://www.percona.com/downloads/percona-release/redhat/0.1-3/percona-release-0.1-3.noarch.rpm

    yum install Percona-Server-tokudb-56.x86_64

    4, 启动

    # (如需安装多实例)初始化数据库实例并启动数据库

    # /usr/bin/mysql_install_db --user=mysql --datadir=/data/mysql_toku_3307 --basedir=/usr/ --defaults-file=/data/mysql_toku_3307/my.cnf &

    # /usr/bin/mysqld_safe --defaults-file=/data/mysql_toku_3307/my.cnf --user=mysql &

    # mysql_install_db

    4.1初始化数据库:

    /usr/bin/mysql_install_db --user=mysql --datadir=/data/mysql --basedir=/usr/

    service mysql start

    5, 增加用户

    echo "insert into mysql.user (Host,User,Password,ssl_cipher,x509_issuer,x509_subject) values('%','xx',password('xx'),'','','');grant all privileges on *.* to 'xx'@'%' identified by 'xx';flush privileges; " | mysql -uroot

    6, 安装TokuDB引擎

    ps_tokudb_admin --enable -uxx -pxx -h内网IP地址

    7, 设置TokuDB为默认引擎

    SET global default_storage_engine=TokuDB; (需要重新登录mysql才能看到生效)

    8, 查看是否安装成功 show engines; 查看版本 SELECT @@tokudb_version;

    mysql> show engines;

    +--------------------+---------+--------------------------------------------------------------------------------------------------+--------------+------+------------+

    | Engine | Support | Comment | Transactions | XA | Savepoints |

    +--------------------+---------+--------------------------------------------------------------------------------------------------+--------------+------+------------+

    | PERFORMANCE_SCHEMA | YES | Performance Schema | NO | NO | NO |

    | MRG_MYISAM | YES | Collection of identical MyISAM tables | NO | NO | NO |

    | CSV | YES | CSV storage engine | NO | NO | NO |

    | BLACKHOLE | YES | /dev/null storage engine (anything you write to it disappears) | NO | NO | NO |

    | MEMORY | YES | Hash based, stored in memory, useful for temporary tables | NO | NO | NO |

    | TokuDB | DEFAULT | Percona TokuDB Storage Engine with Fractal Tree(tm) Technology | YES | YES | YES | #看这个

    | MyISAM | YES | MyISAM storage engine | NO | NO | NO |

    | ARCHIVE | YES | Archive storage engine | NO | NO | NO |

    | FEDERATED | NO | Federated MySQL storage engine | NULL | NULL | NULL |

    | InnoDB | YES | Percona-XtraDB, Supports transactions, row-level locking, and foreign keys | YES | YES | YES |

    +--------------------+---------+----------------------------------------------------------------------------+--------------+------+------------+

    10 rows in set (0.00 sec)

    mysql> SELECT @@tokudb_version;

    +------------------+

    | @@tokudb_version |

    +------------------+

    | 5.6.38-83.0 | #看版本

    +------------------+

    1 row in set (0.00 sec)

    9.修改系统文件描述符的数量

    vim /etc/security/limits.conf

    * soft nproc 655300

    * hard nproc 655300

    * soft nofile 655300

    * hard nofile 655300

    10.把/etc/my.cnf 里面的#default-storage-engine=TokuDB 注释打开并重启mysql

    /etc/init.d/mysql restart

    展开全文
  • Percona TokuDB

    2019-09-28 22:44:23
    Percona TokuDB Percona TokuDB Percona TokuDB. 1 1. TokuDB说明... 1 2. TokuDB安装... 1 3. 使用TokuDB. 1 3.1 快速插入和富索引......
  • tokudb_未被遗弃的TokuDB

    2021-01-07 06:32:04
    TokuDB 是一个高性能、支持MVCC的MySQL 和 MariaDB 的存储引擎。TokuDB 的主要特点是数据压缩功能出色,对高写压力的支持,由美国TokuTek公司(http://www.tokutek.com/) 研发,该公司于2015年4月份被Percona收购,...
  • 背景:TokuDB引擎是有Tokutek开发的一个数据库存储引擎,在设计之初便引入了独特的索引算法,在其官网测试的文章中看到TokuDB性能比InnoDB高出很多。MySQL是一个插件式的数据库,在MySQL5.5版本之前MyISAM是MySQL的...
  • tokudb_TokuDB的特点验证

    2020-12-23 01:00:37
    于是在@zolker的提醒下想到了13年开源tokuDB,来解决我们迫在眉睫的容量问题。坊间流传tokuDB有如下几个看着令人垂涎欲滴的特点,正好符合我们实际环境的需求,故针对每个特点进行了针对性测试:1、高压缩比,官方...
  • 摘抄自:MYSQL内核月报...与性能相关的参数及说明:tokudb_cache_size(bytes):缓存大小,读写时候,数据会首先会缓存到这里。默认大小为机器物理内存的一半。to...
  • TokuDB存储引擎TokuDB是一个高度可扩展,零维护的停机MySQL存储引擎,可提供基于索引的查询加速,改进的复制性能,无与伦比的压缩和实时架构修改。该TokuDB存储引擎是一个可扩展的,酸,MVCC兼容的存储引擎,提供...
  • 想要查看TokuDB某个表占了多少磁盘空间,目前还没有太好的方法。如果你使用’show table status’命令,得到的结果只会让你更迷茫:Name: tokuEngine: TokuDBVersion: 10Row_format: tokudb_zlibRows: 28874059Avg_...
  • tokudb_TokuDB优缺点总结

    2020-12-23 00:57:56
    TokuDB优点1 高压缩比,默认使用zlib进行压缩,尤其是对字符串(varchar,text等)类型有非常高的压缩比,比较适合存储日志、原始数据等。一般有5-10倍压缩比。2 支持在线字段增加、删除、扩展、重命名操作。3 支持完整...
  • tokudb:基于Percona Server 5.7并具有更多功能的下一代DBMS TokuDB
  • 背景TokuDB数据库调优,网上搜到几个调优参数,官网推荐将TokuDB的数据目录和MySQL的数据目录分开。所以本文记录一下TokuDB数据库配置修改的过程,就是这个简答的参数修改操作,捣鼓了两个下午,终于找到了问题根源...
  • Mroonga and TokuDB

    2020-12-08 23:10:04
    <p>So an issue, when trying to create table with TokuDB using wrapper mode of Mroonga. The connection is simply lost and nothing shows up in error logs. <p>I do have suspicion why this happens, number...
  • TokuDB安装

    2019-07-03 17:04:00
    安装TokuDB 1, 创建mysql数据目录 #顺便把临时目录创建好 mkdir -p /data/mysql/tmp groupadd -r mysql useradd -g mysql -r -s /sbin/nologin -M -d /data/mysql mysq...
  • 编译安装 tokudb-xtrabackup :感谢知书堂吴老师环境:centos6 x86_64官方文档:https://github.com/xelabs/tokudb-xtrabackup/wiki/How-to-build先安装高版本的libev依赖包:wgethttps://fossies.org/linux/misc/...
  • Percona的「Getting to know TokuDB for MySQL」這篇文章雖然標題是想要宣傳TokuDB,但其實把MySQL的歷史也講了一遍…前面講到 InnoDB 的崛起時,就有提到就算你不使用 InnoDB 提供的 transaction,他的 crash-safe ...
  • 作者介绍:吴双桥 腾讯云数据库工程师一 、背景介绍近年来,TokuDB作为MySQL的大数据(Big Data)存储引擎受到人们的普遍关注。其架构的核心基于一种新的叫做分形树(Fractal Trees)的索引数据结构,该结构是缓存无关的...
  • 于是想到了 13 年开源 tokuDB 存储引擎,来解决我们迫在眉睫的容量问题。TokuDB 是一个高性能、支持事务处理的 MySQL 和 MariaDB 的存储引擎。TokuDB 的主要特点是高压缩比,高 INSERT 性能,支持大多数在线修改索引...
  • TokuDB引擎说明:TokuDB 的主要特点是高压缩比,高 INSERT 性能,支持大多数在线修改索引、添加字段,非常适合日志型应用场景(只有insert,select,少update);一、安装步骤1. 解压tokudb的包tar -zxf Percona-Server...
  • TokuDB 安装

    2018-07-11 23:50:54
    安装TokuDB:0、关闭内存大页echo never > /sys/kernel/mm/transparent_hugepage/enabledecho never > /sys/kernel/mm/transparent_hugepage/defrag 查看下 cat /sys/kernel/mm/transparent_hugepage...
  • percona 5.7 + tokudbPercona + TokuDB 部署# 参考资料https://www.kancloud.cn/devops-centos/centos-linux-devops/3956641、安装依赖包yum -y install jemalloc-devel.x86_64 make gcc-c++ cmake bison-devel ...

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 807
精华内容 322
热门标签
关键字:

tokudb