Kubernetes/Resources and Limits

From Ever changing code
< Kubernetes
Revision as of 16:21, 4 April 2022 by Pio2pio (talk | contribs) (→‎Pod CPU Throttling)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Pod CPU Throttling

From briefly perusing through the above links and others, there's a few conclusions I've come to:

This has supposedly been patched into the EKS nodes

However, even with this fix, it does seem like unexpected CPU throttling is still a common issue. e.g.

This article led to this ycombinator with quite a varied range of opinions about if CPU limits including this interesting one: <quote> The core principle most readers miss is that CPU limits are tied to CPU throttling, which is markedly different than CPU time sharing. I would argue that in 99% of cases, you truly do not need or want limits.

limits cause CPU throttling, which is like running your process in a strobe light. If your quota period is 100ms, you might only be able to make progress for 10ms out of every 100ms period, regardless of whether or not there is CPU contention, just because you've exceeded your limit.

requests -> CFS time sharing. This ensures that out of a given period of time, CPU time is scheduled fairly and according to the request as a proportion of total request (it just so happens that the Kube scheduler won't schedule such that sum[requests] > capacity, but theoretically it could because requests are truly relative when it comes to how they are represented in cgroups) </quote>

Detect pods without resources set

kubectl get po -n csi-drivers -oyaml | grep -e '^      resources: {}' -e "^    name:" | grep '^      resources: {}' -B1