3 ms·
While I agree that CPU limits tend to make your performance worse, I don't think the delivery of the post is all too convincing (and is pretty heavy on the LLM-
by conradludgate 2mo ago
While I agree that CPU limits tend to make your performance worse, I don't think the delivery of the post is all too convincing (and is pretty heavy on the LLM-isms that it's putting me off from reading).
It mentions that a cpu request is a guarantee, but how is that enforced? If I have 32 pods running on a 32 core machine, each with 1cpu requested, what stops one of those pods using an unfair share? I assume we just rely on the Linux scheduler. If I have 16 pods with 1cpu and 1 pod with 16cpu, does the Linux scheduler make sure to give the 16cpu pod more time? Or are we back to using cgroups.
- croemer 2mo agoRequests are guaranteed no matter what. > If I have 16 pods with 1cpu and 1 pod with 16cpu, does the Linux scheduler make sure to give the 16cpu pod more time? Yes if there's CPU pressure the 16cpu will get 16x more than 1cpu.
- Sayrus 2mo agoEach pod has weight. These are written to your cgroup (cpu.weight in CGroups V2). CFS is scheduling based on these weights. There's a part about it: https://github.com/inevolin/k8s-cpu-limits-analyzed#3-without-limits-who-shares-the-cpu-meet-cfs https://github.com/inevolin/k8s-cpu-limits-analyzed#3-withou...
- toast0 2mo ago> If I have 32 pods running on a 32 core machine, each with 1cpu requested, what stops one of those pods using an unfair share? I don't use all this fancy stuff, but wouldn't you set that up as each of the 32 pods is limited to running on a specific core? No sense letting them each run on all cores, because all of the X per core will get too big.
- deleted 2mo ago[deleted]