go: build: all.bash fails to saturate 6 cores

go version devel +eed2bb7 Wed Nov 2 19:21:16 2016 +0000 linux/amd64

What did you do?

./clean.bash
time ./all.bash

What did you expect to see?

I do my development on a virtualized 6-core Xeon running Ubuntu. (runtime.NumCPU() returns 6.)

Per @rsc’s comments on #10571, I expected “Both the build half and the test half of all.bash should consume nearly all the CPUs for most of the time.”

What did you see instead?

all.bash seems to saturate at ~2 CPU cores for a significant fraction of the run. It consumes less than twice as much user time than real. Oddly, sys usage is even higher than user; I’m not sure what to make of that.

real    8m55.199s
user    14m13.511s
sys     8m51.402s

Here’s a chart of CPU saturation over time as measured by mpstat. You can see that there are a couple bursts of parallelism with mostly poor saturation in between. The machine doesn’t appear to be hitting swap during the build.

About this issue

  • Original URL
  • State: open
  • Created 8 years ago
  • Reactions: 6
  • Comments: 93 (19 by maintainers)

Commits related to this issue

Most upvoted comments

I’m curious whether concurrent compilation in 1.9 helps much here.

The initial build transient seems to saturate a bit better, and a few of the tests spike to saturation, but the overall utilization is still pretty similar.

From a clean build at tip: chart