Skip to content

tikv config: document new resource-control configs for v8.5.6#23035

Open
mittalrishabh wants to merge 6 commits into
pingcap:masterfrom
mittalrishabh:tikv-8.5-resource-control-configs
Open

tikv config: document new resource-control configs for v8.5.6#23035
mittalrishabh wants to merge 6 commits into
pingcap:masterfrom
mittalrishabh:tikv-8.5-resource-control-configs

Conversation

@mittalrishabh

Copy link
Copy Markdown
Contributor

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

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.

  • master (the latest development version)
  • v9.0 (TiDB 9.0 versions)
  • v8.5 (TiDB 8.5 versions)
  • v8.1 (TiDB 8.1 versions)
  • v7.5 (TiDB 7.5 versions)
  • v7.1 (TiDB 7.1 versions)
  • v6.5 (TiDB 6.5 versions)
  • v6.1 (TiDB 6.1 versions)

What is the related PR or file link(s)?

  • This PR is translated from:
  • Other reference link(s):

Do your changes match any of the following descriptions?

  • Delete files
  • Change aliases
  • Need modification after applied to another branch
  • Might cause conflicts after applied to another branch

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
@ti-chi-bot ti-chi-bot Bot added contribution This PR is from a community contributor. needs-ok-to-test Indicates a PR created by contributors and need ORG member send '/ok-to-test' to start testing. labels Jun 10, 2026
@ti-chi-bot

ti-chi-bot Bot commented Jun 10, 2026

Copy link
Copy Markdown

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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions 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.

@ti-chi-bot ti-chi-bot Bot added the missing-translation-status This PR does not have translation status info. label Jun 10, 2026
@ti-chi-bot

ti-chi-bot Bot commented Jun 10, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign jackysp for approval. For more information see the Code Review Process.
Please ensure that each of them provides their approval before proceeding.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@pingcap-cla-assistant

pingcap-cla-assistant Bot commented Jun 10, 2026

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ mittalrishabh
❌ rishabh mittal


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.

@ti-chi-bot ti-chi-bot Bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jun 10, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread tikv-configuration-file.md Outdated

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

low

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.

Suggested change
+ 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
  1. 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).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

low

To adhere to the repository style guide, we should avoid passive voice. Let's rewrite this description to use active voice.

Suggested change
+ 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
  1. Avoid passive voice overuse. (link)

Comment thread tikv-configuration-file.md Outdated

### `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%.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

low

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.

Suggested change
+ 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
  1. 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).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

low

To adhere to the repository style guide, we should avoid passive voice. Let's rewrite this description to use active voice.

Suggested change
+ 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
  1. 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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

low

To adhere to the repository style guide, we should avoid passive voice. Let's rewrite this description to use active voice.

Suggested change
+ 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
  1. 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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

low

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.

Suggested change
+ 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
  1. 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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

low

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.

Suggested change
+ 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
  1. Avoid passive voice and write in second person ('you') when addressing users. (link)

Comment thread tikv-configuration-file.md Outdated
Comment thread tikv-configuration-file.md Outdated
Comment thread tikv-configuration-file.md Outdated
rishabh mittal and others added 5 commits June 10, 2026 16:29
- 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contribution This PR is from a community contributor. missing-translation-status This PR does not have translation status info. needs-ok-to-test Indicates a PR created by contributors and need ORG member send '/ok-to-test' to start testing. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant