Skip to content

Commit 93fabc8

Browse files
Oreoxmtti-chi-bot
authored andcommitted
This is an automated cherry-pick of #22251
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
1 parent fe99f52 commit 93fabc8

File tree

2 files changed

+61
-0
lines changed

2 files changed

+61
-0
lines changed

garbage-collection-configuration.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,12 @@ 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+
<<<<<<< HEAD
118119
> - 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.
119120
> - 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.
121+
=======
122+
> - 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.
123+
> - 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.
124+
>>>>>>> df7ac2e4b0 (v8.5.4: tikv: update auto compaction config (#22251))
120125
121126
</CustomContent>

tikv-configuration-file.md

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

792792
> **Warning:**
793793
>
794+
<<<<<<< HEAD
794795
> Starting from v7.5.7, this configuration item is deprecated and replaced by [`gc.auto-compaction.check-interval`](#check-interval-new-in-v757).
796+
=======
797+
> 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).
798+
>>>>>>> df7ac2e4b0 (v8.5.4: tikv: update auto compaction config (#22251))
795799
796800
+ The time interval at which to check whether it is necessary to manually trigger RocksDB compaction. `0` means that this feature is disabled.
797801
+ Default value: `"5m"`
@@ -801,7 +805,11 @@ Configuration items related to Raftstore.
801805

802806
> **Warning:**
803807
>
808+
<<<<<<< HEAD
804809
> Starting from v7.5.7, this configuration item is deprecated.
810+
=======
811+
> Starting from v7.5.7, v8.5.4, and v9.0.0, this configuration item is deprecated.
812+
>>>>>>> df7ac2e4b0 (v8.5.4: tikv: update auto compaction config (#22251))
805813
806814
+ The number of Regions checked at one time for each round of manual compaction
807815
+ Default value:
@@ -814,7 +822,11 @@ Configuration items related to Raftstore.
814822

815823
> **Warning:**
816824
>
825+
<<<<<<< HEAD
817826
> 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).
827+
=======
828+
> 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).
829+
>>>>>>> df7ac2e4b0 (v8.5.4: tikv: update auto compaction config (#22251))
818830
819831
+ The number of tombstones required to trigger RocksDB compaction
820832
+ Default value: `10000`
@@ -824,7 +836,11 @@ Configuration items related to Raftstore.
824836

825837
> **Warning:**
826838
>
839+
<<<<<<< HEAD
827840
> 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).
841+
=======
842+
> 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).
843+
>>>>>>> df7ac2e4b0 (v8.5.4: tikv: update auto compaction config (#22251))
828844
829845
+ The proportion of tombstone required to trigger RocksDB compaction
830846
+ Default value: `30`
@@ -835,7 +851,11 @@ Configuration items related to Raftstore.
835851

836852
> **Warning:**
837853
>
854+
<<<<<<< HEAD
838855
> 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).
856+
=======
857+
> 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).
858+
>>>>>>> df7ac2e4b0 (v8.5.4: tikv: update auto compaction config (#22251))
839859
840860
+ The number of redundant MVCC rows required to trigger RocksDB compaction.
841861
+ Default value: `50000`
@@ -845,7 +865,11 @@ Configuration items related to Raftstore.
845865

846866
> **Warning:**
847867
>
868+
<<<<<<< HEAD
848869
> 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).
870+
=======
871+
> 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).
872+
>>>>>>> df7ac2e4b0 (v8.5.4: tikv: update auto compaction config (#22251))
849873
850874
+ The percentage of redundant MVCC rows required to trigger RocksDB compaction.
851875
+ Default value: `20`
@@ -2255,42 +2279,74 @@ Configuration items related to TiDB Lightning import and BR restore.
22552279

22562280
Configures the behavior of TiKV automatic compaction.
22572281

2282+
<<<<<<< HEAD
22582283
### `check-interval` <span class="version-mark">New in v7.5.7</span>
2284+
=======
2285+
### `check-interval` <span class="version-mark">New in v7.5.7, v8.5.4, and v9.0.0</span>
2286+
>>>>>>> df7ac2e4b0 (v8.5.4: tikv: update auto compaction config (#22251))
22592287
22602288
+ 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.
22612289
+ Default value: `"300s"`
22622290

2291+
<<<<<<< HEAD
22632292
### `tombstone-num-threshold` <span class="version-mark">New in v7.5.7</span>
22642293

22652294
+ 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.
2295+
=======
2296+
### `tombstone-num-threshold` <span class="version-mark">New in v7.5.7, v8.5.4, and v9.0.0</span>
2297+
2298+
+ 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.
2299+
>>>>>>> df7ac2e4b0 (v8.5.4: tikv: update auto compaction config (#22251))
22662300
+ This configuration item takes effect only when [Compaction Filter](/garbage-collection-configuration.md) is disabled.
22672301
+ Default value: `10000`
22682302
+ Minimum value: `0`
22692303

2304+
<<<<<<< HEAD
22702305
### `tombstone-percent-threshold` <span class="version-mark">New in v7.5.7</span>
22712306

22722307
+ 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.
2308+
=======
2309+
### `tombstone-percent-threshold` <span class="version-mark">New in v7.5.7, v8.5.4, and v9.0.0</span>
2310+
2311+
+ 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.
2312+
>>>>>>> df7ac2e4b0 (v8.5.4: tikv: update auto compaction config (#22251))
22732313
+ This configuration item takes effect only when [Compaction Filter](/garbage-collection-configuration.md) is disabled.
22742314
+ Default value: `30`
22752315
+ Minimum value: `0`
22762316
+ Maximum value: `100`
22772317

2318+
<<<<<<< HEAD
22782319
### `redundant-rows-threshold` <span class="version-mark">New in v7.5.7</span>
22792320

22802321
+ 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.
2322+
=======
2323+
### `redundant-rows-threshold` <span class="version-mark">New in v7.5.7, v8.5.4, and v9.0.0</span>
2324+
2325+
+ 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.
2326+
>>>>>>> df7ac2e4b0 (v8.5.4: tikv: update auto compaction config (#22251))
22812327
+ This configuration item takes effect only when [Compaction Filter](/garbage-collection-configuration.md) is enabled.
22822328
+ Default value: `50000`
22832329
+ Minimum value: `0`
22842330

2331+
<<<<<<< HEAD
22852332
### `redundant-rows-percent-threshold` <span class="version-mark">New in v7.5.7</span>
22862333

22872334
+ 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.
2335+
=======
2336+
### `redundant-rows-percent-threshold` <span class="version-mark">New in v7.5.7, v8.5.4, and v9.0.0</span>
2337+
2338+
+ 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.
2339+
>>>>>>> df7ac2e4b0 (v8.5.4: tikv: update auto compaction config (#22251))
22882340
+ This configuration item takes effect only when [Compaction Filter](/garbage-collection-configuration.md) is enabled.
22892341
+ Default value: `20`
22902342
+ Minimum value: `0`
22912343
+ Maximum value: `100`
22922344

2345+
<<<<<<< HEAD
22932346
### `bottommost-level-force` <span class="version-mark">New in v7.5.7</span>
2347+
=======
2348+
### `bottommost-level-force` <span class="version-mark">New in v7.5.7, v8.5.4, and v9.0.0</span>
2349+
>>>>>>> df7ac2e4b0 (v8.5.4: tikv: update auto compaction config (#22251))
22942350
22952351
+ Controls whether to force compaction on the bottommost files in RocksDB.
22962352
+ Default value: `true`

0 commit comments

Comments
 (0)