-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
CI Limit ninja number of parallel jobs in CircleCI #30333
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
glemaitre
approved these changes
Nov 22, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM since it worked when we connected in SSH.
ogrisel
approved these changes
Nov 22, 2024
Enabling auto-merge. This is indeed fixing the issue. |
For completeness, it looks like ninja does not know how to use cgroups v2 ninja-build/ninja#2166. This is the reason ninja was seeing something like 36 cores instead of 2. |
jeremiedbb
pushed a commit
to jeremiedbb/scikit-learn
that referenced
this pull request
Dec 4, 2024
jeremiedbb
pushed a commit
that referenced
this pull request
Dec 6, 2024
virchan
pushed a commit
to virchan/scikit-learn
that referenced
this pull request
Dec 9, 2024
betatim
pushed a commit
to betatim/scikit-learn
that referenced
this pull request
Jan 28, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Check this fixes the CircleCI issue see in many PRs for example in #30327 (comment).
Not sure why this started being an issue, my guess is that something changed in CircleCI and ninja thinks he has too many cores instead of the 2 that it should see. ninja ends up creating too many processes and there is some kind of CircleCI job manager that kills the processes. This corroborates what was seen using CircleCI SSH debug with
htop
.Apparently the default number of jobs is number of cores + 2 so I set it to 4 since we have two cores in our CircleCI job. Not sure the rule is so simple after reading a bit more but
-j4
makes the doc build pass so probably good enough.There was this old ninja+CircleCI issue ninja-build/ninja#1530 although I am guessing this is not fully relevant ninja-build/ninja#1530. At least this points to https://github.com/ninja-build/ninja/blob/a3fda2b06c027f19c7ec68c08e21859e44c15cde/src/ninja.cc#L248-L258 that seems to point at the default parallelism rule. TL;DR in general parallelism is number of cores + 2, 3 for 2 cores and 2 for 1 core.