Skip to content
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: add commit log duration metrics #5440

Merged
merged 2 commits into from Sep 11, 2019

Conversation

@NingLin-P
Copy link
Contributor

NingLin-P commented Sep 10, 2019

What have you changed?

add commit log duration metrics which spans from propose to committed

What is the type of the changes?

  • Improvement (a change which is an improvement to an existing feature)

How is the PR tested?

manual test

Does this PR affect documentation (docs) or should it be mentioned in the release notes?

No

Does this PR affect tidb-ansible?

pingcap/tidb-ansible#577

Refer to a related PR or issue link (optional)

close #5421

Signed-off-by: linning <linningde25@gmail.com>
@Connor1996

This comment has been minimized.

Copy link
Member

Connor1996 commented Sep 10, 2019

/bench

Copy link
Member

Connor1996 left a comment

LGTM

@@ -1318,6 +1318,11 @@ impl Peer {
if lease_to_be_updated {
let propose_time = self.find_propose_time(entry.get_index(), entry.get_term());
if let Some(propose_time) = propose_time {
ctx.raft_metrics.commit_log.observe(duration_to_sec(
(ctx.lease_time.unwrap_or_else(monotonic_raw_now) - propose_time)

This comment has been minimized.

Copy link
@siddontang

siddontang Sep 10, 2019

Contributor

why use lease time here?

This comment has been minimized.

Copy link
@NingLin-P

NingLin-P Sep 10, 2019

Author Contributor

you can see #5421 for the reason to use lease time

@sre-bot

This comment has been minimized.

Copy link
Collaborator

sre-bot commented Sep 10, 2019

@@                               Benchmark Diff                               @@
================================================================================
tidb: 0f2434660c509ec0b493d8c7ee0bbbf8e8549184
--- tikv: ff82aa9eba331585aec1c6cdf9e1584512bccb34
+++ tikv: 8ffba0e492bc24765a59eafb60eff83785ca8954
pd: ce060a9aeb66d6bbb39159243b879740dffae041
================================================================================
test-1: < oltp_insert >
    * QPS : 21368.48 ± 0.3703% (std=62.71) delta: 1.39%
    * AvgMs : 11.97 ± 0.3550% (std=0.03) delta: -1.38%
    * PercentileMs99 : 42.92 ± 1.0903% (std=0.38) delta: 0.00%
            
test-2: < oltp_update_non_index >
    * QPS : 29554.87 ± 0.2551% (std=50.41) delta: 0.01%
    * AvgMs : 8.66 ± 0.2541% (std=0.02) delta: 0.00%
    * PercentileMs99 : 30.59 ± 1.0788% (std=0.27) delta: -0.01%
            
test-3: < oltp_read_write >
    * QPS : 36978.99 ± 0.3229% (std=71.08) delta: 0.15%
    * AvgMs : 138.99 ± 0.2979% (std=0.25) delta: -0.15%
    * PercentileMs99 : 257.95 ± 0.0000% (std=0.00) delta: 0.00%
            
test-4: < oltp_point_select >
    * QPS : 75282.48 ± 1.4787% (std=730.39) delta: 1.39%
    * AvgMs : 3.40 ± 1.4706% (std=0.03) delta: -1.39%
    * PercentileMs99 : 7.43 ± 0.0000% (std=0.00) delta: -1.72%
            
test-5: < oltp_update_index >
    * QPS : 16938.31 ± 0.0801% (std=9.59) delta: 1.07%
    * AvgMs : 15.11 ± 0.0794% (std=0.01) delta: -1.06%
    * PercentileMs99 : 48.34 ± 0.0000% (std=0.00) delta: 0.00%
            

https://perf.pingcap.com

Copy link
Contributor

overvenus left a comment

LGTM, but before merging please make sure Grafana can display commit duration correctly.

@siddontang

This comment has been minimized.

Copy link
Contributor

siddontang commented Sep 11, 2019

em, why QPS increased?

@NingLin-P

This comment has been minimized.

Copy link
Contributor Author

NingLin-P commented Sep 11, 2019

em, why QPS increased?

don't know either ...

@NingLin-P

This comment has been minimized.

Copy link
Contributor Author

NingLin-P commented Sep 11, 2019

Grafana display the commit duration like this:
屏幕快照 2019-09-11 下午7 11 39

Copy link
Contributor

overvenus left a comment

👍

@sre-bot

This comment has been minimized.

Copy link
Collaborator

sre-bot commented Sep 11, 2019

/run-all-tests

@sre-bot sre-bot merged commit 2203e01 into tikv:master Sep 11, 2019
6 checks passed
6 checks passed
DCO All commits are signed off!
Details
idc-jenkins-ci-tikv/integration-common-test Jenkins job succeeded.
Details
idc-jenkins-ci-tikv/integration-compatibility-test Jenkins job succeeded.
Details
idc-jenkins-ci-tikv/integration-cop-push-down-test Jenkins job succeeded.
Details
idc-jenkins-ci-tikv/integration-ddl-test Jenkins job succeeded.
Details
idc-jenkins-ci/test Jenkins job succeeded.
Details
sticnarf pushed a commit to sticnarf/tikv that referenced this pull request Oct 27, 2019
Signed-off-by: linning <linningde25@gmail.com>
@BusyJay

This comment has been minimized.

Copy link
Contributor

BusyJay commented Nov 13, 2019

/run-cherry-picker

@sre-bot

This comment has been minimized.

Copy link
Collaborator

sre-bot commented Nov 13, 2019

cherry pick to release-3.0 failed

@sre-bot

This comment has been minimized.

Copy link
Collaborator

sre-bot commented Nov 13, 2019

cherry pick to release-3.1 failed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.