Repository navigation
max_cpu_share alone should determine the hard cap in a workload setting, even if max_cpus is unset - #88217
Conversation
…hare when max_cpus is unset, ensuring expected CPU ceiling
…ax_cpu_share is set
|
Workflow [PR], commit [1b43602] Summary: ❌
|
|
I'm waiting for this PR merging btw. Thanks god 🙏🏻 |
… override and signature issues
|
@neeravsalaria As for the |
|
@wiraphatys @MoosaTae There is a simple workaround if you want to use the feature without the fix. Just use a high value for |
serxa
left a comment
There was a problem hiding this comment.
Looks great. Let's see what CI says
|
@serxa , any idea why the CI tests are failing. |
These tests are flaky, no worries. We'll merge it if there is no related test failure. |
Awsome. Thanks |
Thank you🙏🙏 |
…d cap in a workload setting, even if max_cpus is unset
…d cap in a workload setting, even if max_cpus is unset
Backport #88217 to 25.9: max_cpu_share alone should determine the hard cap in a workload setting, even if max_cpus is unset
Backport #88217 to 25.8: max_cpu_share alone should determine the hard cap in a workload setting, even if max_cpus is unset
In workload settings, the effective hard CPU cap (max_cpus) is determined as the minimum of two potential limits: (1) an explicit hard cap (max_cpus) and (2) a cap derived from the share (max_cpu_share × number_of_cores). When neither the workload nor its parents specify max_cpus, the resolver treats the explicit cap as zero (unset).
Per the documentation (), it’s valid to configure a workload with only max_cpu_share and no max_cpus. However, when only max_cpu_share is provided, the current resolver does not initialise a hard cap from the share; instead, it leaves max_cpus at zero. Practically, this means no hard ceiling is applied even though a share cap exists, leading to larger short-window bursts than operators expect.
Observed behavior
With max_cpu_share set and max_cpus unset, the effective hard cap remains 0 (i.e., no hard ceiling is established from the share).
Expected behavior
If max_cpus is unset and max_cpu_share is set, the resolver should initialise the hard cap from the share (i.e., max_cpu_share × number_of_cores) so that a sensible hard ceiling exists even without an explicit max_cpus.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Fixes a workload setting
max_cpu_share. Now it can be used withoutmax_cpusworkload setting being set.