Skip to content

Configuration

Christoph Rupp edited this page Sep 25, 2016 · 2 revisions

upscaledb-mysql supports several configuration options. They can be set by specifying a COMMENT when creating the table, or by editing a configuration file. If you specify the COMMENT then all your configuration options will be written to the configuration file. If you make any changes to this file then you have to restart the mysqld server, otherwise they won't be effective.

CREATE TABLE ... COMMENT

This snippet demonstrates how to specify options in a CREATE TABLE statement:

mysql> CREATE TABLE t1 (
 >     c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
 >     c2 VARCHAR(100),
 >     c3 VARCHAR(100) )
 > ENGINE=UPSCALEDB
 > COMMENT="enable_crc32=true;enable_compression=zlib";

You find a list of configuration options below.

The configuration file

The configuration file is created in your table data directory. Assuming that your table data directory is /var/lib/mysql, your database is SHOP and your table is customer then the configuration file's path is /var/lib/mysql/shop/customer.ups.cnf. You can edit this file with a regular text editor. Here is an example:

# Configuration settings for ./shop/customer.ups
# original table COMMENT:
# 

enable_crc32 = false
disable_recovery = false
enable_server = true
server_port = 54123

Note that not all options can be specified via the configuration file; some will only work when they are passed via CREATE TABLE ... COMMENT (see below).

Supported options

Here is a list of supported options.

  • enable_crc32: Enables CRC32 checks. Values: true, false. Default: false
  • disable_recovery: Disables logging and recovery. Will increase performance, but might corrupt the database when the server is stopped. Values: true, false. Default: false
  • cache_size: The cache size, in bytes. Default: 134217728 (128 mb)
  • file_size_limit: Specifies a file size limit for the table data, in bytes. Disabled by default
  • enable_server: Enables the remote server for this table. The table then can be accessed through upscaledb's native API. Values: true, false. Default: false
  • server_port: Specifies the server port; Values: numerical values, i.e. 54123
  • enable_compression: Enables compression for the serializied row data. Values: zlib, snappy, lzf, none. Default: none. Only for CREATE TABLE ... COMMENT
  • page_size: Sets the Btree page size. Values: 1024 or a multiple of 2048. Default: 16384 (16kb). Only for CREATE TABLE ... COMMENT
Clone this wiki locally