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

ClientConnection.QPS applies to individual API types #2423

Closed
gabesaba opened this issue Jun 17, 2024 · 6 comments · Fixed by #2462
Closed

ClientConnection.QPS applies to individual API types #2423

gabesaba opened this issue Jun 17, 2024 · 6 comments · Fixed by #2462
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@gabesaba
Copy link
Contributor

What happened:
When setting ClientConnection.QPS, the limit applies to each type (e.g. pod, workload, status, clusterqueue, etc)

What you expected to happen:
This should be a global limit. Otherwise, it is hard for administrators to know exactly how many queries per second Kueue will be making to the API Server.

How to reproduce it (as minimally and precisely as possible):
Set to a very low limit (e.g. 1), with burst set to same as the limit. Observe that Kueue is making more than 1 call per second to the API Server.

@gabesaba gabesaba added the kind/bug Categorizes issue or PR as related to a bug. label Jun 17, 2024
@trasc
Copy link
Contributor

trasc commented Jun 17, 2024

/assign

@trasc
Copy link
Contributor

trasc commented Jun 20, 2024

Set to a very low limit (e.g. 1), with burst set to same as the limit. Observe that Kueue is making more than 1 call per second to the API Server.

@gabesaba How many calls do you observe?

@gabesaba
Copy link
Contributor Author

gabesaba commented Jun 20, 2024

Set to a very low limit (e.g. 1), with burst set to same as the limit. Observe that Kueue is making more than 1 call per second to the API Server.

@gabesaba How many calls do you observe?

it should be on the O(#API types). I didn't check if this was multiplied by namespaces, for namespaced types. So in the case of 1qps, at least CQ, LQ, Workload, Pod, Event (and others I may be missing) = 5qps.

@trasc
Copy link
Contributor

trasc commented Jun 20, 2024

Set to a very low limit (e.g. 1), with burst set to same as the limit. Observe that Kueue is making more than 1 call per second to the API Server.

@gabesaba How many calls do you observe?

it should be on the O(#API types). I didn't check if this was multiplied by namespaces, for namespaced types. So in the case of 1qps, at least CQ, LQ, Workload, Pod, Event (and others I may be missing) = 5qps.

How do you "mesure" this?

@gabesaba
Copy link
Contributor Author

I'm not sure what development environment you're using, but generally:

  • access k8 apiserver logs
  • filter requests from Kueue
  • add some load to Kueue so that it's making enough API calls
  • group by time observe that in a given window (e.g. 60 seconds), there are more than 60 calls (if qps=1)
  • additionally, group by API type (Workload/Pod/CQ) - observe that qps is at most the limit you set

@trasc
Copy link
Contributor

trasc commented Jun 21, 2024

@gabesaba It took some time but I found the cause, #2462 should fix it, please let me know if you can confirm the fix on your side as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants