pstree attached
Created attachment 535220 [details] 23.20180607-004625 pstree
I tested vault-1.16.1 with MAKEOPTS=-j1 just now, and it created one compile process per core: > \_ bash /usr/lib/portage/python3.12/ebuild-helpers/emake bin > \_ make -j1 bin > \_ /bin/sh -c GOARCH= GOOS= go generate $(go list ./... | grep -v vendor/ ) > \_ go generate github.com/hashicorp/vault github.com/hashicorp/vault/audit github.com/hashicor > \_ go run github.com/hashicorp/vault/tools/stubmaker > \_ /var/tmp/portage/app-admin/vault-1.16.1/temp/go-build3351222282/b001/exe/stubmaker > \_ go list -tags=enterprise -e -json=Name,ImportPath,Error,Dir,GoFiles,IgnoredGoFi > \_ /usr/lib/go/pkg/tool/linux_amd64/compile -o /var/tmp/portage/app-admin/vaul > \_ /usr/lib/go/pkg/tool/linux_amd64/compile -o /var/tmp/portage/app-admin/vaul > \_ /usr/lib/go/pkg/tool/linux_amd64/compile -o /var/tmp/portage/app-admin/vaul > \_ /usr/lib/go/pkg/tool/linux_amd64/compile -o /var/tmp/portage/app-admin/vaul > \_ /usr/lib/go/pkg/tool/linux_amd64/compile -o /var/tmp/portage/app-admin/vaul > \_ /usr/lib/go/pkg/tool/linux_amd64/compile -o /var/tmp/portage/app-admin/vaul > \_ /usr/lib/go/pkg/tool/linux_amd64/compile -o /var/tmp/portage/app-admin/vaul > \_ /usr/lib/go/pkg/tool/linux_amd64/compile -o /var/tmp/portage/app-admin/vaul > \_ /usr/lib/go/pkg/tool/linux_amd64/compile -o /var/tmp/portage/app-admin/vaul > \_ /usr/lib/go/pkg/tool/linux_amd64/compile -o /var/tmp/portage/app-admin/vaul > \_ /usr/lib/go/pkg/tool/linux_amd64/compile -o /var/tmp/portage/app-admin/vaul > \_ /usr/lib/go/pkg/tool/linux_amd64/compile -o /var/tmp/portage/app-admin/vaul > \_ /usr/lib/go/pkg/tool/linux_amd64/compile -o /var/tmp/portage/app-admin/vaul > \_ /usr/lib/go/pkg/tool/linux_amd64/compile -o /var/tmp/portage/app-admin/vaul > \_ /usr/lib/go/pkg/tool/linux_amd64/compile -o /var/tmp/portage/app-admin/vaul
https://github.com/golang/go/pull/63137 maybe..
It is related to GOMAXPROCS, if I export GOMAXPROCS=1 then it reduces the compile processes as shown in comment #2 down to a single process.
I was convinced we set GOMAXPROCS in one of the Go eclasses, but apparently not.
I do have this here at the tinderbox: EGO_BUILD_FLAGS="-p $j" GO19CONCURRENTCOMPILATION=0 GOMAXPROCS=$j Can I reduce it to GOMAXPROCS?
GOMAXPROCS is similar to the make -j option, so it its reasonable to set them to the same value. However it is notable that GOMAXPROCS does not seem to have an equivalent to the make --load-average option.
I suppose the POSIX jobserver support proposed in https://github.com/golang/go/issues/36868 could possibly help to keep GOMAXPROCS under control.