diff --git a/tikv-configuration-file.md b/tikv-configuration-file.md index d2e1621079978..fd69c1bab8c5c 100644 --- a/tikv-configuration-file.md +++ b/tikv-configuration-file.md @@ -825,21 +825,24 @@ Configuration items related to Titan + Default value: `4` + Minimum value: `1` -## rocksdb.defaultcf +## rocksdb.defaultcf | rocksdb.writecf | rocksdb.lockcf -Configuration items related to `rocksdb.defaultcf` +Configuration items related to `rocksdb.defaultcf`, `rocksdb.writecf`, and `rocksdb.lockcf`. ### `block-size` + The default size of a RocksDB block -+ Default value: `"64KB"` ++ Default value for `defaultcf` and `writecf`: `"64KB"` ++ Default value for `lockcf`: `"16KB"` + Minimum value: `"1KB"` + Unit: KB|MB|GB ### `block-cache-size` + The cache size of a RocksDB block -+ Default value: `Total machine memory * 25%` ++ Default value for `defaultcf`: `Total machine memory * 25%` ++ Default value for `writecf`: `Total machine memory * 15%` ++ Default value for `lockcf`: `Total machine memory * 2%` + Minimum value: `0` + Unit: KB|MB|GB @@ -866,12 +869,14 @@ Configuration items related to `rocksdb.defaultcf` ### `optimize-filters-for-hits` + Determines whether to optimize the hit ratio of filters -+ Default value: `true` ++ Default value for `defaultcf`: `true` ++ Default value for `writecf` and `lockcf`: `false` -### `whole_key_filtering` +### `whole-key-filtering` + Determines whether to put the entire key to bloom filter -+ Default value: `true` ++ Default value for `defaultcf`: `true` ++ Default value for `writecf` and `lockcf`: `false` ### `bloom-filter-bits-per-key` @@ -900,7 +905,8 @@ Configuration items related to `rocksdb.defaultcf` ### `write-buffer-size` + Memtable size -+ Default value: `"128MB"` ++ Default value for `defaultcf` and `writecf`: `"128MB"` ++ Default value for `lockcf`: `"32MB"` + Minimum value: `0` + Unit: KB|MB|GB @@ -919,7 +925,8 @@ Configuration items related to `rocksdb.defaultcf` ### `max-bytes-for-level-base` + The maximum number of bytes at base level (L1). Generally, it is set to 4 times the size of a memtable. -+ Default value: `"512MB"` ++ Default value for `defaultcf` and `writecf`: `"512MB"` ++ Default value for `lockcf`: `"128MB"` + Minimum value: `0` + Unit: KB|MB|GB @@ -933,7 +940,8 @@ Configuration items related to `rocksdb.defaultcf` ### `level0-file-num-compaction-trigger` + The maximum number of files at L0 that trigger compaction -+ Default value: `4` ++ Default value for `defaultcf` and `writecf`: `4` ++ Default value for `lockcf`: `1` + Minimum value: `0` ### `level0-slowdown-writes-trigger` @@ -958,8 +966,9 @@ Configuration items related to `rocksdb.defaultcf` ### `compaction-pri` + The priority type of compaction -+ Optional values: `3` (`MinOverlappingRatio`), `0` (`ByCompensatedSize`), `1` (`OldestLargestSeqFirst`), `2` (`OldestSmallestSeqFirst`) -+ Default value: `3` ++ Optional values: `0` (`ByCompensatedSize`), `1` (`OldestLargestSeqFirst`), `2` (`OldestSmallestSeqFirst`), `3` (`MinOverlappingRatio`) ++ Default value for `defaultcf` and `writecf`: `3` ++ Default value for `lockcf`: `1` ### `dynamic-level-bytes` @@ -976,7 +985,7 @@ Configuration items related to `rocksdb.defaultcf` + The default amplification multiple for each layer + Default value: `10` -### `rocksdb.defaultcf.compaction-style` +### `compaction-style` + Compaction method + Optional values: `"level"`, `"universal"` @@ -999,9 +1008,31 @@ Configuration items related to `rocksdb.defaultcf` + Default value: `"256GB"` + Unit: KB|MB|GB +<<<<<<< HEAD ## `rocksdb.defaultcf.titan` +======= +### `enable-compaction-guard` + ++ Enables or disables the compaction guard, which is an optimization to split SST files at TiKV Region boundaries. This optimization can help reduce compaction I/O and allows TiKV to use larger SST file size (thus less SST files overall) and at the time efficiently clean up stale data when migrating Regions. ++ Default value for `defaultcf` and `writecf`: `true` ++ Default value for `lockcf`: `false` + +### `compaction-guard-min-output-file-size` + ++ The minimum SST file size when the compaction guard is enabled. This configuration prevents SST files from being too small when the compaction guard is enabled. ++ Default value: `"8MB"` ++ Unit: KB|MB|GB + +### `compaction-guard-max-output-file-size` + ++ The maximum SST file size when the compaction guard is enabled. The configuration prevents SST files from being too large when the compaction guard is enabled. This configuration overrides `target-file-size-base` for the same column family. ++ Default value: `"128MB"` ++ Unit: KB|MB|GB + +## rocksdb.defaultcf.titan | rocksdb.writecf.titan | rocksdb.lockcf.titan +>>>>>>> b6cde3dd8 (Overhauling TiKV RocksDB configuration file (#5746)) -Configuration items related to `rocksdb.defaultcf.titan` +Configuration items related to `rocksdb.defaultcf.titan`, `rocksdb.writecf.titan`, and `rocksdb.lockcf.titan`. ### `min-blob-size` @@ -1077,6 +1108,7 @@ Configuration items related to `rocksdb.defaultcf.titan` + Determines whether to use the merge operator to write back blob indexes for Titan GC. When `gc-merge-rewrite` is enabled, it reduces the effect of Titan GC on the writes in the foreground. + Default value: `false` +<<<<<<< HEAD ## rocksdb.writecf Configuration items related to `rocksdb.writecf` @@ -1117,6 +1149,8 @@ Configuration items related to `rocksdb.lockcf` + The number of files at L0 required to trigger compaction + Default value: `1` +======= +>>>>>>> b6cde3dd8 (Overhauling TiKV RocksDB configuration file (#5746)) ## `raftdb` Configuration items related to `raftdb`