copr: improve observability of total suspend time#19178
Merged
ti-chi-bot[bot] merged 2 commits intotikv:masterfrom Dec 10, 2025
Merged
copr: improve observability of total suspend time#19178ti-chi-bot[bot] merged 2 commits intotikv:masterfrom
ti-chi-bot[bot] merged 2 commits intotikv:masterfrom
Conversation
What’s changed? - Include coprocessor suspend time in the existing copr wait time metric - Add metrics for semaphore waiting time and the number of copr tasks waiting on the semaphore. Background: - `total_suspend_time` measures how long a coprocessor task is not actually being processed. This can be prolonged for several reasons, including YATP scheduling wait and waiting for the concurrency limiter semaphore. Previously, `total_suspend_time` was only visible in TiKV’s slow query logs. - Semaphore waiting is one of the main contributors to long suspend times. The concurrency limiter exists to prioritize completing a limited number of heavy tasks rather than spreading work thin across too many tasks, which could cause all of them to make slow progress. In this mechanism, when a copr task runs for more than 5 ms, it must acquire a semaphore permit before continuing. The total number of permits defaults to the number of CPU cores. Signed-off-by: Bisheng Huang <hbisheng@gmail.com>
glorv
approved these changes
Dec 9, 2025
Contributor
LykxSassinator
approved these changes
Dec 10, 2025
Contributor
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: glorv, hhwyt, LykxSassinator The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Contributor
|
/retest |
Member
Author
|
/retest |
2 similar comments
Member
Author
|
/retest |
Member
Author
|
/retest |
ti-chi-bot
pushed a commit
to ti-chi-bot/tikv
that referenced
this pull request
Dec 10, 2025
close tikv#19179 Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
9 tasks
Member
|
In response to a cherrypick label: new pull request created to branch |
ti-chi-bot bot
pushed a commit
that referenced
this pull request
Dec 11, 2025
close #19179 Changes: - Include coprocessor suspend time in the existing copr wait time metric - Add panels for semaphore waiting time and the number of copr tasks waiting on the semaphore. Background: - `total_suspend_time` measures how long a coprocessor task is not actually being processed. This can be prolonged for several reasons, including YATP scheduling wait and waiting for the concurrency limiter semaphore. Previously, `total_suspend_time` was only visible in TiKV’s slow query logs. - Semaphore waiting is one of the main contributors to long suspend times. The concurrency limiter exists to prioritize completing a limited number of heavy tasks rather than spreading work thin across too many tasks. In this mechanism, when a copr task runs for more than 5ms, it must acquire a semaphore permit before continuing. The total number of permits defaults to the number of CPU cores. Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io> Signed-off-by: Bisheng Huang <hbisheng@gmail.com> Co-authored-by: Bisheng Huang <hbisheng@gmail.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What is changed and how it works?
Issue Number: Close #19179
What's Changed:
Grafana example:

Related changes
pingcap/docs/pingcap/docs-cn:Check List
Tests
Side effects
Release note