Skip to content

Commit df7ac2e

Browse files
authored
v8.5.4: tikv: update auto compaction config (#22251)
1 parent 84a132b commit df7ac2e

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
@@ -116,7 +116,7 @@ show config where type = 'tikv' and name like '%enable-compaction-filter%';
116116
> 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:
117117
>
118118
> - For TiDB versions before v7.1.3, it is recommended to disable Compaction Filter to speed up GC.
119-
> - 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.
120-
> - 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.
119+
> - 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.
120+
> - 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.
121121
122122
</CustomContent>

tikv-configuration-file.md

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

820820
> **Warning:**
821821
>
822-
> 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).
822+
> 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).
823823
824824
+ The time interval at which to check whether it is necessary to manually trigger RocksDB compaction. `0` means that this feature is disabled.
825825
+ Default value: `"5m"`
@@ -829,7 +829,7 @@ Configuration items related to Raftstore.
829829

830830
> **Warning:**
831831
>
832-
> Starting from v7.5.7 and v9.0.0, this configuration item is deprecated.
832+
> Starting from v7.5.7, v8.5.4, and v9.0.0, this configuration item is deprecated.
833833
834834
+ The number of Regions checked at one time for each round of manual compaction
835835
+ Default value:
@@ -842,7 +842,7 @@ Configuration items related to Raftstore.
842842

843843
> **Warning:**
844844
>
845-
> 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).
845+
> 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).
846846
847847
+ The number of tombstones required to trigger RocksDB compaction
848848
+ Default value: `10000`
@@ -852,7 +852,7 @@ Configuration items related to Raftstore.
852852

853853
> **Warning:**
854854
>
855-
> 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).
855+
> 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).
856856
857857
+ The proportion of tombstone required to trigger RocksDB compaction
858858
+ Default value: `30`
@@ -863,7 +863,7 @@ Configuration items related to Raftstore.
863863

864864
> **Warning:**
865865
>
866-
> 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).
866+
> 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).
867867
868868
+ The number of redundant MVCC rows required to trigger RocksDB compaction.
869869
+ Default value: `50000`
@@ -873,7 +873,7 @@ Configuration items related to Raftstore.
873873

874874
> **Warning:**
875875
>
876-
> 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).
876+
> 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).
877877
878878
+ The percentage of redundant MVCC rows required to trigger RocksDB compaction.
879879
+ Default value: `20`
@@ -2283,42 +2283,42 @@ Configuration items related to TiDB Lightning import and BR restore.
22832283

22842284
Configures the behavior of TiKV automatic compaction.
22852285

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

22882288
+ 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.
22892289
+ Default value: `"300s"`
22902290

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

2293-
+ 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.
2293+
+ 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.
22942294
+ This configuration item takes effect only when [Compaction Filter](/garbage-collection-configuration.md) is disabled.
22952295
+ Default value: `10000`
22962296
+ Minimum value: `0`
22972297

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

2300-
+ 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.
2300+
+ 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.
23012301
+ This configuration item takes effect only when [Compaction Filter](/garbage-collection-configuration.md) is disabled.
23022302
+ Default value: `30`
23032303
+ Minimum value: `0`
23042304
+ Maximum value: `100`
23052305

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

2308-
+ 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.
2308+
+ 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.
23092309
+ This configuration item takes effect only when [Compaction Filter](/garbage-collection-configuration.md) is enabled.
23102310
+ Default value: `50000`
23112311
+ Minimum value: `0`
23122312

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

2315-
+ 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.
2315+
+ 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.
23162316
+ This configuration item takes effect only when [Compaction Filter](/garbage-collection-configuration.md) is enabled.
23172317
+ Default value: `20`
23182318
+ Minimum value: `0`
23192319
+ Maximum value: `100`
23202320

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

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

0 commit comments

Comments
 (0)