From e5b0fe88da2976e42431f5d93c10369c3643f709 Mon Sep 17 00:00:00 2001 From: doc-claw-bot Date: Fri, 21 Aug 2026 10:06:24 +0000 Subject: [PATCH 1/2] docs: add memory unit example for tidb_server_memory_limit --- system-variables.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-variables.md b/system-variables.md index 1555a6ceb02e6..36f9171a63822 100644 --- a/system-variables.md +++ b/system-variables.md @@ -5928,7 +5928,7 @@ SHOW WARNINGS; - Default value: `80%` - Range: - You can set the value in the percentage format, which means the percentage of the memory usage relative to the total memory. The value range is `[1%, 99%]`. - - You can also set the value in memory size. The value range is `0` and `[536870912, 9223372036854775807]` in bytes. The memory format with the units "KiB|MiB|GiB|TiB" is supported. `0` means no memory limit. + - You can also set the value in memory size. The value range is `0` and `[536870912, 9223372036854775807]` in bytes. The memory format with the units "KiB|MiB|GiB|TiB" is supported. For example, you can set this variable to `90GiB`. `0` means no memory limit. - If this variable is set to a memory size that is less than 512 MiB but not `0`, TiDB uses 512 MiB as the actual size. - This variable specifies the memory limit for a TiDB instance. When the memory usage of TiDB reaches the limit, TiDB cancels the currently running SQL statement with the highest memory usage. After the SQL statement is successfully canceled, TiDB tries to call Golang GC to immediately reclaim memory to relieve memory stress as soon as possible. - Only the SQL statements with more memory usage than the [`tidb_server_memory_limit_sess_min_size`](/system-variables.md#tidb_server_memory_limit_sess_min_size-new-in-v640) limit are selected as the SQL statements to be canceled first. From a516f4e68776b74cc6c7f85bae952775c30f85a0 Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Fri, 21 Aug 2026 18:36:53 +0800 Subject: [PATCH 2/2] Apply suggestion from @qiancai --- system-variables.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-variables.md b/system-variables.md index 36f9171a63822..ef0dbe2f84ef8 100644 --- a/system-variables.md +++ b/system-variables.md @@ -5928,7 +5928,7 @@ SHOW WARNINGS; - Default value: `80%` - Range: - You can set the value in the percentage format, which means the percentage of the memory usage relative to the total memory. The value range is `[1%, 99%]`. - - You can also set the value in memory size. The value range is `0` and `[536870912, 9223372036854775807]` in bytes. The memory format with the units "KiB|MiB|GiB|TiB" is supported. For example, you can set this variable to `90GiB`. `0` means no memory limit. + - You can also set the value in memory size. The value range is `0` and `[536870912, 9223372036854775807]` in bytes. The memory format with the units "KiB|MiB|GiB|TiB" is supported. For example, you can set this variable to `90GiB` (no space between the number and the unit). `0` means no memory limit. - If this variable is set to a memory size that is less than 512 MiB but not `0`, TiDB uses 512 MiB as the actual size. - This variable specifies the memory limit for a TiDB instance. When the memory usage of TiDB reaches the limit, TiDB cancels the currently running SQL statement with the highest memory usage. After the SQL statement is successfully canceled, TiDB tries to call Golang GC to immediately reclaim memory to relieve memory stress as soon as possible. - Only the SQL statements with more memory usage than the [`tidb_server_memory_limit_sess_min_size`](/system-variables.md#tidb_server_memory_limit_sess_min_size-new-in-v640) limit are selected as the SQL statements to be canceled first.