Skip to content

Commit 7723b8d

Browse files
authored
v8.5.4: tikv: update auto compaction config (#22251) (#22265)
1 parent fe99f52 commit 7723b8d

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

garbage-collection-configuration.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ show config where type = 'tikv' and name like '%enable-compaction-filter%';
115115
> 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:
116116
>
117117
> - For TiDB versions before v7.1.3, it is recommended to disable Compaction Filter to speed up GC.
118-
> - 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.
119-
> - 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 [`gc.auto-compaction.redundant-rows-percent-threshold`](/tikv-configuration-file.md#redundant-rows-percent-threshold-new-in-v757). In this case, adjust these configuration items instead of disabling Compaction Filter.
118+
> - 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.
119+
> - Starting from v7.5.7 and v8.5.4, [`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-v854) and [`gc.auto-compaction.redundant-rows-percent-threshold`](/tikv-configuration-file.md#redundant-rows-percent-threshold-new-in-v757-and-v854). In this case, adjust these configuration items instead of disabling Compaction Filter.
120120
121121
</CustomContent>

tikv-configuration-file.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -791,7 +791,7 @@ Configuration items related to Raftstore.
791791

792792
> **Warning:**
793793
>
794-
> Starting from v7.5.7, this configuration item is deprecated and replaced by [`gc.auto-compaction.check-interval`](#check-interval-new-in-v757).
794+
> Starting from v7.5.7 and v8.5.4, this configuration item is deprecated and replaced by [`gc.auto-compaction.check-interval`](#check-interval-new-in-v757-and-v854).
795795
796796
+ The time interval at which to check whether it is necessary to manually trigger RocksDB compaction. `0` means that this feature is disabled.
797797
+ Default value: `"5m"`
@@ -801,7 +801,7 @@ Configuration items related to Raftstore.
801801

802802
> **Warning:**
803803
>
804-
> Starting from v7.5.7, this configuration item is deprecated.
804+
> Starting from v7.5.7 and v8.5.4, this configuration item is deprecated.
805805
806806
+ The number of Regions checked at one time for each round of manual compaction
807807
+ Default value:
@@ -814,7 +814,7 @@ Configuration items related to Raftstore.
814814

815815
> **Warning:**
816816
>
817-
> Starting from v7.5.7, this configuration item is deprecated and replaced by [`gc.auto-compaction.tombstone-num-threshold`](#tombstone-num-threshold-new-in-v757).
817+
> Starting from v7.5.7 and v8.5.4, this configuration item is deprecated and replaced by [`gc.auto-compaction.tombstone-num-threshold`](#tombstone-num-threshold-new-in-v757-and-v854).
818818
819819
+ The number of tombstones required to trigger RocksDB compaction
820820
+ Default value: `10000`
@@ -824,7 +824,7 @@ Configuration items related to Raftstore.
824824

825825
> **Warning:**
826826
>
827-
> Starting from v7.5.7, this configuration item is deprecated and replaced by [`gc.auto-compaction.tombstone-percent-threshold`](#tombstone-percent-threshold-new-in-v757).
827+
> Starting from v7.5.7 and v8.5.4, this configuration item is deprecated and replaced by [`gc.auto-compaction.tombstone-percent-threshold`](#tombstone-percent-threshold-new-in-v757-and-v854).
828828
829829
+ The proportion of tombstone required to trigger RocksDB compaction
830830
+ Default value: `30`
@@ -835,7 +835,7 @@ Configuration items related to Raftstore.
835835

836836
> **Warning:**
837837
>
838-
> Starting from v7.5.7, this configuration item is deprecated and replaced by [`gc.auto-compaction.redundant-rows-threshold`](#redundant-rows-threshold-new-in-v757).
838+
> Starting from v7.5.7 and v8.5.4, this configuration item is deprecated and replaced by [`gc.auto-compaction.redundant-rows-threshold`](#redundant-rows-threshold-new-in-v757-and-v854).
839839
840840
+ The number of redundant MVCC rows required to trigger RocksDB compaction.
841841
+ Default value: `50000`
@@ -845,7 +845,7 @@ Configuration items related to Raftstore.
845845

846846
> **Warning:**
847847
>
848-
> Starting from v7.5.7, this configuration item is deprecated and replaced by [`gc.auto-compaction.redundant-rows-percent-threshold`](#redundant-rows-percent-threshold-new-in-v757).
848+
> Starting from v7.5.7 and v8.5.4, this configuration item is deprecated and replaced by [`gc.auto-compaction.redundant-rows-percent-threshold`](#redundant-rows-percent-threshold-new-in-v757-and-v854).
849849
850850
+ The percentage of redundant MVCC rows required to trigger RocksDB compaction.
851851
+ Default value: `20`
@@ -2255,42 +2255,42 @@ Configuration items related to TiDB Lightning import and BR restore.
22552255

22562256
Configures the behavior of TiKV automatic compaction.
22572257

2258-
### `check-interval` <span class="version-mark">New in v7.5.7</span>
2258+
### `check-interval` <span class="version-mark">New in v7.5.7 and v8.5.4</span>
22592259

22602260
+ 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.
22612261
+ Default value: `"300s"`
22622262

2263-
### `tombstone-num-threshold` <span class="version-mark">New in v7.5.7</span>
2263+
### `tombstone-num-threshold` <span class="version-mark">New in v7.5.7 and v8.5.4</span>
22642264

2265-
+ 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), TiKV triggers automatic compaction.
2265+
+ 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-v854), TiKV triggers automatic compaction.
22662266
+ This configuration item takes effect only when [Compaction Filter](/garbage-collection-configuration.md) is disabled.
22672267
+ Default value: `10000`
22682268
+ Minimum value: `0`
22692269

2270-
### `tombstone-percent-threshold` <span class="version-mark">New in v7.5.7</span>
2270+
### `tombstone-percent-threshold` <span class="version-mark">New in v7.5.7 and v8.5.4</span>
22712271

2272-
+ 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), TiKV triggers automatic compaction.
2272+
+ 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-v854), TiKV triggers automatic compaction.
22732273
+ This configuration item takes effect only when [Compaction Filter](/garbage-collection-configuration.md) is disabled.
22742274
+ Default value: `30`
22752275
+ Minimum value: `0`
22762276
+ Maximum value: `100`
22772277

2278-
### `redundant-rows-threshold` <span class="version-mark">New in v7.5.7</span>
2278+
### `redundant-rows-threshold` <span class="version-mark">New in v7.5.7 and v8.5.4</span>
22792279

2280-
+ 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), TiKV triggers automatic compaction.
2280+
+ 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-v854), TiKV triggers automatic compaction.
22812281
+ This configuration item takes effect only when [Compaction Filter](/garbage-collection-configuration.md) is enabled.
22822282
+ Default value: `50000`
22832283
+ Minimum value: `0`
22842284

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

2287-
+ 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), or when the percentage of these rows reaches `redundant-rows-percent-threshold`, TiKV triggers automatic compaction.
2287+
+ 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-v854), or when the percentage of these rows reaches `redundant-rows-percent-threshold`, TiKV triggers automatic compaction.
22882288
+ This configuration item takes effect only when [Compaction Filter](/garbage-collection-configuration.md) is enabled.
22892289
+ Default value: `20`
22902290
+ Minimum value: `0`
22912291
+ Maximum value: `100`
22922292

2293-
### `bottommost-level-force` <span class="version-mark">New in v7.5.7</span>
2293+
### `bottommost-level-force` <span class="version-mark">New in v7.5.7 and v8.5.4</span>
22942294

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

0 commit comments

Comments
 (0)