This repository was archived by the owner on Mar 1, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 714
New mysqld server variables
Herman Lee edited this page Nov 26, 2015
·
22 revisions
A large number of the parameters which can be used to tune RocksDB have been exported out as server variables through the MyRocks storage engine. In addition, some parameters can be enabled to help speed up loading and creating new MyRocks tables for testing.
The following is a list of parameters which MyRocks currently supports.
rocksdb : Enables or disables the MyRocks plugin.
- rocksdb-WAL-size-limit-MB : Sets the limit on the total size of the archived write ahead log (WAL) files.
- rocksdb-WAL-ttl-seconds : Sets a limit on the max time an archived WAL file is retained.
- rocksdb-advise-random-on-open : Sets a hint of random access to the filesystem when a data file is opened.
- rocksdb-allow-mmap-reads : Allow the OS to mmap a data file for reads.
- rocksdb-allow-mmap-writes : Allow the OS to mmap a data file for writes.
- rocksdb-allow-os-buffer : Allow the OS to perform buffered reads.
- rocksdb-background-sync : Enables MyRocks to issue fsyncs for the WAL files every second. If WAL files are sync'ed on every commits, then enabling this option is redundant.
- rocksdb-block-cache-size : Size of the LRU block cache in RocksDB. This memory is reserved for the block cache, which is in addition to any filesystem caching that may occur.
- rocksdb-block-restart-interval : Number of keys for each set of delta encoded data.
- rocksdb-block-size : Size of the data block for reading sst files.
- **rocksdb-block-size-deviation
- rocksdb-bulk-load : When set, MyRocks will ignore checking keys for uniqueness or acquiring locks during transactions. This option should only be used when the application is certain there are no row conflicts, such as when setting up a new MyRocks instance from an existing MySQL dump.
- rocksdb-bulk-load-size : Sets the number of keys to accumulate before committing them to the storage engine during bulk loading.
- rocksdb-bytes-per-sync : Enables the OS to sync out file writes as data files are created.
- rocksdb-cache-index-and-filter-blocks : Requests RocksDB to use the block cache for caching the index and bloomfilter data blocks from each data file. If this is not yet, RocksDB will allocate additional memory to maintain these data blocks.
- rocksdb-cf-options : Enables setting options on the column families.
- rocksdb-cfstats : Enables the Information Schema ROCKSDB_CFSTATS for showing column family statistics.
- rocksdb-checksums-pct : Sets the percentage of rows to calculate and set MyRocks checksums.
- rocksdb-collect-sst-properties : Enables collecting statistics of each data file for improving optimizer behavior.
- rocksdb-compact-cf : Triggers a manual compaction within RocksDB of a specific column family.
- rocksdb-compaction-sequential-deletes : Enables triggering of compaction when the number of delete markers in a data file exceeds a certain threshold. Depending on workload patterns, RocksDB can potentially maintain large numbers of delete markers and increase latency of all queries.
- rocksdb-compaction-sequential-deletes-file-size : Threshold to trigger compaction if the number of sequential keys that are all delete markers exceed this value. While this compaction helps reduce request latency by removing delete markers, it can increase write rates of RocksDB.
- rocksdb-compaction-sequential-deletes-window : Threshold to trigger compaction if, within a sliding window of keys, there exists this parameter's number of delete marker.
- rocksdb-create-if-missing : Allows creating the RocksDB database if it does not exist.
- rocksdb-create-missing-column-families : Allows creating new column families if they did not exist.
- rocksdb-datadir : Directory to store the data files in.
- rocksdb-db-write-buffer-size : Size of the memtable used to store writes within RocksDB. This is the size per column family. Once this size is reached, a flush of the memtable to persistent media occurs.
- rocksdb-dbstats : Enables the Information Schema plugin ROCKSDB_DBSTATS for showing database statistics.
- rocksdb-ddl : Enables the Information Schema plugin ROCKSDB_DDL for showing MyRocks' data dictionary structure.
- rocksdb-debug-optimizer-n-rows : Test only to simulate number of rows returned via table range size approximation.
- rocksdb-debug-optimizer-no-zero-cardinality : Test only to prevent MyRocks from calculating cardinality
- rocksdb-default-cf-options : Describes the default set of column family options for RocksDB.
- rocksdb-delete-obsolete-files-period-micros : The periodicity of when obsolete files get deleted, but does not affect files removed through compaction.
- rocksdb-disableDataSync : Set to disable sync'ing of data for RocksDB's metadata structures, such as the manifest and data files. Good for bulk loading.
- rocksdb-enable-thread-tracking : Set to allow RocksDB to track the status of threads accessing the database.
- rocksdb-error-if-exists : If set, reports an error if an existing databae already exists.
- rocksdb-force-flush-memtable-now : Triggers MyRocks to flush the memtables out to the data files.
- rocksdb-global-info : Enables the Information Schema ROCKSDB_GLOBAL_INFO plugin for reporting data dictionary information.
- rocksdb-hash-index-allow-collision : Enables RocksDB to allow hashes to collide (uses less memory). Otherwise, the full prefix is stored to prevent hash collisions.
- rocksdb-index-file-map : Enables the Information Schema ROCKSDB_INDEX_FILE_MAP plugin for showing the list of sst data files in RocksDB.
- rocksdb-index-type : Sets the type of indexing (binary search, hash search) used in RocksDB.
- rocksdb-info-log-level : Sets the log level for printing of log messages.
- rocksdb-is-fd-close-on-exec : Disables the child process from inheriting open file handles.
- rocksdb-keep-log-file-num : Sets the maximum number of info LOG files to keep around.
- rocksdb-lock-wait-timeout : Sets the number of seconds MyRocks will wait to acquire a row lock before aborting the request.
- rocksdb-log-file-time-to-roll : Sets the number of seconds a info LOG file captures before rolling to a new LOG file.
- rocksdb-manifest-preallocation-size : Sets the number of bytes to preallocate for the MANIFEST file in RocksDB and reduce possible random I/O on XFS. MANIFEST files are used to store information about column families, levels, active files, etc.
- rocksdb-max-background-compactions : Sets the number of concurrent background compaction threads.
- rocksdb-max-background-flushes : Sets the number of concurrent background memtable flush threads.
- rocksdb-max-log-file-size : Sets the maximum size on the info LOG files.
- rocksdb-max-manifest-file-size : Sets the maximum size of the MANIFEST data file before rolling it over.
- rocksdb-max-open-files : Sets a limit on the maximum number of file handles opened by RocksDB.
- rocksdb-max-row-locks : Sets a limit on the maximum number of row locks held by a transaction before failing it.
- rocksdb-max-total-wal-size : Sets a limit on the maximum size of WAL files kept around. Once this limit is hit, RocksDB will force the flushing of memtables to reduce the size of WAL files.
- rocksdb-no-block-cache : Disables using the block cache for a column family.
- rocksdb-override-cf-options : Option string to enable specific options override for each column family.
- rocksdb-paranoid-checks : Forces RocksDB to re-read a data file that was just created to verify correctness.
- rocksdb-pause-background-work : Test only to start and stop all background compactions within RocksDB.
- rocksdb-perf-context : Enables the Information Schema ROCKSDB_PERF_CONTEXT plugin for capturing MySQL client's performance/latency data from RocksDB.
- rocksdb-perf-context-global : Enables the Information Schema ROCKSDB_PERF_CONTEXT_GLOBAL for capturing background compaction performance/latency data from RocksDB.
- rocksdb-perf-context-level : Sets the level of information to capture via the perf context plugins.
- rocksdb-rate-limiter-bytes-per-sec : Controls the rate at which RocksDB is allowed to write to media via memtable flushes and compaction.
- rocksdb-records-in-range : Test only to override the value returned by records_in_range.
- rocksdb-seconds-between-stat-computes : Sets the number of seconds between recomputation of table statistics for the optimizer.
- rocksdb-signal-drop-index-thread : Test only to signal the MyRocks drop index thread.
- rocksdb-skip-fill-cache : Requests MyRocks to skip caching data on read requests.
- rocksdb-snapshot-dir : Triggers RocksDB to create a snapshot of the database at the given directory path. Management of this directory path is left to the application. MyRocks does not maintain this directory path, which could lead to old data files still residing in the filesystem if it is not removed.
- rocksdb-stats-dump-period-sec : Sets the number of seconds to perform a RocksDB stats dump to the info LOG files.
- rocksdb-store-checksums : Enables MyRocks to store checksums in the row data.
- rocksdb-strict-collation-check : Enables MyRocks to check and verify table indexes have the proper collation settings.
- rocksdb-strict-collation-exceptions : Table names that match this list of regex patterns can skip the collation check settings.
- rocksdb-table-cache-numshardbits : Sets the number of table caches within RocksDB.
- rocksdb-use-adaptive-mutex : Enables adaptive mutexes in RocksDB which spins in user space before resorting to the kernel.
- rocksdb-use-fsync : Requires RocksDB to use fsync instead of fdatasync when requesting a sync of a data file.
- rocksdb-validate-tables : Requires MyRocks to verify all of MySQL's .frm files match tables stored in RocksDB.
- rocksdb-verify-checksums : Enables MyRocks to verify checksums on rows that contain checksums.
- rocksdb-wal-bytes-per-sync : Controls the rate at which RocksDB writes out WAL file data.
- rocksdb-wal-dir : Sets the directory to store RocksDB WAL files.
- rocksdb-wal-recovery-mode : Sets RocksDB's level of tolerance when recovering the WAL files after a system crash.
- rocksdb-whole-key-filtering : Enables the bloomfilter to use the whole key for filtering instead of just the prefix. In order for this to be efficient, lookups should use the whole key for matching.
- rocksdb-write-disable-wal : Disables logging data to the WAL files. Useful for bulk loading.
- rocksdb-write-ignore-missing-column-families : If true, then writes to column families that do not exist is ignored by RocksDB.
- rocksdb-write-sync : Enables RocksDB to issue sync requests when flushing data out.
Documentation license here.
Installation
MyRocks
- Overview
- Transaction
- Backup
- Performance Tuning
- Monitoring
- Migration
- Internals
- Vector Database
DocStore
- Document column type
- Document Path: a new way to query JSON data
- Built-in Functions for JSON documents
MySQL/InnoDB Enhancements