Skip to content
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

ci: Constrain parallel build jobs #2151

Merged
merged 2 commits into from
Jul 17, 2020

Conversation

jlebon
Copy link
Member

@jlebon jlebon commented Jul 16, 2020

The default _NPROCESSORS_ONLN heuristic we have isn't cgroups aware.
So it thinks it has e.g. 40 CPUs when running in a k8s pod. This can
then blow through our allocated resource limits.

Declare some modest amount of RAM and CPU resources and override make
parallelism.

This matches what rpm-ostree now does in
coreos/rpm-ostree#2155.

jlebon added a commit to coreos/rpm-ostree that referenced this pull request Jul 16, 2020
The default `_NPROCESSORS_ONLN` heuristic we have isn't cgroups aware.
So it thinks it has e.g. 40 CPUs when running in a k8s pod. This can
then blow through our allocated resource limits.

Declare some modest amount of RAM and CPU resources and override `make`
parallelism.

This matches what ostree does in
ostreedev/ostree#2151.
@jlebon
Copy link
Member Author

jlebon commented Jul 16, 2020

+ ps aux
USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root           1  0.0  0.0   2348   524 ?        Ss   18:50   0:00 /usr/bin/sleep infinity
root          14  0.0  0.0      0     0 ?        Z    18:50   0:00 [sh] <defunct>
root          28  0.0  0.0      0     0 ?        Z    18:50   0:00 [sh] <defunct>

Let's try coreos/coreos-ci-lib#33 ?

The default `_NPROCESSORS_ONLN` heuristic we have isn't cgroups aware.
So it thinks it has e.g. 40 CPUs when running in a k8s pod. This can
then blow through our allocated resource limits.

Declare some modest amount of RAM and CPU resources and override `make`
parallelism.

This matches what rpm-ostree now does in
coreos/rpm-ostree#2155.
openshift-merge-robot pushed a commit to coreos/rpm-ostree that referenced this pull request Jul 16, 2020
The default `_NPROCESSORS_ONLN` heuristic we have isn't cgroups aware.
So it thinks it has e.g. 40 CPUs when running in a k8s pod. This can
then blow through our allocated resource limits.

Declare some modest amount of RAM and CPU resources and override `make`
parallelism.

This matches what ostree does in
ostreedev/ostree#2151.
Fixes the tests, see coreos/coreos-assembler#1600
TODO: provide a webserver binary via virtio or so
@cgwalters
Copy link
Member

Man the regressions from my PRs just don't stop 😢
I pushed 6a5f97c
Software is hard...fix one thing, break at least 1.5 other things...

@jlebon
Copy link
Member Author

jlebon commented Jul 17, 2020

Woohoo all green!
/lgtm

@openshift-ci-robot
Copy link
Collaborator

@jlebon: you cannot LGTM your own PR.

In response to this:

Woohoo all green!
/lgtm

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@jlebon
Copy link
Member Author

jlebon commented Jul 17, 2020

Oh right. Wanna do the honours? :)

@cgwalters
Copy link
Member

/lgtm

@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cgwalters, jlebon

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants