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

Scheduler metrics: binding rate limiter saturation rate #17673

Merged
merged 4 commits into from
Dec 5, 2015

Conversation

hongchaodeng
Copy link
Contributor

This PR exposes the pod binding rate. We are exposing it because there is a rate limiter. We want to measure and see how long before it becomes a bottleneck.

@k8s-bot
Copy link

k8s-bot commented Nov 23, 2015

Can one of the admins verify that this patch is reasonable to test? (reply "ok to test", or if you trust the user, reply "add to whitelist")

If this message is too spammy, please complain to ixdy.

1 similar comment
@k8s-bot
Copy link

k8s-bot commented Nov 23, 2015

Can one of the admins verify that this patch is reasonable to test? (reply "ok to test", or if you trust the user, reply "add to whitelist")

If this message is too spammy, please complain to ixdy.

@k8s-github-robot
Copy link

Labelling this PR as size/M

@k8s-github-robot k8s-github-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Nov 23, 2015
@@ -107,6 +107,13 @@ func New(c *Config) *Scheduler {

// Run begins watching and scheduling. It starts a goroutine and returns immediately.
func (s *Scheduler) Run() {
go func() {
Copy link
Contributor

Choose a reason for hiding this comment

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

can we move this to metrics.go and add a func called ReportRateLoop or something like that?

@k8s-github-robot
Copy link

Labelling this PR as size/S

@k8s-github-robot k8s-github-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 23, 2015
@k8s-github-robot
Copy link

Labelling this PR as size/M

@k8s-github-robot k8s-github-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Nov 23, 2015
@hongchaodeng hongchaodeng changed the title Metrics: expose pod binding rate [WIP] Metrics: expose pod binding rate Nov 24, 2015
@hongchaodeng
Copy link
Contributor Author

Made some wrong assumptions on rate limiter.
Working on better solutions now.

@hongchaodeng
Copy link
Contributor Author

Once juju/ratelimit#10 is merged, I should be able to continue on this work:

  • bump up juju/ratelimit version
  • expose Available() and Capacity() and use it to export rate limiter's saturation metrics

@davidopp
Copy link
Member

@wojtek-t

@davidopp davidopp assigned wojtek-t and unassigned davidopp Nov 24, 2015
@davidopp
Copy link
Member

@gmarek

"github.com/prometheus/client_golang/prometheus"
)

const schedulerSubsystem = "scheduler"

var BindingRateObserveInterval = 200 * time.Millisecond
Copy link
Member

Choose a reason for hiding this comment

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

make it const

@k8s-github-robot k8s-github-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 26, 2015
@wojtek-t
Copy link
Member

@hongchaodeng - what's the status of it? Do you want to proceed with it?

@hongchaodeng
Copy link
Contributor Author

@wojtek-t
I'm currently using it along with other metrics for insights.
Let's just close this.
I will send it in another PR once I have more complete story.
Thanks!

@xiang90
Copy link
Contributor

xiang90 commented Nov 30, 2015

@hongchaodeng I think we should push in the rate limiter saturation metrics anyway.

@wojtek-t
Copy link
Member

wojtek-t commented Dec 2, 2015

Thanks - LGTM

@wojtek-t wojtek-t closed this Dec 2, 2015
@wojtek-t wojtek-t reopened this Dec 2, 2015
@wojtek-t wojtek-t added lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-merge labels Dec 3, 2015
@wojtek-t
Copy link
Member

wojtek-t commented Dec 3, 2015

@k8s-bot ok to test

@k8s-bot
Copy link

k8s-bot commented Dec 3, 2015

GCE e2e test build/test passed for commit ee39839d8ec7ab3e2fd9d6061c4e6645c8911975.

@gmarek
Copy link
Contributor

gmarek commented Dec 3, 2015

Test failure looks like a real thing:

I1203 08:30:12.853367   22739 factory.go:173] creating scheduler with fit predicates 'map[NoDiskConflict:{} MatchNodeSelector:{} HostName:{} PodFitsHostPorts:{} PodFitsResources:{}]' and priority functions 'map[LeastRequestedPriority:{} BalancedResourceAllocation:{} SelectorSpreadPriority:{}]
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x28 pc=0x745de1]

goroutine 55 [running]:
k8s.io/kubernetes/plugin/pkg/scheduler.func·002()
    /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/plugin/pkg/scheduler/scheduler.go:111 +0x41
k8s.io/kubernetes/pkg/util.func·006()
    /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/util.go:126 +0x61
k8s.io/kubernetes/pkg/util.Until(0xc2088fc1a0, 0x3b9aca00, 0xc20804c480)
    /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/util.go:127 +0x8f
k8s.io/kubernetes/pkg/util.Forever(0xc2088fc1a0, 0x3b9aca00)
    /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/pkg/util/util.go:109 +0x3e
created by k8s.io/kubernetes/plugin/pkg/scheduler.(*Scheduler).Run
    /workspace/kubernetes/_output/local/go/src/k8s.io/kubernetes/plugin/pkg/scheduler/scheduler.go:113 +0xa7

@gmarek gmarek removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 3, 2015
@hongchaodeng
Copy link
Contributor Author

How to reproduce that?

@gmarek
Copy link
Contributor

gmarek commented Dec 3, 2015

It happened during the integration test, so hack/test-integration.sh should do the trick.

@hongchaodeng
Copy link
Contributor Author

ratelimiter could be nil. See:

schedulerConfigFactory := factory.NewConfigFactory(restClient, nil)

We should add a caveat comment.

@hongchaodeng
Copy link
Contributor Author

Fixed and tested
@gmarek

@k8s-bot
Copy link

k8s-bot commented Dec 3, 2015

GCE e2e test build/test passed for commit c4fdb7a.

@wojtek-t
Copy link
Member

wojtek-t commented Dec 3, 2015

@hongchaodeng - thanks!

LGTM

@wojtek-t wojtek-t added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 3, 2015
@k8s-github-robot
Copy link

@k8s-bot test this [submit-queue is verifying that this PR is safe to merge]

@k8s-bot
Copy link

k8s-bot commented Dec 4, 2015

GCE e2e build/test failed for commit c4fdb7a.

@gmarek
Copy link
Contributor

gmarek commented Dec 4, 2015

@k8s-bot test this

@k8s-bot
Copy link

k8s-bot commented Dec 4, 2015

GCE e2e test build/test passed for commit c4fdb7a.

@k8s-github-robot
Copy link

@k8s-bot test this [submit-queue is verifying that this PR is safe to merge]

@k8s-bot
Copy link

k8s-bot commented Dec 5, 2015

GCE e2e test build/test passed for commit c4fdb7a.

@k8s-github-robot
Copy link

Automatic merge from submit-queue

k8s-github-robot pushed a commit that referenced this pull request Dec 5, 2015
@k8s-github-robot k8s-github-robot merged commit 3180b00 into kubernetes:master Dec 5, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.