From f694dcf3e886127020ccf14cc0915abd655193be Mon Sep 17 00:00:00 2001 From: shichun-0415 Date: Mon, 16 Jan 2023 19:34:16 +0800 Subject: [PATCH 1/3] tiflash: update config description of max_memory_usage_for_all_queries --- tiflash/tiflash-configuration.md | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/tiflash/tiflash-configuration.md b/tiflash/tiflash-configuration.md index 7093b781e85e8..ef3cd2d95ba04 100644 --- a/tiflash/tiflash-configuration.md +++ b/tiflash/tiflash-configuration.md @@ -178,13 +178,19 @@ delta_index_cache_size = 0 ## see known issue [#5576](https://github.com/pingcap/tiflash/issues/5576). # dt_enable_logical_split = false - ## The memory usage limit for the generated intermediate data when a single - ## coprocessor query is executed. The default value is 0, which means no limit. + ## The memory usage limit for the generated intermediate data in a single query. + ## When the value is an integer, the unit is byte. For example, 34359738368 means 32 GiB of memory limit, and 0 means no limit. + ## When the value is a floating-point number in the range of [0.0, 1.0), it means the ratio of the allowed memory usage to the total memory of the node. For example, 0.8 means 80% of the total memory, and 0.0 means no limit. + ## The default value is 0, which means no limit. + ## When a query attempts to consume memory that exceeds the limit of this parameter, the query is terminated and an error is reported. max_memory_usage = 0 - ## The memory usage limit for the generated intermediate data when all queries - ## are executed. The default value is 0 (in bytes), which means no limit. - max_memory_usage_for_all_queries = 0 + ## The memory usage limit for the generated intermediate data in all queries. + ## When the value is an integer, the unit is byte. For example, 34359738368 means 32 GiB of memory limit, and 0 means no limit. + ## When the value is a floating-point number in the range of [0.0, 1.0), it means the ratio of the allowed memory usage to the total memory of the node. For example, 0.8 means 80% of the total memory, and 0.0 means no limit. + ## The default value is 0.8, which means 80% of the total memory. + ## When the queries attempt to consume memory that exceeds the limit of this parameter, the queries are terminated and an error is reported. + max_memory_usage_for_all_queries = 0.8 ## New in v5.0. This item specifies the maximum number of cop requests that TiFlash Coprocessor executes at the same time. If the number of requests exceeds the specified value, the exceeded requests will queue. If the configuration value is set to 0 or not set, the default value is used, which is twice the number of physical cores. cop_pool_size = 0 From dd8b54bbc3234b8d9e81d78d002769b3b0345978 Mon Sep 17 00:00:00 2001 From: shichun-0415 <89768198+shichun-0415@users.noreply.github.com> Date: Fri, 10 Feb 2023 19:46:47 +0800 Subject: [PATCH 2/3] Apply suggestions from code review Co-authored-by: Aolin --- tiflash/tiflash-configuration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tiflash/tiflash-configuration.md b/tiflash/tiflash-configuration.md index ef3cd2d95ba04..a0a69a87d5e1d 100644 --- a/tiflash/tiflash-configuration.md +++ b/tiflash/tiflash-configuration.md @@ -182,7 +182,7 @@ delta_index_cache_size = 0 ## When the value is an integer, the unit is byte. For example, 34359738368 means 32 GiB of memory limit, and 0 means no limit. ## When the value is a floating-point number in the range of [0.0, 1.0), it means the ratio of the allowed memory usage to the total memory of the node. For example, 0.8 means 80% of the total memory, and 0.0 means no limit. ## The default value is 0, which means no limit. - ## When a query attempts to consume memory that exceeds the limit of this parameter, the query is terminated and an error is reported. + ## When a query attempts to consume memory that exceeds the limit, the query is terminated and an error is reported. max_memory_usage = 0 ## The memory usage limit for the generated intermediate data in all queries. From 8d412cfaec74c42ed1c0b24bc5f3d0417d0746a3 Mon Sep 17 00:00:00 2001 From: shichun-0415 Date: Mon, 13 Feb 2023 10:51:15 +0800 Subject: [PATCH 3/3] consistency --- tiflash/tiflash-configuration.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tiflash/tiflash-configuration.md b/tiflash/tiflash-configuration.md index a0a69a87d5e1d..c8baacffbe157 100644 --- a/tiflash/tiflash-configuration.md +++ b/tiflash/tiflash-configuration.md @@ -182,14 +182,14 @@ delta_index_cache_size = 0 ## When the value is an integer, the unit is byte. For example, 34359738368 means 32 GiB of memory limit, and 0 means no limit. ## When the value is a floating-point number in the range of [0.0, 1.0), it means the ratio of the allowed memory usage to the total memory of the node. For example, 0.8 means 80% of the total memory, and 0.0 means no limit. ## The default value is 0, which means no limit. - ## When a query attempts to consume memory that exceeds the limit, the query is terminated and an error is reported. + ## When a query attempts to consume memory that exceeds this limit, the query is terminated and an error is reported. max_memory_usage = 0 ## The memory usage limit for the generated intermediate data in all queries. ## When the value is an integer, the unit is byte. For example, 34359738368 means 32 GiB of memory limit, and 0 means no limit. ## When the value is a floating-point number in the range of [0.0, 1.0), it means the ratio of the allowed memory usage to the total memory of the node. For example, 0.8 means 80% of the total memory, and 0.0 means no limit. ## The default value is 0.8, which means 80% of the total memory. - ## When the queries attempt to consume memory that exceeds the limit of this parameter, the queries are terminated and an error is reported. + ## When the queries attempt to consume memory that exceeds this limit, the queries are terminated and an error is reported. max_memory_usage_for_all_queries = 0.8 ## New in v5.0. This item specifies the maximum number of cop requests that TiFlash Coprocessor executes at the same time. If the number of requests exceeds the specified value, the exceeded requests will queue. If the configuration value is set to 0 or not set, the default value is used, which is twice the number of physical cores.