From 192964319d73df2e73e950cd986d57afd24e47a2 Mon Sep 17 00:00:00 2001 From: Liuxiaozhen12 <82579298+Liuxiaozhen12@users.noreply.github.com> Date: Fri, 16 Jul 2021 18:01:33 +0800 Subject: [PATCH 1/3] This is an automated cherry-pick of #5988 Signed-off-by: ti-chi-bot --- system-variables.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/system-variables.md b/system-variables.md index 3e3d830e8d255..a14439ac5cc59 100644 --- a/system-variables.md +++ b/system-variables.md @@ -548,6 +548,16 @@ Constraint checking is always performed in place for pessimistic transactions (d - This variable is used to set the threshold value of memory quota for a query. - If the memory quota of a query during execution exceeds the threshold value, TiDB performs the operation designated by the OOMAction option in the configuration file. The initial value of this variable is configured by [`mem-quota-query`](/tidb-configuration-file.md#mem-quota-query). +<<<<<<< HEAD +======= +### tidb_memory_usage_alarm_ratio + +- Scope: INSTANCE +- Default value: `0.8` +- TiDB triggers an alarm when the percentage of the memory it takes exceeds a certain threshold. For the detailed usage description of this feature, see [`memory-usage-alarm-ratio`](/tidb-configuration-file.md#memory-usage-alarm-ratio-new-in-v409). +- You can set the initial value of this variable by configuring [`memory-usage-alarm-ratio`](/tidb-configuration-file.md#memory-usage-alarm-ratio-new-in-v409). + +>>>>>>> 93009172f (Change tidb_memory_usage_alarm_ratio scope to instance (#5988)) ### tidb_metric_query_range_duration New in v4.0 - Scope: SESSION From 291d65180e2d8d42ab638c65ce31e797c1bcb13f Mon Sep 17 00:00:00 2001 From: TomShawn <41534398+TomShawn@users.noreply.github.com> Date: Fri, 16 Jul 2021 18:59:38 +0800 Subject: [PATCH 2/3] Update system-variables.md --- system-variables.md | 9 --------- 1 file changed, 9 deletions(-) diff --git a/system-variables.md b/system-variables.md index a14439ac5cc59..ac8c9ad46e961 100644 --- a/system-variables.md +++ b/system-variables.md @@ -548,8 +548,6 @@ Constraint checking is always performed in place for pessimistic transactions (d - This variable is used to set the threshold value of memory quota for a query. - If the memory quota of a query during execution exceeds the threshold value, TiDB performs the operation designated by the OOMAction option in the configuration file. The initial value of this variable is configured by [`mem-quota-query`](/tidb-configuration-file.md#mem-quota-query). -<<<<<<< HEAD -======= ### tidb_memory_usage_alarm_ratio - Scope: INSTANCE @@ -911,10 +909,3 @@ This variable is an alias for _transaction_isolation_. - Default value: ON - This variable controls whether to enable the dynamic memory control feature for the operator that reads data. By default, this operator enables the maximum number of threads that [`tidb_disql_scan_concurrency`](/system-variables.md#tidb_distsql_scan_concurrency) allows to read data. When the memory usage of a single SQL statement exceeds [`tidb_mem_quota_query`](/system-variables.md#tidb_mem_quota_query) each time, the operator that reads data stops one thread. - When the operator that reads data has only one thread left and the memory usage of a single SQL statement continues to exceed [`tidb_mem_quota_query`](/system-variables.md#tidb_mem_quota_query), this SQL statement triggers other memory control behaviors. - -### `tidb_memory_usage_alarm_ratio` - -- Scope: SESSION -- Default value: 0.8 -- TiDB triggers an alarm when the percentage of the memory it takes exceeds a certain threshold. For the detailed usage description of this feature, see [`memory-usage-alarm-ratio`](/tidb-configuration-file.md#memory-usage-alarm-ratio-new-in-v409). -- You can set the initial value of this variable by configuring [`memory-usage-alarm-ratio`](/tidb-configuration-file.md#memory-usage-alarm-ratio-new-in-v409). From edf5cb1baddf75ef506a606328b2d88c0c0fcd7b Mon Sep 17 00:00:00 2001 From: TomShawn <41534398+TomShawn@users.noreply.github.com> Date: Fri, 16 Jul 2021 18:59:59 +0800 Subject: [PATCH 3/3] Update system-variables.md --- system-variables.md | 1 - 1 file changed, 1 deletion(-) diff --git a/system-variables.md b/system-variables.md index ac8c9ad46e961..e45f99e70d1b6 100644 --- a/system-variables.md +++ b/system-variables.md @@ -555,7 +555,6 @@ Constraint checking is always performed in place for pessimistic transactions (d - TiDB triggers an alarm when the percentage of the memory it takes exceeds a certain threshold. For the detailed usage description of this feature, see [`memory-usage-alarm-ratio`](/tidb-configuration-file.md#memory-usage-alarm-ratio-new-in-v409). - You can set the initial value of this variable by configuring [`memory-usage-alarm-ratio`](/tidb-configuration-file.md#memory-usage-alarm-ratio-new-in-v409). ->>>>>>> 93009172f (Change tidb_memory_usage_alarm_ratio scope to instance (#5988)) ### tidb_metric_query_range_duration New in v4.0 - Scope: SESSION