You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Invoke all.bash after updating with git fetch and git pull.
What did you expect to see?
No more than $GOMAXPROCS used during the build and testing process.
What did you see instead?
Every processor available being utilized.
I really like to be able to limit the number of logical processors that the build and test process Go uses. The logical choice would be for the process to respect the environment variable GOMAXPROCS. The reason for wanting to impose this limit is to manage the amount of heat produced on my system during the process.
The text was updated successfully, but these errors were encountered:
As far as I know the build part will honor GOMAXPROCS. However, some of the tests will intentionally modify GOMAXPROCS and may reset based on the number of CPUs on the machine. Let us know if this does not match your observations.
Since what matters is basically the default value of GOMAXPROCS, on GNU/Linux you could do what you want by running all.bash via the taskset command. Does Darwin have a similar program?
changed the title
Feature Request: Control over maximum number of CPUs used when invoking $GOROOT/src/all.bash
cmd/dist: feature request: control over maximum number of CPUs used during build and test
Oct 26, 2017
I just tried a run with export GOMAXPROCS=1, and the build process frequently used more than one CPU, though not as often as when it was set higher. I'm unsure of whether this bit of documentation is sufficient to explain that:
The GOMAXPROCS variable limits the number of operating system threads that can execute user-level Go code simultaneously. There is no limit to the number of threads that can be blocked in system calls on behalf of Go code; those do not count against the GOMAXPROCS limit. This package's GOMAXPROCS function queries and changes the limit.