diff --git a/storage-engine/titan-configuration.md b/storage-engine/titan-configuration.md index 4dc43445eceae..ace20b806ce17 100644 --- a/storage-engine/titan-configuration.md +++ b/storage-engine/titan-configuration.md @@ -112,13 +112,21 @@ To adjust Titan-related parameters using TiUP, refer to [Modify the configuratio ## Disable Titan (experimental) +> **Warning:** +> +> Disabling Titan is an experimental feature. It is **NOT** recommended to use it if not necessary. + To disable Titan, you can configure the `rocksdb.defaultcf.titan.blob-run-mode` option. The optional values for `blob-run-mode` are as follows: - When the option is set to `normal`, Titan performs read and write operations normally. - When the option is set to `read-only`, all newly written values are written into RocksDB, regardless of the value size. - When the option is set to `fallback`, all newly written values are written into RocksDB, regardless of the value size. Also, all compacted values stored in the Titan blob file are automatically moved back to RocksDB. -To disable Titan, perform the following steps: +To disable Titan for all existing and future data, you can take the following steps. Note that you can skip Step 2 because it greatly affects online traffic performance. In fact even without Step 2, the data compaction consumes extra I/O and CPU resources when it moves data from Titan to RocksDB, and performance will degrade (sometimes as much as 50%) when TiKV I/O or CPU resources are limited. + +> **Warning:** +> +> When disabling Titan for TiDB versions earlier than v8.5.0, it is not recommended to modify the TiKV configuration item [`rocksdb.titan.enabled`](/tikv-configuration-file.md#enabled) to `false`, as this might cause TiKV to crash. Following Step 1 is sufficient to disable Titan. 1. Update the configuration file of the TiKV nodes you wish to disable Titan for and restart TiKV: @@ -137,17 +145,6 @@ To disable Titan, perform the following steps: 3. After the compaction is finished, wait until the **Blob file count** metrics under **TiKV-Details/Titan - kv** decrease to `0`. -4. Update the configuration of these TiKV nodes to disable Titan. - - ```toml - [rocksdb.titan] - enabled = false - ``` - -> **Warning:** -> -> Disabling Titan is an experimental feature. It is **NOT** recommended to use it if not necessary. - ## Level Merge (experimental) In TiKV 4.0, [Level Merge](/storage-engine/titan-overview.md#level-merge), a new algorithm, is introduced to improve the performance of range query and to reduce the impact of Titan GC on the foreground write operations. You can enable Level Merge using the following option: diff --git a/tikv-configuration-file.md b/tikv-configuration-file.md index 4d0caaa176cfa..201ba14c630bc 100644 --- a/tikv-configuration-file.md +++ b/tikv-configuration-file.md @@ -1052,6 +1052,10 @@ Configuration items related to Titan. ### `enabled` +> **Warning** +> +> When disabling Titan for TiDB versions earlier than v8.5.0, it is not recommended to modify this configuration item to `false`, as this might cause TiKV to crash. To disable Titan, refer to the steps in [Disable Titan (experimental)](/storage-engine/titan-configuration.md#disable-titan-experimental). + + Enables or disables Titan + Default value: `false`