'Pods CPU getting Throttled even when CPU usage is less than requested
CPU is getting throttled even when the CPU usage for the container is below request.
From what I understand pods are scheduled at nodes where there is sufficient CPU available i.e what is requested.
First question here is let's say that this pod does not require this much cpu at a given time and some other pod wants to have more cpu (cpu requested will be under what is defined in limit) so will the other pod get it or will it be throttled?
Second question assuming if the answer is yes it will get the cpu, then let's say our pod wants to have more cpu now but other pod is already using it and there is not enough CPU left at node so will both the pods experience throttling or only the second pod will be throttled (From what I read pods are throttled when they ask more than limit) or a new node will be added to the cluster?
Or there can be some other reasons for this then please share your thoughts and recommend some good articles regarding this?
Also I read these
https://medium.com/omio-engineering/cpu-limits-and-aggressive-throttling-in-kubernetes-c5b20bd8a718
But our version already has a fix for this so I think this is not what causing issue here.
https://medium.com/@betz.mark/understanding-resource-limits-in-kubernetes-cpu-time-9eff74d3161b
Solution 1:[1]
There is an ongoing kuberenetes issue on how the CPU throttling problem caused by setting CPU limits is still ongoing in 5.4.0 Linux kernels. This might be related to your problems. https://github.com/kubernetes/kubernetes/issues/97445
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Joel Hoisko |