Skip to content
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
4 changes: 2 additions & 2 deletions garbage-collection-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ show config where type = 'tikv' and name like '%enable-compaction-filter%';
> When using the Compaction Filter mechanism, GC progress might be delayed, which can affect TiKV scan performance. If your workload contains a large number of coprocessor requests and you observe in the [**TiKV-Details > Coprocessor Detail**](/grafana-tikv-dashboard.md#coprocessor-detail) panel that the `next()` or `prev()` call count in **Total Ops Details** significantly exceeds three times the `processed_keys` calls, you can take the following actions:
>
> - For TiDB versions before v7.1.3, it is recommended to disable Compaction Filter to speed up GC.
> - For TiDB versions from v7.1.3 to v7.5.6, TiDB automatically triggers compaction based on the number of redundant versions in each Region [`region-compact-min-redundant-rows`](/tikv-configuration-file.md#region-compact-min-redundant-rows-new-in-v710) and the percentage of redundant versions [`region-compact-redundant-rows-percent`](/tikv-configuration-file.md#region-compact-redundant-rows-percent-new-in-v710) to improve Compaction Filter GC performance. In this case, adjust these configuration items instead of disabling Compaction Filter.
> - Starting from v7.5.7, [`region-compact-min-redundant-rows`](/tikv-configuration-file.md#region-compact-min-redundant-rows-new-in-v710) and [`region-compact-redundant-rows-percent`](/tikv-configuration-file.md#region-compact-redundant-rows-percent-new-in-v710) are deprecated. TiDB now automatically triggers compaction based on [`gc.auto-compaction.redundant-rows-threshold`](/tikv-configuration-file.md#redundant-rows-threshold-new-in-v757-and-v900) and [`gc.auto-compaction.redundant-rows-percent-threshold`](/tikv-configuration-file.md#redundant-rows-percent-threshold-new-in-v757-and-v900). In this case, adjust these configuration items instead of disabling Compaction Filter.
> - For TiDB versions from v7.1.3 to v7.5.6 and v7.6.0 to v8.5.3, TiDB automatically triggers compaction based on the number of redundant versions in each Region [`region-compact-min-redundant-rows`](/tikv-configuration-file.md#region-compact-min-redundant-rows-new-in-v710) and the percentage of redundant versions [`region-compact-redundant-rows-percent`](/tikv-configuration-file.md#region-compact-redundant-rows-percent-new-in-v710) to improve Compaction Filter GC performance. In this case, adjust these configuration items instead of disabling Compaction Filter.
> - Starting from v7.5.7, v8.5.4, and v9.0.0, [`region-compact-min-redundant-rows`](/tikv-configuration-file.md#region-compact-min-redundant-rows-new-in-v710) and [`region-compact-redundant-rows-percent`](/tikv-configuration-file.md#region-compact-redundant-rows-percent-new-in-v710) are deprecated. TiDB now automatically triggers compaction based on [`gc.auto-compaction.redundant-rows-threshold`](/tikv-configuration-file.md#redundant-rows-threshold-new-in-v757-v854-and-v900) and [`gc.auto-compaction.redundant-rows-percent-threshold`](/tikv-configuration-file.md#redundant-rows-percent-threshold-new-in-v757-v854-and-v900). In this case, adjust these configuration items instead of disabling Compaction Filter.

</CustomContent>
32 changes: 16 additions & 16 deletions tikv-configuration-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -819,7 +819,7 @@ Configuration items related to Raftstore.

> **Warning:**
>
> Starting from v7.5.7 and v9.0.0, this configuration item is deprecated and replaced by [`gc.auto-compaction.check-interval`](#check-interval-new-in-v757-and-v900).
> Starting from v7.5.7, v8.5.4, and v9.0.0, this configuration item is deprecated and replaced by [`gc.auto-compaction.check-interval`](#check-interval-new-in-v757-v854-and-v900).

+ The time interval at which to check whether it is necessary to manually trigger RocksDB compaction. `0` means that this feature is disabled.
+ Default value: `"5m"`
Expand All @@ -829,7 +829,7 @@ Configuration items related to Raftstore.

> **Warning:**
>
> Starting from v7.5.7 and v9.0.0, this configuration item is deprecated.
> Starting from v7.5.7, v8.5.4, and v9.0.0, this configuration item is deprecated.

+ The number of Regions checked at one time for each round of manual compaction
+ Default value:
Expand All @@ -842,7 +842,7 @@ Configuration items related to Raftstore.

> **Warning:**
>
> Starting from v7.5.7 and v9.0.0, this configuration item is deprecated and replaced by [`gc.auto-compaction.tombstone-num-threshold`](#tombstone-num-threshold-new-in-v757-and-v900).
> Starting from v7.5.7, v8.5.4, and v9.0.0, this configuration item is deprecated and replaced by [`gc.auto-compaction.tombstone-num-threshold`](#tombstone-num-threshold-new-in-v757-v854-and-v900).

+ The number of tombstones required to trigger RocksDB compaction
+ Default value: `10000`
Expand All @@ -852,7 +852,7 @@ Configuration items related to Raftstore.

> **Warning:**
>
> Starting from v7.5.7 and v9.0.0, this configuration item is deprecated and replaced by [`gc.auto-compaction.tombstone-percent-threshold`](#tombstone-percent-threshold-new-in-v757-and-v900).
> Starting from v7.5.7, v8.5.4, and v9.0.0, this configuration item is deprecated and replaced by [`gc.auto-compaction.tombstone-percent-threshold`](#tombstone-percent-threshold-new-in-v757-v854-and-v900).

+ The proportion of tombstone required to trigger RocksDB compaction
+ Default value: `30`
Expand All @@ -863,7 +863,7 @@ Configuration items related to Raftstore.

> **Warning:**
>
> Starting from v7.5.7 and v9.0.0, this configuration item is deprecated and replaced by [`gc.auto-compaction.redundant-rows-threshold`](#redundant-rows-threshold-new-in-v757-and-v900).
> Starting from v7.5.7, v8.5.4, and v9.0.0, this configuration item is deprecated and replaced by [`gc.auto-compaction.redundant-rows-threshold`](#redundant-rows-threshold-new-in-v757-v854-and-v900).

+ The number of redundant MVCC rows required to trigger RocksDB compaction.
+ Default value: `50000`
Expand All @@ -873,7 +873,7 @@ Configuration items related to Raftstore.

> **Warning:**
>
> Starting from v7.5.7 and v9.0.0, this configuration item is deprecated and replaced by [`gc.auto-compaction.redundant-rows-percent-threshold`](#redundant-rows-percent-threshold-new-in-v757-and-v900).
> Starting from v7.5.7, v8.5.4, and v9.0.0, this configuration item is deprecated and replaced by [`gc.auto-compaction.redundant-rows-percent-threshold`](#redundant-rows-percent-threshold-new-in-v757-v854-and-v900).

+ The percentage of redundant MVCC rows required to trigger RocksDB compaction.
+ Default value: `20`
Expand Down Expand Up @@ -2283,42 +2283,42 @@ Configuration items related to TiDB Lightning import and BR restore.

Configures the behavior of TiKV automatic compaction.

### `check-interval` <span class="version-mark">New in v7.5.7 and v9.0.0</span>
### `check-interval` <span class="version-mark">New in v7.5.7, v8.5.4, and v9.0.0</span>

+ The interval at which TiKV checks whether to trigger automatic compaction. Within this interval, Regions that meet the automatic compaction conditions are processed based on priority. When the interval elapses, TiKV rescans Region information and recalculates priorities.
+ Default value: `"300s"`

### `tombstone-num-threshold` <span class="version-mark">New in v7.5.7 and v9.0.0</span>
### `tombstone-num-threshold` <span class="version-mark">New in v7.5.7, v8.5.4, and v9.0.0</span>

+ The number of RocksDB tombstones required to trigger TiKV automatic compaction. When the number of tombstones reaches this threshold, or when the percentage of tombstones reaches [`tombstone-percent-threshold`](#tombstone-percent-threshold-new-in-v757-and-v900), TiKV triggers automatic compaction.
+ The number of RocksDB tombstones required to trigger TiKV automatic compaction. When the number of tombstones reaches this threshold, or when the percentage of tombstones reaches [`tombstone-percent-threshold`](#tombstone-percent-threshold-new-in-v757-v854-and-v900), TiKV triggers automatic compaction.
+ This configuration item takes effect only when [Compaction Filter](/garbage-collection-configuration.md) is disabled.
+ Default value: `10000`
+ Minimum value: `0`

### `tombstone-percent-threshold` <span class="version-mark">New in v7.5.7 and v9.0.0</span>
### `tombstone-percent-threshold` <span class="version-mark">New in v7.5.7, v8.5.4, and v9.0.0</span>

+ The percentage of RocksDB tombstones required to trigger TiKV automatic compaction. When the percentage of tombstones reaches this threshold, or when the number of tombstones reaches [`tombstone-num-threshold`](#tombstone-num-threshold-new-in-v757-and-v900), TiKV triggers automatic compaction.
+ The percentage of RocksDB tombstones required to trigger TiKV automatic compaction. When the percentage of tombstones reaches this threshold, or when the number of tombstones reaches [`tombstone-num-threshold`](#tombstone-num-threshold-new-in-v757-v854-and-v900), TiKV triggers automatic compaction.
+ This configuration item takes effect only when [Compaction Filter](/garbage-collection-configuration.md) is disabled.
+ Default value: `30`
+ Minimum value: `0`
+ Maximum value: `100`

### `redundant-rows-threshold` <span class="version-mark">New in v7.5.7 and v9.0.0</span>
### `redundant-rows-threshold` <span class="version-mark">New in v7.5.7, v8.5.4, and v9.0.0</span>

+ The number of redundant MVCC rows required to trigger TiKV automatic compaction. Redundant rows include RocksDB tombstones, TiKV stale versions, and TiKV deletion tombstones. When the number of redundant MVCC rows reaches this threshold, or when the percentage of these rows reaches [`redundant-rows-percent-threshold`](#redundant-rows-percent-threshold-new-in-v757-and-v900), TiKV triggers automatic compaction.
+ The number of redundant MVCC rows required to trigger TiKV automatic compaction. Redundant rows include RocksDB tombstones, TiKV stale versions, and TiKV deletion tombstones. When the number of redundant MVCC rows reaches this threshold, or when the percentage of these rows reaches [`redundant-rows-percent-threshold`](#redundant-rows-percent-threshold-new-in-v757-v854-and-v900), TiKV triggers automatic compaction.
+ This configuration item takes effect only when [Compaction Filter](/garbage-collection-configuration.md) is enabled.
+ Default value: `50000`
+ Minimum value: `0`

### `redundant-rows-percent-threshold` <span class="version-mark">New in v7.5.7 and v9.0.0</span>
### `redundant-rows-percent-threshold` <span class="version-mark">New in v7.5.7, v8.5.4, and v9.0.0</span>

+ The percentage of redundant MVCC rows required to trigger TiKV automatic compaction. Redundant rows include RocksDB tombstones, TiKV stale versions, and TiKV deletion tombstones. When the number of redundant MVCC rows reaches [`redundant-rows-threshold`](#redundant-rows-threshold-new-in-v757-and-v900), or when the percentage of these rows reaches `redundant-rows-percent-threshold`, TiKV triggers automatic compaction.
+ The percentage of redundant MVCC rows required to trigger TiKV automatic compaction. Redundant rows include RocksDB tombstones, TiKV stale versions, and TiKV deletion tombstones. When the number of redundant MVCC rows reaches [`redundant-rows-threshold`](#redundant-rows-threshold-new-in-v757-v854-and-v900), or when the percentage of these rows reaches `redundant-rows-percent-threshold`, TiKV triggers automatic compaction.
+ This configuration item takes effect only when [Compaction Filter](/garbage-collection-configuration.md) is enabled.
+ Default value: `20`
+ Minimum value: `0`
+ Maximum value: `100`

### `bottommost-level-force` <span class="version-mark">New in v7.5.7 and v9.0.0</span>
### `bottommost-level-force` <span class="version-mark">New in v7.5.7, v8.5.4, and v9.0.0</span>

+ Controls whether to force compaction on the bottommost files in RocksDB.
+ Default value: `true`
Expand Down