From 1566cbd28474aa0a5ecc3b277f9be594812c9878 Mon Sep 17 00:00:00 2001 From: ekexium Date: Thu, 25 Jul 2024 13:48:50 +0800 Subject: [PATCH 1/7] doc: concurrency of gc delete-range Signed-off-by: ekexium --- system-variables.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/system-variables.md b/system-variables.md index c6c7c9171fc6b..ae23a45eb1e16 100644 --- a/system-variables.md +++ b/system-variables.md @@ -2933,9 +2933,13 @@ 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} ∪ [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. +- Function: This variable controls the number of concurrent threads during the GC (Garbage Collection) process. +- Affected GC steps: + - [Resolve Locks](/garbage-collection-overview.md#resolve-locks): Directly uses the specified number of threads. + - [Delete Range](/garbage-collection-overview.md#Delete-Ranges): Uses 1/4 of the specified value (rounded up) as the number of threads. +- Default value explanation: When set to `-1`, TiDB automatically determines the appropriate number of threads. ### tidb_gc_enable New in v5.0 From 704e3ad8b2fa2e69253944361706c3a849136406 Mon Sep 17 00:00:00 2001 From: ekexium Date: Thu, 25 Jul 2024 20:13:10 +0800 Subject: [PATCH 2/7] Update system-variables.md --- system-variables.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-variables.md b/system-variables.md index ae23a45eb1e16..b99fd8593ac77 100644 --- a/system-variables.md +++ b/system-variables.md @@ -2938,7 +2938,7 @@ For a system upgraded to v5.0 from an earlier version, if you have not modified - Function: This variable controls the number of concurrent threads during the GC (Garbage Collection) process. - Affected GC steps: - [Resolve Locks](/garbage-collection-overview.md#resolve-locks): Directly uses the specified number of threads. - - [Delete Range](/garbage-collection-overview.md#Delete-Ranges): Uses 1/4 of the specified value (rounded up) as the number of threads. + - [Delete Range](/garbage-collection-overview.md#Delete-Ranges): Uses 1/4 of the specified value as the number of threads. - Default value explanation: When set to `-1`, TiDB automatically determines the appropriate number of threads. ### tidb_gc_enable New in v5.0 From 68f81653a3932896e1371d7c93ab378f7a1928db Mon Sep 17 00:00:00 2001 From: ekexium Date: Mon, 5 Aug 2024 15:38:13 +0800 Subject: [PATCH 3/7] Update system-variables.md Co-authored-by: Grace Cai --- system-variables.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/system-variables.md b/system-variables.md index b99fd8593ac77..a61a299c8fbd0 100644 --- a/system-variables.md +++ b/system-variables.md @@ -2935,11 +2935,11 @@ For a system upgraded to v5.0 from an earlier version, if you have not modified - Default value: `-1` - Range: `{-1} ∪ [1, 256]` - Unit: Threads -- Function: This variable controls the number of concurrent threads during the GC (Garbage Collection) process. -- Affected GC steps: - - [Resolve Locks](/garbage-collection-overview.md#resolve-locks): Directly uses the specified number of threads. - - [Delete Range](/garbage-collection-overview.md#Delete-Ranges): Uses 1/4 of the specified value as the number of threads. -- Default value explanation: When set to `-1`, TiDB automatically determines the appropriate number of threads. +- This variable controls the number of concurrent threads during the [Resolve Locks](/garbage-collection-overview.md#resolve-locks) and [Delete Range](/garbage-collection-overview.md#Delete-Ranges) steps of the GC (Garbage Collection) 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 1/4 of the value set for this variable as the number of threads. ### tidb_gc_enable New in v5.0 From aa19657003dab09251074a37f91a7a4c145d0919 Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Mon, 12 Aug 2024 11:25:16 +0800 Subject: [PATCH 4/7] Apply suggestions from code review Co-authored-by: Aolin --- system-variables.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/system-variables.md b/system-variables.md index a61a299c8fbd0..ad99291de1bbd 100644 --- a/system-variables.md +++ b/system-variables.md @@ -2933,13 +2933,13 @@ 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} ∪ [1, 256]` +- Range: `-1` or `[1, 256]` - Unit: Threads -- This variable controls the number of concurrent threads during the [Resolve Locks](/garbage-collection-overview.md#resolve-locks) and [Delete Range](/garbage-collection-overview.md#Delete-Ranges) steps of the GC (Garbage Collection) process. +- This variable controls the number of concurrent threads during the [Resolve Locks](/garbage-collection-overview.md#resolve-locks) and [Delete Range](/garbage-collection-overview.md#Delete-Ranges) steps of the [Garbage Collection (GC)](/garbage-collection-overview.md) 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 1/4 of 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 New in v5.0 From 1414c1a19fa04d25296bc69f8d8875119109cc14 Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Tue, 20 Aug 2024 17:30:59 +0800 Subject: [PATCH 5/7] Update system-variables.md --- system-variables.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/system-variables.md b/system-variables.md index ad99291de1bbd..43bc404a070b1 100644 --- a/system-variables.md +++ b/system-variables.md @@ -2935,7 +2935,8 @@ For a system upgraded to v5.0 from an earlier version, if you have not modified - Default value: `-1` - Range: `-1` or `[1, 256]` - Unit: Threads -- This variable controls the number of concurrent threads during the [Resolve Locks](/garbage-collection-overview.md#resolve-locks) and [Delete Range](/garbage-collection-overview.md#Delete-Ranges) steps of the [Garbage Collection (GC)](/garbage-collection-overview.md) process. +- 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 Range](/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. From 1bd07182eef991f8c0beb9163f63ffcfe94d80f6 Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Wed, 21 Aug 2024 10:45:05 +0800 Subject: [PATCH 6/7] fix a broken link --- system-variables.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-variables.md b/system-variables.md index 43bc404a070b1..f8b51ef995a54 100644 --- a/system-variables.md +++ b/system-variables.md @@ -2936,7 +2936,7 @@ For a system upgraded to v5.0 from an earlier version, if you have not modified - Range: `-1` or `[1, 256]` - Unit: Threads - 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 Range](/garbage-collection-overview.md#Delete-Ranges) step of the GC process. +- Starting from v8.3.0, this variable also controls the number of concurrent threads during the [Delete Range](/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. From 56ff3797ac4a78360d6bff59b0e62722dbb884cd Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Wed, 21 Aug 2024 10:45:59 +0800 Subject: [PATCH 7/7] Update system-variables.md --- system-variables.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-variables.md b/system-variables.md index f8b51ef995a54..a790c23ade0e3 100644 --- a/system-variables.md +++ b/system-variables.md @@ -2936,7 +2936,7 @@ For a system upgraded to v5.0 from an earlier version, if you have not modified - Range: `-1` or `[1, 256]` - Unit: Threads - 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 Range](/garbage-collection-overview.md#delete-ranges) step of the GC 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.