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 #18117

Merged
merged 8 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 @@ -2574,9 +2574,14 @@ v5.0 后,用户仍可以单独修改以上系统变量(会有废弃警告)
- 是否受 Hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value) 控制:否
- 类型:整数型
- 默认值:`-1`
- 范围:`[1, 256]`
- 范围:`-1` 或 `[1, 256]`
- 单位:线程
- 这个变量用于指定 GC 在[Resolve Locks(清理锁)](/garbage-collection-overview.md#resolve-locks清理锁)步骤中线程的数量。默认值 `-1` 表示由 TiDB 自主判断运行 GC 要使用的线程的数量。
- 该变量用于控制[垃圾回收 (GC)](/garbage-collection-overview.md) 过程中 [Resolve Locks(清理锁)](/garbage-collection-overview.md#resolve-locks清理锁)的并发线程数。
- 从 v8.3.0 开始,该变量也用于控制 GC 过程中 [Delete Range(删除区间)](/garbage-collection-overview.md#delete-ranges删除区间)的并发线程数。
- 默认情况下,该变量值为 `-1`,TiDB 将根据负载情况自动决定适当的线程数。
cfzjywxk marked this conversation as resolved.
Show resolved Hide resolved
- 当设置为 `[1, 256]` 之间的数时:
- Resolve Locks(清理锁)直接使用该变量设定值作为线程数。
- Delete Range(删除区间)使用该变量设定值的 1/4 作为线程数。

### `tidb_gc_enable` <span class="version-mark">从 v5.0 版本开始引入</span>

Expand Down