-
Notifications
You must be signed in to change notification settings - Fork 362
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CPU assignment for app instance >8G memory #3588
Comments
As discussed in CAPI office hours, It looks like BBS currently limits CPU weight to 100: https://github.com/cloudfoundry/bbs/blob/0007fcda733509f73717fa966d8dcd8ff92ce62c/models/desired_lrp.go#L725-L727 |
Dear CAPI Colleagues, We can take the Diego part, i shall create an issue in diego-release. |
My proposal would be to not limit the cpu weight value in Diego, i.e. accept [0, infinity). Otherwise we just introduce the next hardcoded limit. In practice, the cpu weight value is limited by the max possible instance memory defined in org and space quotas. If set to unlimited (e.g. for non-productive foundations), the max possible instance memory size is determined by the Diego cell VM size and will indirectly limit the max possible cpu weight. |
Hello Capi colleagues, Do you plan to change the way the cpu_weight is calculated ? From what I understand, with current way the cpu_weight will not go over 100.
Here the numerator is the requested app memory. With the current formula, even if we change MAX_CPU_PROXY to a larger number, the cpu_weight will never be over 100. This is because we aways divide by the upper boundary. Am I wrong ? |
The proposed new calculation would be:
I.e. weight scales linearly with memory between the configured min/max values and 100% weight equals an 8G instance. With the proposed defaults for cc.cpu_weight_min/max_mem, the weight calculator will behave exactly as today: But when setting cc.cpu_weight_max_mem = 16384, it would return 200% for a 16G app instance: |
I just created the following for the Diego part |
Issue
Currently, CPU assignment to app instance is capped at 8G instance memory, originally reported in #1178
Back then, this was more a theoretical problem but meanwhile we face user requests for 16G app instances and even more. Often, the reason is not memory but the wish for more CPU.
Context
There is a hardcoded cap at 8G: MAX_CPU_PROXY in task_cpu_weight_calculator.rb
See also discussion of other options in diego-release #865
Steps to Reproduce
cat /sys/fs/cgroup/cpu/cpu.shares
Expected result
16G app should have double the cpu shares of the 8G app.
Current result
16G app has only the same cpu shares as the 8G app.
Possible Fix
Make the MIN/MAX_CPU_PROXY values that are used for capping the cpu weight in task_cpu_weight_calculator.rb configurable in CAPI
E.g.
cc.cpu_weight_min_mem
- Min memory in MB that is used for CPU weight calculation even if app has less memory assigned. Default=128cc.cpu_weight_max_mem
- Max memory in MB that is used for CPU weight calculation even if app has more memory assigned. If set to 0, cpu shares are not capped. Default=8192CPU weight is still defined as 100% for an 8G app. 16G apps would get a value of 200%.
The text was updated successfully, but these errors were encountered: