You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: garbage-collection-configuration.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -116,7 +116,7 @@ show config where type = 'tikv' and name like '%enable-compaction-filter%';
116
116
> 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:
117
117
>
118
118
> - 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.
Copy file name to clipboardExpand all lines: tikv-configuration-file.md
+16-16Lines changed: 16 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -819,7 +819,7 @@ Configuration items related to Raftstore.
819
819
820
820
> **Warning:**
821
821
>
822
-
> Starting from v7.5.7and 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).
823
823
824
824
+ The time interval at which to check whether it is necessary to manually trigger RocksDB compaction. `0` means that this feature is disabled.
825
825
+ Default value: `"5m"`
@@ -829,7 +829,7 @@ Configuration items related to Raftstore.
829
829
830
830
> **Warning:**
831
831
>
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.
833
833
834
834
+ The number of Regions checked at one time for each round of manual compaction
835
835
+ Default value:
@@ -842,7 +842,7 @@ Configuration items related to Raftstore.
842
842
843
843
> **Warning:**
844
844
>
845
-
> Starting from v7.5.7and 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).
846
846
847
847
+ The number of tombstones required to trigger RocksDB compaction
848
848
+ Default value: `10000`
@@ -852,7 +852,7 @@ Configuration items related to Raftstore.
852
852
853
853
> **Warning:**
854
854
>
855
-
> Starting from v7.5.7and 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).
856
856
857
857
+ The proportion of tombstone required to trigger RocksDB compaction
858
858
+ Default value: `30`
@@ -863,7 +863,7 @@ Configuration items related to Raftstore.
863
863
864
864
> **Warning:**
865
865
>
866
-
> Starting from v7.5.7and 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).
867
867
868
868
+ The number of redundant MVCC rows required to trigger RocksDB compaction.
869
869
+ Default value: `50000`
@@ -873,7 +873,7 @@ Configuration items related to Raftstore.
873
873
874
874
> **Warning:**
875
875
>
876
-
> Starting from v7.5.7and 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).
877
877
878
878
+ The percentage of redundant MVCC rows required to trigger RocksDB compaction.
879
879
+ Default value: `20`
@@ -2283,42 +2283,42 @@ Configuration items related to TiDB Lightning import and BR restore.
2283
2283
2284
2284
Configures the behavior of TiKV automatic compaction.
2285
2285
2286
-
### `check-interval` <spanclass="version-mark">New in v7.5.7 and v9.0.0</span>
2286
+
### `check-interval` <spanclass="version-mark">New in v7.5.7, v8.5.4, and v9.0.0</span>
2287
2287
2288
2288
+ 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.
2289
2289
+ Default value: `"300s"`
2290
2290
2291
-
### `tombstone-num-threshold` <spanclass="version-mark">New in v7.5.7 and v9.0.0</span>
2291
+
### `tombstone-num-threshold` <spanclass="version-mark">New in v7.5.7, v8.5.4, and v9.0.0</span>
2292
2292
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.
2294
2294
+ This configuration item takes effect only when [Compaction Filter](/garbage-collection-configuration.md) is disabled.
2295
2295
+ Default value: `10000`
2296
2296
+ Minimum value: `0`
2297
2297
2298
-
### `tombstone-percent-threshold` <spanclass="version-mark">New in v7.5.7 and v9.0.0</span>
2298
+
### `tombstone-percent-threshold` <spanclass="version-mark">New in v7.5.7, v8.5.4, and v9.0.0</span>
2299
2299
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.
2301
2301
+ This configuration item takes effect only when [Compaction Filter](/garbage-collection-configuration.md) is disabled.
2302
2302
+ Default value: `30`
2303
2303
+ Minimum value: `0`
2304
2304
+ Maximum value: `100`
2305
2305
2306
-
### `redundant-rows-threshold` <spanclass="version-mark">New in v7.5.7 and v9.0.0</span>
2306
+
### `redundant-rows-threshold` <spanclass="version-mark">New in v7.5.7, v8.5.4, and v9.0.0</span>
2307
2307
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.
2309
2309
+ This configuration item takes effect only when [Compaction Filter](/garbage-collection-configuration.md) is enabled.
2310
2310
+ Default value: `50000`
2311
2311
+ Minimum value: `0`
2312
2312
2313
-
### `redundant-rows-percent-threshold` <spanclass="version-mark">New in v7.5.7 and v9.0.0</span>
2313
+
### `redundant-rows-percent-threshold` <spanclass="version-mark">New in v7.5.7, v8.5.4, and v9.0.0</span>
2314
2314
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.
2316
2316
+ This configuration item takes effect only when [Compaction Filter](/garbage-collection-configuration.md) is enabled.
2317
2317
+ Default value: `20`
2318
2318
+ Minimum value: `0`
2319
2319
+ Maximum value: `100`
2320
2320
2321
-
### `bottommost-level-force` <spanclass="version-mark">New in v7.5.7 and v9.0.0</span>
2321
+
### `bottommost-level-force` <spanclass="version-mark">New in v7.5.7, v8.5.4, and v9.0.0</span>
2322
2322
2323
2323
+ Controls whether to force compaction on the bottommost files in RocksDB.
0 commit comments