Ask me anything about setting requests and limits ...
# platform-toolbox
n
Ask me anything about setting requests and limits on Kubernetes, or how to optimize utilization. https://platformcon.com/talks/reduce-cloud-cost-and-increase-reliability-via-accurate-resource-recommendations
r
Hey Natan. Appreciated the content you covered during the talk. I’m interested to hear your philosophy on the topic of setting cpu limits specifically and its corresponding utilization impact. Specifically speaking, given that CPU is a compressible resource and a k8s workload will - at the worst - get throttled if it requests for more cpu than the underlying host can afford to allocate, should one allocate cpu limits? The prevailing opinion I hear is that if cpu limits are set, we can choke an app/burtstable k8s workload by keeping it from using more of the unused underlying nodes cpu if it exists. But would be great to get your thoughts
n
@Rani Nagib yep, that’s right. I’m firmly in the camp of not setting CPU limits. (But note that memory is different, and I’d recommend setting request=limit for memory.)
@Daniel H. thanks, hope KRR is helpful and would love to get your feedback. Great idea to update the blog post too - will do so next week. Regarding isolation, I don’t think I have an official test for this online, but you can test it yourself by deploying a pod that consumes as much CPU as it can. Then deploy another pod to the same node and verify that it gets its request anyway. The underlying mechanism is a linux kernel one.
d
@Natan Yellin - thanks for your response! Yeah, should be quite straight forward to test in-house. I only thought maybe there is already a well documented experiment available somewhere.