by eric_khun · 6y ago · 0 comments
- remove the limit completely. Not a fan of this one since we really don't want a service going over a given limit...
- using the static management cpu policy [2] Not a fan because some services doesn't need a "whole" cpu to run...
Anyone has any other solutions? Thanks!
[1] https://github.com/kubernetes/kubernetes/issues/67577
[2] https://kubernetes.io/docs/tasks/administer-cluster/cpu-mana...
The symptom primarily seems to manifest that you get heavy throttling even though you haven't actually gotten to your cpu limit yet.
If you're just seeing heavy throttling AND its pegged at the limit, you haven't necessarily hit the issue and should raise the limit first and observe.
Also don't forget to eliminate other possibilities. We initially thought we were experiencing this issue and later discovered the app was just memory constrained and extremely heavy GC during certain operations was causing the throttling.
2. Same applies to dedicate cores for pretty much same reasons
Having said that if you really really want quota but don’t want shit tail latency I suggest setting cfs_quota_period to under 5ms via kubelet flag
This is not true at all. Autoscaling depends on CPU quotas. More importantly, if you want to keep your application running well without getting chatty neighbors or getting your containers redeployed around for no apparent reason, you need to cover all resources with quotas.
For such clusters, it's necessary to set up stuff like the LimitRanger (https://kubernetes.io/docs/concepts/policy/limit-range/) to put a hard constant bound between requests and limits.
I've just checked Kubernetes' docs and I have to say you are absolutely correct. Resource limits are used to enforce resource quotas, but not autoscaling.