Skip to content

Commit

Permalink
Change tidb_memory_usage_alarm_ratio scope to instance (#5988) (#5992)
Browse files Browse the repository at this point in the history
  • Loading branch information
ti-chi-bot committed Jul 16, 2021
1 parent e3dcb45 commit 9445ac6
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions system-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,13 @@ 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).

### 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).

### tidb_metric_query_range_duration <span class="version-mark">New in v4.0</span>

- Scope: SESSION
Expand Down Expand Up @@ -901,10 +908,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).

0 comments on commit 9445ac6

Please sign in to comment.