Installing MyRocks on Linux

Similar to other alternative storage engines, MyRocks is in a separate package.

To install MyRocks in RedHat and CentOS, install it with yum like so:

sudo yum install MariaDB-rocksdb-engine

On Debian and Ubuntu, install it with apt:

sudo apt install mariadb-plugin-rocksdb

The only configuration needed to enable the plugin is the following in the [server], [mysqld], or [mariadb] section of your my.cnf file:

plugin-load-add=ha_rocksdb.so

And then restart MariaDB.

The MariaDB-rocksdb-engine RPM package includes a minimal rocksdb.cnf file installed under /etc/my.cnf.d/ and the DEB package includes one under /etc/mysql/mariadb.conf.d/#. Both have the required plugin-load-add line in a [mariadb] section.

Installing MyRocks on Windows

Connect to the database, using e.g. the command line client. Then execute

install soname 'ha_rocksdb';

After installing MyRocks you will see RocksDB in the list of plugins:

SHOW PLUGINS;
+-------------------------------+----------+--------------------+---------------+---------+
| Name                          | Status   | Type               | Library       | License |
+-------------------------------+----------+--------------------+---------------+---------+
...
| ROCKSDB                       | ACTIVE   | STORAGE ENGINE     | ha_rocksdb.so | GPL     |
| ROCKSDB_CFSTATS               | ACTIVE   | INFORMATION SCHEMA | ha_rocksdb.so | GPL     |
| ROCKSDB_DBSTATS               | ACTIVE   | INFORMATION SCHEMA | ha_rocksdb.so | GPL     |
| ROCKSDB_PERF_CONTEXT          | ACTIVE   | INFORMATION SCHEMA | ha_rocksdb.so | GPL     |
| ROCKSDB_PERF_CONTEXT_GLOBAL   | ACTIVE   | INFORMATION SCHEMA | ha_rocksdb.so | GPL     |
| ROCKSDB_CF_OPTIONS            | ACTIVE   | INFORMATION SCHEMA | ha_rocksdb.so | GPL     |
| ROCKSDB_COMPACTION_STATS      | ACTIVE   | INFORMATION SCHEMA | ha_rocksdb.so | GPL     |
| ROCKSDB_GLOBAL_INFO           | ACTIVE   | INFORMATION SCHEMA | ha_rocksdb.so | GPL     |
| ROCKSDB_DDL                   | ACTIVE   | INFORMATION SCHEMA | ha_rocksdb.so | GPL     |
| ROCKSDB_INDEX_FILE_MAP        | ACTIVE   | INFORMATION SCHEMA | ha_rocksdb.so | GPL     |
| ROCKSDB_LOCKS                 | ACTIVE   | INFORMATION SCHEMA | ha_rocksdb.so | GPL     |
| ROCKSDB_TRX                   | ACTIVE   | INFORMATION SCHEMA | ha_rocksdb.so | GPL     |
...
+-------------------------------+----------+--------------------+---------------+---------+

Compression

Supported compression types are listed in the rocksdb_supported_compression_types variable. For example:

SHOW VARIABLES LIKE 'rocksdb_supported_compression_types';
+-------------------------------------+-------------+
| Variable_name                       | Value       |
+-------------------------------------+-------------+
| rocksdb_supported_compression_types | Snappy,Zlib |
+-------------------------------------+-------------+

System and status variables

All MyRocks system variables and status variables are prefaced with "rocksdb", so you can query them with, for example:

SHOW VARIABLES LIKE 'rocksdb%';
SHOW STATUS LIKE 'rocksdb%';

Comments

Comments loading...