Closed heka1024 closed 3 months ago
Could you summarize in one/a few sentences why one should use cpu requests instead of cpu limits?
@eregon CPU limits can lead to throttling and reduced performance under high load. So, as Tim Hockin suggested, I've set only requests in my application at company. I think this is a quiet common pattern and it'll be nice if we can provide method to get cpu requests.
I've read quickly through the blog posts, so it seems the limit/quota
is a hard limit (don't use more CPU even if idle) and this requests/shares/weight is like a relative share for each pod/workload on the node, so can use more of the CPU if available. Makes sense.
@byroot @casperisfine Could you review this too?
@byroot @eregon I'd undo the "extract method" and replace it with file existence check. Could you review this once again?
In K8s environments, cpu requests are often more useful than limits, but concurrent-ruby currently lacks a related method, so I've added it. Below are links to articles about the usefulness of cpu requests.