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

DEVPROD-5483 add automaxprocs #7967

Merged
merged 1 commit into from
Jun 7, 2024

Conversation

ybrill
Copy link
Contributor

@ybrill ybrill commented Jun 6, 2024

DEVPROD-5483

Description

By default go doesn't see its number of CPUs is limited by a cgroup. Including this library will set GOMAXPROCS to the appropriate number of CPUs. noops if running outside a container.

Testing

In staging it limited to 1 CPU, which is consistent with the CPU limit. Interestingly, the CPU time we used actually went down 🤔 .

On my laptop and on a Linux spawn host it logged:

2024/06/06 21:44:37 maxprocs: Leaving GOMAXPROCS=8: CPU quota undefined

meaning it left the value unchanged because there was no limit set.

@ybrill ybrill requested a review from a team June 6, 2024 22:10
@julianedwards
Copy link
Contributor

This is neat! Great find!

@ybrill ybrill merged commit 4479a6b into evergreen-ci:main Jun 7, 2024
9 checks passed
@ybrill ybrill deleted the DEVPROD-5483_max_cpus branch June 7, 2024 14:03
ybrill added a commit that referenced this pull request Jun 10, 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.

2 participants