tikv config: document new resource-control configs for v8.5.6#23035
tikv config: document new resource-control configs for v8.5.6#23035mittalrishabh wants to merge 6 commits into
Conversation
Add 11 new configuration parameters to the resource-control section introduced by TiKV PRs cherry-picked into the v8.5.6 release: - bg-cpu-throttle-threshold / fg-cpu-throttle-threshold (CPU throttling) - bg-compaction-pressure-threshold / bg-write-io-ceiling / bg-write-io-floor (I/O throttling) - enable-fair-scheduling / enable-read-admission-control / enable-write-admission-control - historical-usage-window-mins / baseline-burst-pct / admission-max-delayed-count
|
Hi @mittalrishabh. Thanks for your PR. I'm waiting for a pingcap member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
rishabh mittal seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
There was a problem hiding this comment.
Code Review
This pull request adds documentation for several new TiKV configuration items introduced in v8.5.6 and v9.0.0, including CPU throttling thresholds, write I/O limits, fair scheduling, and admission control settings. The review feedback suggests style improvements across all these additions to adhere to the repository style guide, specifically by replacing passive voice with active voice, using the second person ("you") when addressing users, and standardizing formatting.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
|
||
| ### `bg-cpu-throttle-threshold` <span class="version-mark">New in v8.5.6 and v9.0.0</span> | ||
|
|
||
| + Specifies the CPU utilization percentage threshold at which background task throttling begins. When CPU utilization reaches this value, TiKV starts to reduce the resource budget allocated to background tasks (such as compaction and garbage collection). The background task budget scales linearly from full down to zero as CPU utilization increases from this threshold toward [`fg-cpu-throttle-threshold`](#fg-cpu-throttle-threshold). |
There was a problem hiding this comment.
To adhere to the repository style guide, we should avoid passive voice and wordy phrasing. Let's rewrite this description to use active voice and more precise terminology.
| + Specifies the CPU utilization percentage threshold at which background task throttling begins. When CPU utilization reaches this value, TiKV starts to reduce the resource budget allocated to background tasks (such as compaction and garbage collection). The background task budget scales linearly from full down to zero as CPU utilization increases from this threshold toward [`fg-cpu-throttle-threshold`](#fg-cpu-throttle-threshold). | |
| + Specifies the CPU utilization percentage threshold at which background task throttling begins. When CPU utilization reaches this value, TiKV starts reducing the resource budget for background tasks (such as compaction and garbage collection). The background task budget scales linearly from 100% to 0% as CPU utilization increases from this threshold toward [`fg-cpu-throttle-threshold`](#fg-cpu-throttle-threshold). |
References
- Avoid unnecessary words and passive voice. (link)
|
|
||
| ### `fg-cpu-throttle-threshold` <span class="version-mark">New in v8.5.6 and v9.0.0</span> | ||
|
|
||
| + Specifies the CPU utilization percentage threshold above which foreground traffic protection is fully activated. When CPU utilization reaches this value, background tasks are completely throttled to their minimum floor and the background utilization budget is capped at this value. This threshold must be greater than [`bg-cpu-throttle-threshold`](#bg-cpu-throttle-threshold). |
There was a problem hiding this comment.
To adhere to the repository style guide, we should avoid passive voice. Let's rewrite this description to use active voice.
| + Specifies the CPU utilization percentage threshold above which foreground traffic protection is fully activated. When CPU utilization reaches this value, background tasks are completely throttled to their minimum floor and the background utilization budget is capped at this value. This threshold must be greater than [`bg-cpu-throttle-threshold`](#bg-cpu-throttle-threshold). | |
| + Specifies the CPU utilization percentage threshold above which TiKV fully activates foreground traffic protection. When CPU utilization reaches this value, TiKV completely throttles background tasks to their minimum floor and caps the background utilization budget at this value. This threshold must be greater than [`bg-cpu-throttle-threshold`](#bg-cpu-throttle-threshold). |
References
- Avoid passive voice overuse. (link)
|
|
||
| ### `bg-compaction-pressure-threshold` <span class="version-mark">New in v8.5.6 and v9.0.0</span> | ||
|
|
||
| + Specifies the compaction pending bytes ratio threshold at which background write I/O throttling begins. Below this threshold, background write I/O ramps up toward [`bg-write-io-ceiling`](#bg-write-io-ceiling). At or above this threshold, background write I/O scales linearly down toward [`bg-write-io-floor`](#bg-write-io-floor) as compaction pressure approaches 100%. |
There was a problem hiding this comment.
To adhere to the repository style guide, we should avoid passive voice and informal phrasing like 'ramps up'. Let's rewrite this description to use active voice and more formal terminology.
| + Specifies the compaction pending bytes ratio threshold at which background write I/O throttling begins. Below this threshold, background write I/O ramps up toward [`bg-write-io-ceiling`](#bg-write-io-ceiling). At or above this threshold, background write I/O scales linearly down toward [`bg-write-io-floor`](#bg-write-io-floor) as compaction pressure approaches 100%. | |
| + Specifies the compaction pending bytes ratio threshold at which background write I/O throttling begins. Below this threshold, background write I/O increases toward [`bg-write-io-ceiling`](#bg-write-io-ceiling). At or above this threshold, TiKV scales background write I/O linearly down toward [`bg-write-io-floor`](#bg-write-io-floor) as compaction pressure approaches 100%. |
References
- Avoid passive voice and use consistent, clear terminology. (link)
|
|
||
| ### `bg-write-io-ceiling` <span class="version-mark">New in v8.5.6 and v9.0.0</span> | ||
|
|
||
| + Specifies the maximum write I/O rate allowed for background tasks when compaction pressure is below [`bg-compaction-pressure-threshold`](#bg-compaction-pressure-threshold). |
There was a problem hiding this comment.
To adhere to the repository style guide, we should avoid passive voice. Let's rewrite this description to use active voice.
| + Specifies the maximum write I/O rate allowed for background tasks when compaction pressure is below [`bg-compaction-pressure-threshold`](#bg-compaction-pressure-threshold). | |
| + Specifies the maximum write I/O rate for background tasks when compaction pressure is below [`bg-compaction-pressure-threshold`](#bg-compaction-pressure-threshold). |
References
- Avoid passive voice overuse. (link)
|
|
||
| ### `bg-write-io-floor` <span class="version-mark">New in v8.5.6 and v9.0.0</span> | ||
|
|
||
| + Specifies the minimum write I/O rate guaranteed to background tasks even at maximum compaction pressure. This floor prevents background tasks from being starved completely. |
There was a problem hiding this comment.
To adhere to the repository style guide, we should avoid passive voice. Let's rewrite this description to use active voice.
| + Specifies the minimum write I/O rate guaranteed to background tasks even at maximum compaction pressure. This floor prevents background tasks from being starved completely. | |
| + Specifies the minimum write I/O rate that TiKV guarantees for background tasks even at maximum compaction pressure. This floor prevents background task starvation. |
References
- Avoid passive voice overuse. (link)
|
|
||
| ### `enable-read-admission-control` <span class="version-mark">New in v8.5.6 and v9.0.0</span> | ||
|
|
||
| + Controls whether to enable admission control for read requests. When enabled, read requests from over-baseline resource groups are delayed or rejected with `SchedTooBusy` when CPU utilization exceeds [`fg-cpu-throttle-threshold`](#fg-cpu-throttle-threshold). This configuration takes effect only when [`enable-fair-scheduling`](#enable-fair-scheduling) is also enabled. |
There was a problem hiding this comment.
To adhere to the repository style guide, we should avoid passive voice and write in the second person ('you') when addressing users. Let's rewrite this description to use active voice and second person.
| + Controls whether to enable admission control for read requests. When enabled, read requests from over-baseline resource groups are delayed or rejected with `SchedTooBusy` when CPU utilization exceeds [`fg-cpu-throttle-threshold`](#fg-cpu-throttle-threshold). This configuration takes effect only when [`enable-fair-scheduling`](#enable-fair-scheduling) is also enabled. | |
| + Controls whether to enable admission control for read requests. When you enable this feature, TiKV delays or rejects read requests from over-baseline resource groups with `SchedTooBusy` when CPU utilization exceeds [`fg-cpu-throttle-threshold`](#fg-cpu-throttle-threshold). This configuration takes effect only when you also enable [`enable-fair-scheduling`](#enable-fair-scheduling). |
References
- Avoid passive voice and write in second person ('you') when addressing users. (link)
|
|
||
| ### `enable-write-admission-control` <span class="version-mark">New in v8.5.6 and v9.0.0</span> | ||
|
|
||
| + Controls whether to enable admission control for write requests. When enabled, write requests from over-baseline resource groups are delayed or rejected with `SchedTooBusy` when CPU utilization exceeds [`fg-cpu-throttle-threshold`](#fg-cpu-throttle-threshold). This configuration takes effect only when [`enable-fair-scheduling`](#enable-fair-scheduling) is also enabled. |
There was a problem hiding this comment.
To adhere to the repository style guide, we should avoid passive voice and write in the second person ('you') when addressing users. Let's rewrite this description to use active voice and second person.
| + Controls whether to enable admission control for write requests. When enabled, write requests from over-baseline resource groups are delayed or rejected with `SchedTooBusy` when CPU utilization exceeds [`fg-cpu-throttle-threshold`](#fg-cpu-throttle-threshold). This configuration takes effect only when [`enable-fair-scheduling`](#enable-fair-scheduling) is also enabled. | |
| + Controls whether to enable admission control for write requests. When you enable this feature, TiKV delays or rejects write requests from over-baseline resource groups with `SchedTooBusy` when CPU utilization exceeds [`fg-cpu-throttle-threshold`](#fg-cpu-throttle-threshold). This configuration takes effect only when you also enable [`enable-fair-scheduling`](#enable-fair-scheduling). |
References
- Avoid passive voice and write in second person ('you') when addressing users. (link)
- Floor is 1 CPU core, not zero (per worker.rs:304-309) - Clarify 'background tasks' links to resource control background task types (import, br, ddl, stats) not internal compaction/GC
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…nding-compaction-bytes-limit
Add 11 new configuration parameters to the resource-control section introduced by TiKV PRs cherry-picked into the v8.5.6 release:
First-time contributors' checklist
What is changed, added or deleted? (Required)
Which TiDB version(s) do your changes apply to? (Required)
Tips for choosing the affected version(s):
By default, CHOOSE MASTER ONLY so your changes will be applied to the next TiDB major or minor releases. If your PR involves a product feature behavior change or a compatibility change, CHOOSE THE AFFECTED RELEASE BRANCH(ES) AND MASTER.
For details, see tips for choosing the affected versions.
What is the related PR or file link(s)?
Do your changes match any of the following descriptions?