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
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -115,7 +115,12 @@ 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
+
<<<<<<< HEAD
118
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.
119
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 [`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))
Copy file name to clipboardExpand all lines: tikv-configuration-file.md
+56Lines changed: 56 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -791,7 +791,11 @@ Configuration items related to Raftstore.
791
791
792
792
> **Warning:**
793
793
>
794
+
<<<<<<< HEAD
794
795
> 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))
795
799
796
800
+ The time interval at which to check whether it is necessary to manually trigger RocksDB compaction. `0` means that this feature is disabled.
797
801
+ Default value: `"5m"`
@@ -801,7 +805,11 @@ Configuration items related to Raftstore.
801
805
802
806
> **Warning:**
803
807
>
808
+
<<<<<<< HEAD
804
809
> 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))
805
813
806
814
+ The number of Regions checked at one time for each round of manual compaction
807
815
+ Default value:
@@ -814,7 +822,11 @@ Configuration items related to Raftstore.
814
822
815
823
> **Warning:**
816
824
>
825
+
<<<<<<< HEAD
817
826
> 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))
818
830
819
831
+ The number of tombstones required to trigger RocksDB compaction
820
832
+ Default value: `10000`
@@ -824,7 +836,11 @@ Configuration items related to Raftstore.
824
836
825
837
> **Warning:**
826
838
>
839
+
<<<<<<< HEAD
827
840
> 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))
828
844
829
845
+ The proportion of tombstone required to trigger RocksDB compaction
830
846
+ Default value: `30`
@@ -835,7 +851,11 @@ Configuration items related to Raftstore.
835
851
836
852
> **Warning:**
837
853
>
854
+
<<<<<<< HEAD
838
855
> 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))
839
859
840
860
+ The number of redundant MVCC rows required to trigger RocksDB compaction.
841
861
+ Default value: `50000`
@@ -845,7 +865,11 @@ Configuration items related to Raftstore.
845
865
846
866
> **Warning:**
847
867
>
868
+
<<<<<<< HEAD
848
869
> 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))
849
873
850
874
+ The percentage of redundant MVCC rows required to trigger RocksDB compaction.
851
875
+ Default value: `20`
@@ -2255,42 +2279,74 @@ Configuration items related to TiDB Lightning import and BR restore.
2255
2279
2256
2280
Configures the behavior of TiKV automatic compaction.
2257
2281
2282
+
<<<<<<< HEAD
2258
2283
### `check-interval` <spanclass="version-mark">New in v7.5.7</span>
2284
+
=======
2285
+
### `check-interval` <spanclass="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))
2259
2287
2260
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.
2261
2289
+ Default value: `"300s"`
2262
2290
2291
+
<<<<<<< HEAD
2263
2292
### `tombstone-num-threshold` <spanclass="version-mark">New in v7.5.7</span>
2264
2293
2265
2294
+ 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` <spanclass="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))
2266
2300
+ This configuration item takes effect only when [Compaction Filter](/garbage-collection-configuration.md) is disabled.
2267
2301
+ Default value: `10000`
2268
2302
+ Minimum value: `0`
2269
2303
2304
+
<<<<<<< HEAD
2270
2305
### `tombstone-percent-threshold` <spanclass="version-mark">New in v7.5.7</span>
2271
2306
2272
2307
+ 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` <spanclass="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))
2273
2313
+ This configuration item takes effect only when [Compaction Filter](/garbage-collection-configuration.md) is disabled.
2274
2314
+ Default value: `30`
2275
2315
+ Minimum value: `0`
2276
2316
+ Maximum value: `100`
2277
2317
2318
+
<<<<<<< HEAD
2278
2319
### `redundant-rows-threshold` <spanclass="version-mark">New in v7.5.7</span>
2279
2320
2280
2321
+ 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` <spanclass="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))
2281
2327
+ This configuration item takes effect only when [Compaction Filter](/garbage-collection-configuration.md) is enabled.
2282
2328
+ Default value: `50000`
2283
2329
+ Minimum value: `0`
2284
2330
2331
+
<<<<<<< HEAD
2285
2332
### `redundant-rows-percent-threshold` <spanclass="version-mark">New in v7.5.7</span>
2286
2333
2287
2334
+ 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` <spanclass="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))
2288
2340
+ This configuration item takes effect only when [Compaction Filter](/garbage-collection-configuration.md) is enabled.
2289
2341
+ Default value: `20`
2290
2342
+ Minimum value: `0`
2291
2343
+ Maximum value: `100`
2292
2344
2345
+
<<<<<<< HEAD
2293
2346
### `bottommost-level-force` <spanclass="version-mark">New in v7.5.7</span>
2347
+
=======
2348
+
### `bottommost-level-force` <spanclass="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))
2294
2350
2295
2351
+ Controls whether to force compaction on the bottommost files in RocksDB.
0 commit comments