Skip to content

titan-configuration: remove the unrecommended steps of updating TiKV configuration (#21217) #21220

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions storage-engine/titan-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,11 @@ To disable Titan, you can configure the `rocksdb.defaultcf.titan.blob-run-mode`
- 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 fully disable Titan for all existing and future data, you can follow these 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 of the TiKV nodes you wish to disable Titan for. You can update configuration in two methods:

Expand All @@ -139,13 +143,6 @@ To fully disable Titan for all existing and future data, you can follow these st

3. After the compaction is finished, you should wait for the **Blob file count** metrics under **TiKV-Details**/**Titan - kv** to decrease to `0`.

4. Update the configuration of these TiKV nodes to disable Titan.

```toml
[rocksdb.titan]
enabled = false
```

## 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:
Expand Down
4 changes: 4 additions & 0 deletions tikv-configuration-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -1272,6 +1272,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](/storage-engine/titan-configuration.md#disable-titan).

+ Enables or disables Titan
+ Default value: `false`

Expand Down
Loading