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

fix(worker): cpu cores detection using sh and default to 4 #349

Merged
merged 1 commit into from
Dec 4, 2019
Merged

fix(worker): cpu cores detection using sh and default to 4 #349

merged 1 commit into from
Dec 4, 2019

Conversation

smoke
Copy link
Contributor

@smoke smoke commented Dec 4, 2019

In case bash is missing from the system the cpu_cores.sh fails with an
error and returns empty string resulting in command like
make -j BUILDTYPE=Release -C out that uses unlimited jobs and could
lead to signifficant CPU and RAM usage during build

The cpu_cores.sh is now changed to using sh instead of bash, so it
should be more portable. Additionally if the cpu detection fails the
jobs default to 4, that should be safe enough.

In case bash is missing from the system the `cpu_cores.sh` fails with an
error and returns empty string resulting in command like
`make -j BUILDTYPE=Release -C out` that uses unlimited jobs and could
lead to signifficant CPU and RAM usage during build

The cpu_cores.sh is now changed to using `sh` instead of `bash`, so it
should be more portable. Additionally if the cpu detection fails the
jobs default to 4, that should be safe enough.
@ibc ibc merged commit ab77dab into versatica:v3 Dec 4, 2019
@ibc
Copy link
Member

ibc commented Dec 4, 2019

Thanks, it makes sense. Released in mediasoup 3.4.1.

@smoke smoke deleted the fix/worker-cpu-cores-detection-to-use-sh-so-it-is-portable branch December 4, 2019 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants