Skip to content

Conversation

@manuelh-dev
Copy link

@manuelh-dev manuelh-dev commented Jan 2, 2025

Merge Checklist
Summary
• Let's align assignment with the new mem assignment. Extend our 'memory allocation patch' with 'vcpu'. This way we can set default_vcpus to 0 and add 1 vCPU if no limits are given, similar to pull/281.
• Let's allow for non-integer vCPU limits and round up - no change required. the calculation is already as of today for the example of a limit of 3500millis: ceil(0, 3.5) = 4
• We will not hit the bug where we can ask CLH to allocate 5 vCPUs, then hit a crash. We did only previously hit this through ceil(1+3.5)=5. To prevent this we would have had to define a vCPU limit of 1 or higher (cause then kubelet will check 1+3.5 vs 3.86 and tell use that we can't run the pod. Without this, kubelet thinks we only want 3.5 and let's use go ahead and let's CLH allocate a VM with 5 vCPUs, and then 'boom'). 
	○ With this, we do not need to define a vCPU overhead.
Test Methodology

@manuelh-dev manuelh-dev force-pushed the mahuber/pod-vcpus branch 5 times, most recently from 6b83d36 to 3d7f094 Compare January 3, 2025 01:05
@manuelh-dev manuelh-dev force-pushed the mahuber/pod-vcpus branch 3 times, most recently from 0839ef8 to 43e7c3d Compare January 4, 2025 00:03
- similar to the static_sandbox_default_workload_mem option,
  assign a default number of vcpus to the VM when no limits
  are given, 1 vcpu in this case
- similar to commit c7b8ee9, do not allocate additional vcpus
  when limits are provided

Signed-off-by: Manuel Huber <[email protected]>
@manuelh-dev manuelh-dev marked this pull request as ready for review January 9, 2025 17:55
@manuelh-dev manuelh-dev requested review from a team as code owners January 9, 2025 17:55
@manuelh-dev manuelh-dev merged commit 4d3b496 into msft-main Jan 9, 2025
66 of 108 checks passed
@Redent0r Redent0r deleted the mahuber/pod-vcpus branch January 10, 2025 19:12
sprt pushed a commit that referenced this pull request Feb 10, 2025
runtime: Allocate default workload vcpus
sprt pushed a commit that referenced this pull request Feb 27, 2025
runtime: Allocate default workload vcpus
sprt pushed a commit that referenced this pull request Mar 3, 2025
runtime: Allocate default workload vcpus
sprt pushed a commit that referenced this pull request Mar 4, 2025
runtime: Allocate default workload vcpus
sprt pushed a commit that referenced this pull request Mar 4, 2025
runtime: Allocate default workload vcpus
sprt pushed a commit that referenced this pull request Mar 4, 2025
runtime: Allocate default workload vcpus
sprt pushed a commit that referenced this pull request Mar 4, 2025
runtime: Allocate default workload vcpus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants