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

Optimize a request to find device plugin pods. #599

Merged
merged 1 commit into from
Feb 1, 2024

Conversation

alan-kut
Copy link
Contributor

Add a resourceVersion=0 to the reuqest to find device plugin pods on a given node from the latest cache from the kube-apiserver. Without a resourceVersion the request needs to reach etcd first and then kube-apiserver will filter out the pods.

Due to this etcd can get overloaded. Since it runs in daemonset, they get created on every node. If a cluster has a lot of nodes the list requests will put a cluster down.

Copy link

Thanks for your PR,
To run vendors CIs use one of:

  • /test-all: To run all tests for all vendors.
  • /test-e2e-all: To run all E2E tests for all vendors.
  • /test-e2e-nvidia-all: To run all E2E tests for NVIDIA vendor.

To skip the vendors CIs use one of:

  • /skip-all: To skip all tests for all vendors.
  • /skip-e2e-all: To skip all E2E tests for all vendors.
  • /skip-e2e-nvidia-all: To skip all E2E tests for NVIDIA vendor.
    Best regards.

@alan-kut
Copy link
Contributor Author

/test-all

Copy link
Collaborator

@adrianchiris adrianchiris left a comment

Choose a reason for hiding this comment

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

@alan-kut
at what number of nodes did you hit this issue ?

LGTM.

FieldSelector: "spec.nodeName=" + vars.NodeName,
LabelSelector: "app=sriov-device-plugin",
FieldSelector: "spec.nodeName=" + vars.NodeName,
ResourceVersion: "0",
Copy link
Collaborator

Choose a reason for hiding this comment

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

as we just care for the existance of such pod i believe we are OK with specifying this.

some additional reading on the semantics of ResourceVersion field for other reviewers[1]

[1] https://kubernetes.io/docs/reference/using-api/api-concepts/#semantics-for-get-and-list

Copy link
Member

Choose a reason for hiding this comment

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

@adrianchiris thanks for linking the documentation.

@alan-kut
Copy link
Contributor Author

I hit the issue with 4k nodes running the plugin

@alan-kut
Copy link
Contributor Author

The failures are in the controllers, not daemon.

@adrianchiris
Copy link
Collaborator

@alan-kut could you rebase ?

@SchSeba @zeeke PTAL on this one when you get a chance

Copy link
Member

@zeeke zeeke left a comment

Choose a reason for hiding this comment

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

LGTM

Add a resourceVersion=0 to the reuqest to find device plugin pods
on a given node from the latest cache from the kube-apiserver.
Without a resourceVersion the request needs to reach etcd first and
then kube-apiserver will filter out the pods.

Due to this etcd can get overloaded. Since it runs in daemonset,
they get created on every node. If a cluster has a lot of nodes
the list requests will put a cluster down.
Copy link

github-actions bot commented Feb 1, 2024

Thanks for your PR,
To run vendors CIs use one of:

  • /test-all: To run all tests for all vendors.
  • /test-e2e-all: To run all E2E tests for all vendors.
  • /test-e2e-nvidia-all: To run all E2E tests for NVIDIA vendor.

To skip the vendors CIs use one of:

  • /skip-all: To skip all tests for all vendors.
  • /skip-e2e-all: To skip all E2E tests for all vendors.
  • /skip-e2e-nvidia-all: To skip all E2E tests for NVIDIA vendor.
    Best regards.

@alan-kut
Copy link
Contributor Author

alan-kut commented Feb 1, 2024

Rebased

@coveralls
Copy link

Pull Request Test Coverage Report for Build 7741878100

  • 0 of 3 (100.0%) changed or added relevant lines in 1 file are covered.
  • 6 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.1%) to 25.098%

Files with Coverage Reduction New Missed Lines %
controllers/sriovnetworkpoolconfig_controller.go 6 69.7%
Totals Coverage Status
Change from base Build 7740442862: 0.1%
Covered Lines: 2810
Relevant Lines: 11196

💛 - Coveralls

@adrianchiris adrianchiris merged commit 1a3019e into k8snetworkplumbingwg:master Feb 1, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants