Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: concurrency of gc delete-range #18359

Merged
merged 7 commits into from
Aug 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions system-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -2933,9 +2933,14 @@ For a system upgraded to v5.0 from an earlier version, if you have not modified
- Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): No
- Type: Integer
- Default value: `-1`
- Range: `[1, 256]`
- Range: `-1` or `[1, 256]`
- Unit: Threads
- Specifies the number of threads in the [Resolve Locks](/garbage-collection-overview.md#resolve-locks) step of GC. A value of `-1` means that TiDB will automatically decide the number of garbage collection threads to use.
- This variable controls the number of concurrent threads during the [Resolve Locks](/garbage-collection-overview.md#resolve-locks) step of the [Garbage Collection (GC)](/garbage-collection-overview.md) process.
- Starting from v8.3.0, this variable also controls the number of concurrent threads during the [Delete Ranges](/garbage-collection-overview.md#delete-ranges) step of the GC process.
- By default, this variable is `-1`, allowing TiDB to automatically determine the appropriate number of threads based on workloads.
- When this variable is set to a number in the range of `[1, 256]`:
- Resolve Locks directly uses the value set for this variable as the number of threads.
- Delete Range uses one-fourth of the value set for this variable as the number of threads.

### tidb_gc_enable <span class="version-mark">New in v5.0</span>

Expand Down
Loading