crio: inject gomaxprocs by default#6177
Conversation
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: openshift/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (2)
WalkthroughThe pull request adds the ChangesCRI-O gomaxprocs configuration
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes 🚥 Pre-merge checks | ✅ 15✅ Passed checks (15 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
/payload-job release-informing |
|
@haircommander: trigger 0 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command |
|
/payload-job informing |
|
@haircommander: trigger 0 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@templates/master/01-master-container-runtime/_base/files/crio.yaml`:
- Line 36: The arbiter CRI-O runtime config is missing the crio.runtime tuning
present elsewhere; add the line min_injected_gomaxprocs = 1 under the
[crio.runtime] section in the arbiter CRI-O config template (to mirror the
master/worker templates) and ensure any template logic or templating variables
that render the CRI-O config include crio.runtime.min_injected_gomaxprocs so
arbiter nodes receive the same setting; also ensure deployment
logic/environments only apply this when the deployed CRI-O version is >= 1.33.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 2b562d0d-60e3-490b-a0c7-e5a12f15a662
📒 Files selected for processing (2)
templates/master/01-master-container-runtime/_base/files/crio.yamltemplates/worker/01-worker-container-runtime/_base/files/crio.yaml
Go processes run on nodes with many CPUs suffer a problem where the go runtime creates runtime threads per CPUs it can see, assuming there isn't a CPU limit on the process. However, the kubernetes scheduler is binpacking pods based on CPU request, which means go processes actually have access to less CPU time than the go runtime is expecting. This causes scheduling and GC latency. min_injected_gomaxprocs is a feature in CRI-O that injects the GOMAXPROCS environment variable into all pods based on their CPU request. if the pod has a limit, GOMAXPROCS isn't set. Otherwise, it is set to 2*requested CPUs. The 2* figure was found from perf testing, allowing the go runtime to burst up to capacity, while mitigating the latency. Turn this on by default. Signed-off-by: Peter Hunt <pehunt@redhat.com>
aaf7e82 to
6e3fda7
Compare
|
/payload 5.0 nightly informing |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: haircommander The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@haircommander: trigger 68 job(s) of type informing for the nightly release of OCP 5.0
See details on https://pr-payload-tests.ci.openshift.org/runs/ci/e5484aa0-65a7-11f1-80f2-1501213eb556-0 |
- What I did
Go processes run on nodes with many CPUs suffer a problem where the go runtime creates runtime threads per CPUs it can see, assuming there isn't a CPU limit on the process. However, the kubernetes scheduler is binpacking pods based on CPU request, which means go processes actually have access to less CPU time than the go runtime is expecting. This causes scheduling and GC latency.
min_injected_gomaxprocs is a feature in CRI-O that injects the GOMAXPROCS environment variable into all pods based on their CPU request. if the pod has a limit, GOMAXPROCS isn't set. Otherwise, it is set to 2requested CPUs. The 2 figure was found from perf testing, allowing the go runtime to burst up to capacity, while mitigating the latency.
Turn this on by default.
- How to verify it
- Description for the changelog
Summary by CodeRabbit