-
Notifications
You must be signed in to change notification settings - Fork 657
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v6.2: add doc for auto analyze auto tune support #9630
Merged
ti-chi-bot
merged 6 commits into
pingcap:master
from
TomShawn:auto-analyze-auto-tune-support-6.2
Aug 5, 2022
Merged
Changes from 5 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
bf4eda6
v6.2: add doc for auto analyze auto tune support
TomShawn bd23673
update
TomShawn b4e5b77
add best practices and remove experimental for foreground
TomShawn 594a8da
Update sql-statement-show-config.md
TomShawn 02fdd1c
Merge branch 'master' into pr/9630
TomShawn e3a4ddc
Apply suggestions from code review
TomShawn File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1660,33 +1660,76 @@ For pessimistic transaction usage, refer to [TiDB Pessimistic Transaction Mode]( | |
|
||
Configuration items related to Quota Limiter. | ||
|
||
Suppose that your machine on which TiKV is deployed has limited resources, for example, with only 4v CPU and 16 G memory. In this situation, the foreground of TiKV might process too many read and write requests so that the CPU resources used by the background are occupied to help process such requests, which affects the performance stability of TiKV. To avoid this situation, you can use the quota-related configuration items to limit the CPU resources to be used by the foreground. When a request triggers Quota Limiter, the request is forced to wait for a while for TiKV to free up CPU resources. The exact waiting time depends on the number of requests, and the maximum waiting time is no longer than the value of [`max-delay-duration`](#max-delay-duration-new-in-v600). | ||
### `max-delay-duration` <span class="version-mark">New in v6.0.0</span> | ||
|
||
> **Warning:** | ||
> | ||
> - Quota Limiter is an experimental feature introduced in TiDB v6.0.0, and it is **NOT** recommended to use it in the production environment. | ||
> - This feature is only suitable for environments with limited resources to ensure that TiKV can run stably in those environments. If you enable this feature in an environment with rich resources, performance degradation might occur when the amount of requests reaches a peak. | ||
+ The maximum time that a single read or write request is forced to wait before it is processed in the foreground. | ||
+ Default value: `500ms` | ||
+ Recommended setting: It is recommended to use the default value in most cases. If out of memory (OOM) or violent performance jitter occurs in the instance, you can set the value to 1S to make the request waiting time shorter than 1 second. | ||
|
||
### Foreground Quota Limiter | ||
|
||
Configuration items related to foreground Quota Limiter. | ||
|
||
Suppose that your machine on which TiKV is deployed has limited resources, for example, with only 4v CPU and 16 G memory. In this situation, the foreground of TiKV might process too many read and write requests so that the CPU resources used by the background are occupied to help process such requests, which affects the performance stability of TiKV. To avoid this situation, you can use the foreground quota-related configuration items to limit the CPU resources to be used by the foreground. When a request triggers Quota Limiter, the request is forced to wait for a while for TiKV to free up CPU resources. The exact waiting time depends on the number of requests, and the maximum waiting time is no longer than the value of [`max-delay-duration`](#max-delay-duration-new-in-v600). | ||
|
||
### `foreground-cpu-time` (new in v6.0.0) | ||
#### `foreground-cpu-time` <span class="version-mark">New in v6.0.0</span> | ||
|
||
+ The soft limit on the CPU resources used by TiKV foreground to process read and write requests. | ||
+ Default value: `0` (which means no limit) | ||
+ Unit: millicpu (for example, `1500` means that foreground requests consume 1.5v CPU) | ||
+ Unit: millicpu (for example, `1500` means that the foreground requests consume 1.5v CPU) | ||
+ Recommended setting: For the instance with more than 4 cores, use the default value `0`. For the instance with 4 cores, setting the value to the range of `1000` and `1500` can make a balance. For the instance with 2 cores, keep the value smaller than `1200`. | ||
|
||
### `foreground-write-bandwidth` (new in v6.0.0) | ||
#### `foreground-write-bandwidth` <span class="version-mark">New in v6.0.0</span> | ||
|
||
+ The soft limit on the bandwidth with which transactions write data. | ||
+ Default value: `0KB` (which means no limit) | ||
+ Recommended setting: Use the default value `0` in most cases unless the `foreground-cpu-time` setting is not enough to limit the write bandwidth. For such an exception, it is recommended to set the value smaller than 50M in the instance with 4 or less cores. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 把 50M 改成
TomShawn marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
### `foreground-read-bandwidth` (new in v6.0.0) | ||
#### `foreground-read-bandwidth` <span class="version-mark">New in v6.0.0</span> | ||
|
||
+ The soft limit on the bandwidth with which transactions and the Coprocessor read data. | ||
+ Default value: `0KB` (which means no limit) | ||
+ + Recommended setting: Use the default value `0` in most cases unless the `foreground-cpu-time` setting is not enough to limit the read bandwidth. For such an exception, it is recommended to set the value smaller than 20M in the instance with 4 or less cores. | ||
TomShawn marked this conversation as resolved.
Show resolved
Hide resolved
TomShawn marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
### `max-delay-duration` (new in v6.0.0) | ||
### Background Quota Limiter | ||
|
||
+ The maximum time that a single read or write request is forced to wait before it is processed in the foreground. | ||
+ Default value: `500ms` | ||
Configuration items related to background Quota Limiter. | ||
|
||
Suppose that your machine on which TiKV is deployed has limited resources, for example, with only 4v CPU and 16 G memory. In this situation, the background of TiKV might process too many calculations and read and write requests, so that the CPU resources used by the foreground are occupied to help process such requests, which affects the performance stability of TiKV. To avoid this situation, you can use the background quota-related configuration items to limit the CPU resources to be used by the background. When a request triggers Quota Limiter, the request is forced to wait for a while for TiKV to free up CPU resources. The exact waiting time depends on the number of requests, and the maximum waiting time is no longer than the value of [`max-delay-duration`](#max-delay-duration-new-in-v600). | ||
|
||
> **Warning:** | ||
> | ||
> - Background Quota Limiter is an experimental feature introduced in TiDB v6.2.0, and it is **NOT** recommended to use it in the production environment. | ||
> - This feature is only suitable for environments with limited resources to ensure that TiKV can run stably in those environments. If you enable this feature in an environment with rich resources, performance degradation might occur when the amount of requests reaches a peak. | ||
|
||
#### `background-cpu-time` <span class="version-mark">New in v6.2.0</span> | ||
|
||
+ The soft limit on the CPU resources used by TiKV background to process read and write requests. | ||
+ Default value: `0` (which means no limit) | ||
+ Unit: millicpu (for example, `1500` means that the background requests consume 1.5v CPU) | ||
|
||
#### `background-write-bandwidth` <span class="version-mark">New in v6.2.0</span> | ||
|
||
> **Note:** | ||
> | ||
> This configuration item is returned in the result of `SHOW CONFIG`, but currently setting it does not take any effect. | ||
|
||
+ The soft limit on the bandwidth with which background transactions write data. | ||
+ Default value: `0KB` (which means no limit) | ||
|
||
#### `background-read-bandwidth` <span class="version-mark">New in v6.2.0</span> | ||
|
||
> **Note:** | ||
> | ||
> This configuration item is returned in the result of `SHOW CONFIG`, but currently setting it does not take any effect. | ||
|
||
+ The soft limit on the bandwidth with which background transactions and the Coprocessor read data. | ||
+ Default value: `0KB` (which means no limit) | ||
|
||
#### `enable-auto-tune` <span class="version-mark">New in v6.2.0</span> | ||
|
||
+ Determines whether to enable the auto-tuning of quota. If this configuration item is enabled, TiKV dynamically adjusts the quota for the background requests based on the load of TiKV instances. | ||
+ Default value: `false` (which means that the auto-tuning is disabled) | ||
|
||
## causal-ts <span class="version-mark">New in v6.1.0</span> | ||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里的改动和 quota limiter GA 无关吧, 为什么会有这个?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
顺便改的,和 feature 无关,可以忽略