-
Notifications
You must be signed in to change notification settings - Fork 696
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
Add latency formula #9763
Add latency formula #9763
Conversation
Signed-off-by: you06 <[email protected]>
Signed-off-by: you06 <[email protected]>
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
Signed-off-by: you06 <[email protected]>
Signed-off-by: you06 <[email protected]>
Signed-off-by: you06 <[email protected]>
Signed-off-by: you06 <[email protected]>
Signed-off-by: you06 <[email protected]>
Signed-off-by: you06 <[email protected]>
Signed-off-by: you06 <[email protected]>
latency-breakdown.md
Outdated
prewrite_ratio = ceil( | ||
sum(rate(tidb_tikvclient_txn_regions_num_sum{type="2pc_prewrite"})) / | ||
sum(rate(tidb_tikvclient_txn_regions_num_count{type="2pc_prewrite"})) / | ||
128 |
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.
This should be explained (committer-concurrency
)
latency-breakdown.md
Outdated
) | ||
``` | ||
|
||
TiKV supports Async IO Raft since v5.3.0, which changes the process of commit. |
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.
Let's clarify it's not enabled by default. It's enabled when store-io-pool-size
> 0
Signed-off-by: you06 <[email protected]>
Signed-off-by: you06 <[email protected]>
latency-breakdown.md
Outdated
@@ -683,7 +763,7 @@ async io enabled commit = max( | |||
) | |||
``` | |||
|
|||
TiKV supports Async IO Raft since v5.3.0(only enabled when [`store-io-pool-size > 0`](/tikv-configuration-file.md#store-io-pool-size-new-in-v530)), which changes the process of commit. | |||
Since v5.3.0, TiKV supports Async IO Raft, which only enabled when setting the [`store-io-pool-size`](/tikv-configuration-file.md#store-io-pool-size-new-in-v530) as a positive value, which changes the process of commit. The `persist log locally duration` and `wait by write worker duration` are calculated as: |
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.
What is Async IO? "Async IO" is not introduced in the store-io-pool-size
configuration item.
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.
"Async IO" means handle writes of committing Raft log by a "StoreWriter thread pool", I'll change it.
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.
Because "Async IO" is used frequently between developers, I kept it and added a description.
82d1522
to
6285301
Compare
@you06 @ran-huang Preview link is here |
Signed-off-by: you06 <[email protected]>
latency-breakdown.md
Outdated
|
||
# Latency Breakdown | ||
|
||
This document breaks down the latency into metrics and then analyzes it from the user's perspective, which provides you with a deep insight into time cost during TiDB SQL queries. This is a guide to TiDB's critical path diagnosis. |
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.
-
Can you briefly define "latency"? What does it mean in this doc?
-
Give your readers a bird's-eye view of the whole doc. For example:
This document analyzes TiDB latency from xx aspects: - General SQL layer - Read queries - ...
|
||
## Read queries | ||
|
||
Read queries have only a single process form. |
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.
I don't understand "single process form". Can you explain it?
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.
What I mean is there is only one form for processing read requests, and there are no extra works after the read process.
Signed-off-by: you06 <[email protected]>
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.
LGTM
/merge |
@Oreoxmt: In response to this:
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 ti-community-infra/tichi repository. |
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.
LGTM
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 321d6f6
|
First-time contributors' checklist
What is changed, added or deleted? (Required)
Add a document about query latency breakdown.
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?