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
raftstore: remove nested loop replica read queue #6396
Merged
Merged
Conversation
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
Signed-off-by: qupeng <qupeng@pingcap.com>
/run-all-tests |
/bench |
hicqu
force-pushed
the
read-index-improve
branch
from
January 2, 2020 13:58
8359e1d
to
70bf7d9
Compare
/bench |
/run-all-tests |
hicqu
added
priority/high
Priority: High
type/enhancement
Type: Issue - Enhancement
priority/release-blocker
This PR blocks a release. Please review it ASAP.
needs-cherry-pick-release-3.1
Type: Need cherry pick to release 3.1
labels
Jan 3, 2020
/run-all-tests |
BusyJay
reviewed
Jan 3, 2020
/run-all-tests |
/bench |
Signed-off-by: qupeng <qupeng@pingcap.com>
nolouch
reviewed
Jan 3, 2020
Signed-off-by: qupeng <qupeng@pingcap.com>
Benchmark Report
@@ Benchmark Diff @@
================================================================================
tidb: d07728468f31e228d3c0e2c3506e766c509179c9
--- tikv: 535ac80b66050c3d624838719cc65fe850ee5f9e
+++ tikv: dc310d139781b246d126a21e68c2087e317dd360
pd: 0ebe3f829ca87227862edb66d83b6c76100a0967
================================================================================
oltp_update_index:
* QPS: 4250.43 ± 0.48% (std=13.77) delta: -0.28% (p=0.281)
* Latency p50: 30.11 ± 0.48% (std=0.10) delta: 0.29%
* Latency p99: 53.62 ± 4.09% (std=1.44) delta: 3.24%
oltp_insert:
* QPS: 7540.31 ± 0.67% (std=33.42) delta: -0.26% (p=0.674)
* Latency p50: 16.97 ± 0.66% (std=0.07) delta: 0.24%
* Latency p99: 29.47 ± 4.56% (std=0.89) delta: 0.95%
oltp_read_write:
* QPS: 15838.44 ± 0.31% (std=33.17) delta: 0.28% (p=0.407)
* Latency p50: 162.00 ± 0.32% (std=0.34) delta: -0.24%
* Latency p99: 327.55 ± 3.17% (std=7.68) delta: 3.53%
oltp_point_select:
* QPS: 42924.78 ± 0.42% (std=125.15) delta: 0.00% (p=0.996)
* Latency p50: 2.98 ± 0.22% (std=0.00) delta: -0.03%
* Latency p99: 9.69 ± 3.12% (std=0.23) delta: -0.39%
oltp_update_non_index:
* QPS: 4753.87 ± 0.04% (std=1.30) delta: 0.29% (p=0.375)
* Latency p50: 26.92 ± 0.05% (std=0.01) delta: -0.29%
* Latency p99: 40.37 ± 0.00% (std=0.00) delta: -3.58%
|
Signed-off-by: qupeng <qupeng@pingcap.com>
Signed-off-by: qupeng <qupeng@pingcap.com>
/run-all-tests |
Signed-off-by: qupeng <qupeng@pingcap.com>
BusyJay
reviewed
Jan 8, 2020
Signed-off-by: qupeng <qupeng@pingcap.com>
hicqu
force-pushed
the
read-index-improve
branch
from
January 8, 2020 11:09
15b4c9b
to
0dcb06a
Compare
BusyJay
reviewed
Jan 8, 2020
Signed-off-by: qupeng <qupeng@pingcap.com>
Signed-off-by: qupeng <qupeng@pingcap.com>
Signed-off-by: qupeng <qupeng@pingcap.com>
hicqu
force-pushed
the
read-index-improve
branch
from
January 9, 2020 06:55
405f784
to
3466a51
Compare
/run-all-tests |
BusyJay
approved these changes
Jan 9, 2020
/run-all-tests |
1 similar comment
/run-all-tests |
/run-all-tests |
Signed-off-by: qupeng <qupeng@pingcap.com>
hicqu
force-pushed
the
read-index-improve
branch
from
January 9, 2020 08:42
122fdd1
to
572efd3
Compare
cherry pick to release-3.1 failed |
hicqu
added a commit
to hicqu/tikv
that referenced
this pull request
Jan 9, 2020
Signed-off-by: qupeng <qupeng@pingcap.com>
AndreMouche
pushed a commit
that referenced
this pull request
Feb 4, 2020
solotzg
pushed a commit
to pingcap/tidb-engine-ext
that referenced
this pull request
Feb 4, 2020
c1ay
pushed a commit
to c1ay/tikv
that referenced
this pull request
May 9, 2020
Signed-off-by: qupeng <qupeng@pingcap.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
needs-cherry-pick-release-3.1
Type: Need cherry pick to release 3.1
priority/high
Priority: High
priority/release-blocker
This PR blocks a release. Please review it ASAP.
type/enhancement
Type: Issue - Enhancement
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.
Signed-off-by: qupeng qupeng@pingcap.com
What have you changed?
Avoid to use nested loop in replica read queue to improve performance, and simplify algorithm.
Close #6399 .
What is the type of the changes?
Engeering.
How is the PR tested?
Unit tests.
Does this PR affect documentation (docs) or should it be mentioned in the release notes?
No.
Does this PR affect
tidb-ansible
?No.
Refer to a related PR or issue link (optional)
Benchmark result if necessary (optional)
For using
HashMap::get
to replaceVec::get
, benchmark shows that if the element count is greater than 9,HashMap
will be better. So the change is reasonable. And removing nestedfor
loop will make it better.Any examples? (optional)