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
@@ -115,7 +115,7 @@ show config where type = 'tikv' and name like '%enable-compaction-filter%';
115
115
> 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:
116
116
>
117
117
> - 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.
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
@@ -791,7 +791,7 @@ Configuration items related to Raftstore.
791
791
792
792
> **Warning:**
793
793
>
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).
795
795
796
796
+ The time interval at which to check whether it is necessary to manually trigger RocksDB compaction. `0` means that this feature is disabled.
797
797
+ Default value: `"5m"`
@@ -801,7 +801,7 @@ Configuration items related to Raftstore.
801
801
802
802
> **Warning:**
803
803
>
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.
805
805
806
806
+ The number of Regions checked at one time for each round of manual compaction
807
807
+ Default value:
@@ -814,7 +814,7 @@ Configuration items related to Raftstore.
814
814
815
815
> **Warning:**
816
816
>
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).
818
818
819
819
+ The number of tombstones required to trigger RocksDB compaction
820
820
+ Default value: `10000`
@@ -824,7 +824,7 @@ Configuration items related to Raftstore.
824
824
825
825
> **Warning:**
826
826
>
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).
828
828
829
829
+ The proportion of tombstone required to trigger RocksDB compaction
830
830
+ Default value: `30`
@@ -835,7 +835,7 @@ Configuration items related to Raftstore.
835
835
836
836
> **Warning:**
837
837
>
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).
839
839
840
840
+ The number of redundant MVCC rows required to trigger RocksDB compaction.
841
841
+ Default value: `50000`
@@ -845,7 +845,7 @@ Configuration items related to Raftstore.
845
845
846
846
> **Warning:**
847
847
>
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).
849
849
850
850
+ The percentage of redundant MVCC rows required to trigger RocksDB compaction.
851
851
+ Default value: `20`
@@ -2255,42 +2255,42 @@ Configuration items related to TiDB Lightning import and BR restore.
2255
2255
2256
2256
Configures the behavior of TiKV automatic compaction.
2257
2257
2258
-
### `check-interval` <spanclass="version-mark">New in v7.5.7</span>
2258
+
### `check-interval` <spanclass="version-mark">New in v7.5.7 and v8.5.4</span>
2259
2259
2260
2260
+ 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.
2261
2261
+ Default value: `"300s"`
2262
2262
2263
-
### `tombstone-num-threshold` <spanclass="version-mark">New in v7.5.7</span>
2263
+
### `tombstone-num-threshold` <spanclass="version-mark">New in v7.5.7 and v8.5.4</span>
2264
2264
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.
2266
2266
+ This configuration item takes effect only when [Compaction Filter](/garbage-collection-configuration.md) is disabled.
2267
2267
+ Default value: `10000`
2268
2268
+ Minimum value: `0`
2269
2269
2270
-
### `tombstone-percent-threshold` <spanclass="version-mark">New in v7.5.7</span>
2270
+
### `tombstone-percent-threshold` <spanclass="version-mark">New in v7.5.7 and v8.5.4</span>
2271
2271
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.
2273
2273
+ This configuration item takes effect only when [Compaction Filter](/garbage-collection-configuration.md) is disabled.
2274
2274
+ Default value: `30`
2275
2275
+ Minimum value: `0`
2276
2276
+ Maximum value: `100`
2277
2277
2278
-
### `redundant-rows-threshold` <spanclass="version-mark">New in v7.5.7</span>
2278
+
### `redundant-rows-threshold` <spanclass="version-mark">New in v7.5.7 and v8.5.4</span>
2279
2279
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.
2281
2281
+ This configuration item takes effect only when [Compaction Filter](/garbage-collection-configuration.md) is enabled.
2282
2282
+ Default value: `50000`
2283
2283
+ Minimum value: `0`
2284
2284
2285
-
### `redundant-rows-percent-threshold` <spanclass="version-mark">New in v7.5.7</span>
2285
+
### `redundant-rows-percent-threshold` <spanclass="version-mark">New in v7.5.7 and v8.5.4</span>
2286
2286
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.
2288
2288
+ This configuration item takes effect only when [Compaction Filter](/garbage-collection-configuration.md) is enabled.
2289
2289
+ Default value: `20`
2290
2290
+ Minimum value: `0`
2291
2291
+ Maximum value: `100`
2292
2292
2293
-
### `bottommost-level-force` <spanclass="version-mark">New in v7.5.7</span>
2293
+
### `bottommost-level-force` <spanclass="version-mark">New in v7.5.7 and v8.5.4</span>
2294
2294
2295
2295
+ Controls whether to force compaction on the bottommost files in RocksDB.
0 commit comments