Skip to content

Change storeToNodeConditionLister to return []*api.Node instead of api.NodeList for performance#28781

Merged
k8s-github-robot merged 1 commit intokubernetes:masterfrom
wojtek-t:optimize_priorities_2
Jul 12, 2016
Merged

Change storeToNodeConditionLister to return []*api.Node instead of api.NodeList for performance#28781
k8s-github-robot merged 1 commit intokubernetes:masterfrom
wojtek-t:optimize_priorities_2

Conversation

@wojtek-t
Copy link
Copy Markdown
Member

Currently copies that are made while copying/creating api.NodeList are significant part of scheduler profile, and a bunch of them are made in places, that are not-parallelizable.
Ref #28590

@wojtek-t wojtek-t added do-not-merge DEPRECATED. Indicates that a PR should not merge. Label can only be manually applied/removed. release-note-none Denotes a PR that doesn't merit a release note. labels Jul 11, 2016
Copy link
Copy Markdown
Member Author

@wojtek-t wojtek-t Jul 11, 2016

Choose a reason for hiding this comment

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

@lavalamp @davidopp

This is the main change in this PR (most of other change are test fixes and stuff like that).

This has significant performance impact on scheduler, but before I finish fixing tests, I would like to get your opinion on it.

In particular, I think that:

  • ideally api.XxxList should all be []*api.Xxx instead of []api.Xxx (e.g. api.NodeList should be []*api.Node instead of []api.Node (plus all the metadata that we currently have))
  • however, since this seems to be backward-incompatible change, we may consider changing all listers here to api like I'm changing it here.

Thoughts?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think I'm OK with this. It was originally this way to try and match the client interface but I think it's already diverged, so I'd say go for it.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Thanks Daniel!

@k8s-github-robot k8s-github-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jul 11, 2016
@wojtek-t wojtek-t force-pushed the optimize_priorities_2 branch from 35cea5f to f5e2548 Compare July 11, 2016 18:46
@wojtek-t wojtek-t force-pushed the optimize_priorities_2 branch from f5e2548 to d14fe0f Compare July 11, 2016 19:02
@wojtek-t wojtek-t changed the title [WIP] Change storeToNodeConditionLister to return []*api.Node instead of ap… Change storeToNodeConditionLister to return []*api.Node instead of ap… Jul 11, 2016
@wojtek-t wojtek-t removed the do-not-merge DEPRECATED. Indicates that a PR should not merge. Label can only be manually applied/removed. label Jul 11, 2016
@wojtek-t
Copy link
Copy Markdown
Member Author

I just update the PR - it should be ready for review now.

@davidopp davidopp changed the title Change storeToNodeConditionLister to return []*api.Node instead of ap… Change storeToNodeConditionLister to return []*api.Node instead of api.NodeList for performance Jul 11, 2016
@k8s-bot
Copy link
Copy Markdown

k8s-bot commented Jul 11, 2016

GCE e2e build/test passed for commit d14fe0f.

@wojtek-t wojtek-t assigned gmarek and davidopp and unassigned davidopp Jul 12, 2016
return true
}

func includeNodeFromNodeList(node *api.Node) bool {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

isSchedulable ?

@gmarek
Copy link
Copy Markdown
Contributor

gmarek commented Jul 12, 2016

One nit. LGTM otherwise once SchedulerPredicates tests pass.

@wojtek-t
Copy link
Copy Markdown
Member Author

SchedulerPredicates tests passed.

I will apply the nit in a following PR - applying lgtm label.

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

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

@k8s-bot
Copy link
Copy Markdown

k8s-bot commented Jul 12, 2016

GCE e2e build/test passed for commit d14fe0f.

@k8s-github-robot
Copy link
Copy Markdown

Automatic merge from submit-queue

@k8s-github-robot k8s-github-robot merged commit 98030de into kubernetes:master Jul 12, 2016
@wojtek-t wojtek-t deleted the optimize_priorities_2 branch August 16, 2016 13:46
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. release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants