Rate This Document
Findability
Accuracy
Completeness
Readability

Database Controlling Parameters

Table 1 tables the optional parameters that control a database.

Table 1 Internal database control parameters

Parameter

Description

--column_family=<string>

Specifies the column family in a data table in a columnar database.

default: default column family (default table)

--column_family=default

--ttl with 'put','get','scan','dump','query','batchput'

Indicates whether to enable the time to live (TTL) mechanism to automatically delete data after a certain period of time, for the purpose of preventing data expiration or storage space wasting.

--try_load_options

Reads the database configuration file and opens the database.

--disable_consistency_checks

Disables consistency check.

The default value is true.

--ignore_unknown_options

Indicates whether to ignore unknown options when the option file is loaded.

--bloom_bits=<int,e.g.:14>

Specifies the number of bits in a Bloom filter corresponding to each key. If a Bloom filter is enabled in RocksDB, set this parameter to, for example, 14 (the default value is -1). If the Bloom filter is disabled, set this parameter to 0.

--fix_prefix_len=<int,e.g.:14>

Sets the value of the fixed-length prefix in a prefix Bloom filter. The value is an integer.

--compression_type=<no|snappy|zlib|bzip2|lz4|lz4hc|xpress|zstd>

Specifies the compression type. The default compression type of RocksDB is snappy. Compression types for different levels can be different.

--compression_max_dict_bytes=<int,e.g.:16384>

Configures the maximum size of the dictionary for starting the compression library.

--block_size=<block_size_in_bytes>

Sets the block size.

The block size is usually 4 KB. A smaller block size reduces the decompression overhead and means faster random read. However, if the block size is too small, compression will fail. You are advised to set the block size to 1 KB.

--auto_compaction=<true|false>

Indicates whether to enable the auto compaction function of RocksDB.

--db_write_buffer_size=<int,e.g.:16777216>

Sets the maximum size of memtables for all column families.

--write_buffer_size=<int,e.g.:4194304>

Set the memtable size of each column family.

The default value is 64MB.

--file_size=<int,e.g.:2097152>

Sets the size of the SST files at a level, that is, sets the value of options.target_file_size_base. RocksDB uses SST files of different levels (level 0 to level N) to manage data. Total size of SST files at a level = Single SST file size x Number of SST files at a level.