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

Use nproc instead of /proc/cpuinfo to find number of processors for concurrency #5035

Merged
merged 5 commits into from
Feb 2, 2024

Conversation

Haroon-Khel
Copy link
Contributor

See adoptium/infrastructure#3360 (comment)

For docker containers, grep -c ^processor /proc/cpuinfo will return the number of processors of the host, not the container. Whereas nproc will return the number of processors of the container (given the container is run using the --cpuset-cpus="0-n" option.

nproc works on linux hosts so should not affect non docker nodes and it comes pre installed

@Haroon-Khel
Copy link
Contributor Author

Haroon-Khel commented Feb 2, 2024

More importantly, jdk_time_2 was failling on some of our arm32 docker static containers because the test scripts read the cpu number of the host and so set -concurrency:81, https://ci.adoptium.net/job/Grinder/8700/console, causing the tests to overwhelm the container and timeout. nproc finds the correct number of cpus for the container, allowing the test to pass on our arm32 docker nodes https://ci.adoptium.net/job/Grinder/8710/console

@karianna karianna merged commit 35285cc into adoptium:master Feb 2, 2024
1 check passed
@sxa sxa mentioned this pull request Feb 14, 2024
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