-
Notifications
You must be signed in to change notification settings - Fork 22
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
Set limits and requests for exclusive pool containers #25
Comments
I'm under the impression that CFS quota can affect performance / latency so we should configure it so that CFS quota is disbaled. Is it disabled if we set the CPU limit to zero ? |
K8s community actually proposed kernel patches to correct this issue :) |
sorry, first improvement is available from 4.18: And this one should totally fix them: BTW based on the description the CFS quota was only misbehaving for workloads which frequently idle, and only consume some slices. |
I'm still a bit against setting the limit to something else than 0 thus enabling the CFS quota. If container allocates exclusive core(s), it must have full access to the core(s). On the other hand it cannot use other cores so why is the quota needed ? |
purely for Kubernetes compatibility reasons I described in the opening post. If the user has LimitRanger admission plugins enabled in their cluster, instantiating Pods within their CPU-Pooler enhanced cluster will fail: I think the same might be an issue when the operator would set some constraints in the Namespace object |
We can add the limit and requests to exclusive containers to avoid failures in pod instantiation but would it be ok to set the limit to zero ? |
This commit solves Issue #25. When a container is using shared pool resources, the CFS quota is set to its limit value With exclusive users it is set to the total amount of all exclusive cores * 1000 When both are requested the overall quota is set to exclusive*1000 + 1.2*shared In this hybrid scenario we leave a 20% safety margin on top of the originally requested shared resoruces, to avoid accidentally throttling the higher prio exclusive thread when the lower prio shared threads are overloaded.
This commit solves Issue #25. When a container is using shared pool resources, the CFS quota is set to its limit value With exclusive users it is set to the total amount of all exclusive cores * 1000 When both are requested the overall quota is set to exclusive*1000 + 1.2*shared In this hybrid scenario we leave a 20% safety margin on top of the originally requested shared resoruces, to avoid accidentally throttling the higher prio exclusive thread when the lower prio shared threads are overloaded.
This commit solves Issue #25. When a container is using shared pool resources, the CFS quota is set to its limit value With exclusive users it is set to the total amount of all exclusive cores * 1000 + 100 (constant 100 is added to avoid activating throttling mechanisms near 100% utilization) When both are requested the overall quota is set to exclusive*1000 + 1.2*shared In this hybrid scenario we leave a 20% safety margin on top of the originally requested shared resoruces, to avoid accidentally throttling the higher prio exclusive thread when the lower prio shared threads are overloaded.
This commit solves Issue nokia#25. When a container is using shared pool resources, the CFS quota is set to its limit value With exclusive users it is set to the total amount of all exclusive cores * 1000 + 100 (constant 100 is added to avoid activating throttling mechanisms near 100% utilization) When both are requested the overall quota is set to exclusive*1000 + 1.2*shared In this hybrid scenario we leave a 20% safety margin on top of the originally requested shared resoruces, to avoid accidentally throttling the higher prio exclusive thread when the lower prio shared threads are overloaded.
This commit solves Issue nokia#25. When a container is using shared pool resources, the CFS quota is set to its limit value With exclusive users it is set to the total amount of all exclusive cores * 1000 + 100 (constant 100 is added to avoid activating throttling mechanisms near 100% utilization) When both are requested the overall quota is set to exclusive*1000 + 1.2*shared In this hybrid scenario we leave a 20% safety margin on top of the originally requested shared resoruces, to avoid accidentally throttling the higher prio exclusive thread when the lower prio shared threads are overloaded.
Similarly to shared pool Pods, we need to care about setting requests, and limits for exclusives.
Request: explicitly setting 0 is required, similarly to how it was done for shareds in #14
Limit: we should either set explicit 0 to avoid artificially limiting the share time of a core which is anyway physically isolated; or we need to set (number_of_exclusive_cores)X1000.
Reasoning for 0: even if the limit is actually higher than what is possible to get, it will still add a CFS quota to the container. There are anecdotal reports out there indicating just the presence of a CFS quota can negatively affect performance.
Reasoning for explicitly setting limit: there are some admission controllers in K8s which mandate a Pod to define requests, and limits. These mandated requests are ofc pointless in case of an exclusive user, but failure to comply results in failing Pod admission.
So, if the presence of CFS quotas do not affect performance, it is actually the safer option to set the limit!
@TimoLindqvist : WDYT Timo?
The text was updated successfully, but these errors were encountered: