Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

tkashem
Copy link
Contributor

@tkashem tkashem commented Aug 20, 2020

What type of PR is this?
/kind bug

What this PR does / why we need it:
etcd_request_duration_seconds uses the default buckets provided by prometheus client library.
DefBuckets = []float64{.005, .01, .025, .05, .1, .25, .5, 1, 2.5, 5, 10}
The maximum bucket size is 10s. On the other hand, apiserver_request_duration_seconds uses more fine grained bucket sizes and the maximum bucket size is 60s

image

The left panel shows latency for Deployment-DELETE api (metric=apiserver_request_duration_seconds), this is taking about 40s to complete. On the other hand, etcd latency (metric=etcd_request_duration_seconds) for the same object apps.Deployment-delete is capped at 10s. Now the difference in latency is hard to account for. It cloud be latency from ectd but we can't answer this question by looking at the metrics.

If the etcd metric has similar bucket sizes, we could account for the difference in latency.

This PR makes the bucket sizes for both metrics similar. Also, no existing bucket for etcd_request_duration_seconds was dropped.

Does this PR introduce a user-facing change?:

NONE

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:

NONE

Make similar buckets for the apiserver_request_duration_seconds and
the etcd_request_duration_seconds histogram so that the result is
more comparable side by side.

etcd_request_duration_seconds uses the default buckets provided by
prometheus client library:
DefBuckets = []float64{.005, .01, .025, .05, .1, .25, .5, 1, 2.5, 5, 10}

apiserver_request_duration_seconds on the other hand uses more fine
grained buckets, and the maximum bucket size is 60s. Both histograms
should use similar bucket sizes so they are more comparable side by side.
@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/bug Categorizes issue or PR as related to a bug. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Aug 20, 2020
@k8s-ci-robot
Copy link
Contributor

Hi @tkashem. Thanks for your PR.

I'm waiting for a kubernetes 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.

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/test-infra repository.

@k8s-ci-robot k8s-ci-robot added area/apiserver sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/instrumentation Categorizes an issue or PR as relevant to SIG Instrumentation. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Aug 20, 2020
@tkashem
Copy link
Contributor Author

tkashem commented Aug 20, 2020

/assign @brancz

@tkashem
Copy link
Contributor Author

tkashem commented Aug 20, 2020

/assign @wojtek-t

@fedebongio
Copy link
Contributor

/assign @logicalhan

@hexfusion
Copy link

+1 this makes a lot of sense to me, thanks for doing this @tkashem

Copy link
Member

@logicalhan logicalhan left a comment

Choose a reason for hiding this comment

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

/lgtm

/cc @brancz
(since we're changing buckets)

@k8s-ci-robot k8s-ci-robot requested a review from brancz August 20, 2020 20:49
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 20, 2020
@wojtek-t
Copy link
Member

I'm fine with it, but I will wait with approving for @brancz comment.

/assign @brancz

@sttts
Copy link
Contributor

sttts commented Aug 27, 2020

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 27, 2020
@s-urbaniak
Copy link
Contributor

hey 👋 afaik @brancz is currently still vacationing :-)

@metalmatze
Copy link

I like this a lot. We have latencies on our dashboards for the API server and etcd too but didn't try to correlate those just yet. If we can make this change, this will become a lot easier indeed. 💯

@squat
Copy link

squat commented Aug 27, 2020

Looks great! This would be very handy (:

@s-urbaniak
Copy link
Contributor

/approve

also from my side 👍 (not sure if that approval works or not)

@brancz
Copy link
Member

brancz commented Sep 2, 2020

Looks good from instrumentation side.

/lgtm

@brancz
Copy link
Member

brancz commented Sep 2, 2020

/assign @lavalamp

@wojtek-t wojtek-t self-assigned this Sep 2, 2020
@wojtek-t
Copy link
Member

wojtek-t commented Sep 2, 2020

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: s-urbaniak, tkashem, wojtek-t

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

The pull request process is described here

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 2, 2020
@lavalamp
Copy link
Contributor

lavalamp commented Sep 2, 2020

/lgtm
/milestone v1.20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/apiserver cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note-none Denotes a PR that doesn't merit a release note. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/instrumentation Categorizes an issue or PR as relevant to SIG Instrumentation. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.