-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
build: all.bash takes far too long #10571
Comments
One regression: The os/exec race detector test in Go 1.4.2 went from ~0.6s on my machine to ~17.5s with tip. all.bash went from ~2.5m to ~6m, so this accounts for about 15% of the regression. /cc @dvyukov |
CL https://golang.org/cl/9350 mentions this issue. |
Instead of running: go test -short runtime -cpu=1 go test -short runtime -cpu=2 go test -short runtime -cpu=4 Run just: go test -short runtime -cpu=1,2,4 This is a return to the Go 1.4.2 behavior. We lose incremental display of progress and per-cpu timing information, but we don't have to recompile and relink the runtime test, which is slow. This cuts about 10s off all.bash. Updates #10571. Change-Id: I6e8c7149780d47439f8bcfa888e6efc84290c60a Reviewed-on: https://go-review.googlesource.com/9350 Reviewed-by: Dave Cheney <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> Reviewed-by: Dmitry Vyukov <[email protected]>
CL https://golang.org/cl/9913 mentions this issue. |
DWARF generation appears to assume Cpos is cheap and this makes linking godoc about 8% faster and linking the standard library into a single shared library about 22% faster on my machine. Updates golang#10571 Change-Id: I3f81efd0174e356716e7971c4f59810b72378177 Reviewed-on: https://go-review.googlesource.com/9913 Reviewed-by: Ian Lance Taylor <[email protected]> Run-TryBot: Ian Lance Taylor <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
CL https://golang.org/cl/10211 mentions this issue. |
Memory usage has been reduced. The tests are still slow, but that is issue golang#10571. /usr/bin/time shows significant variation in the peak memory usage compiling with tip. This is unsurprising, given GC. Using Go 1.4.2, memory is stable at 410mb. Using tip at a21cf5b, which does not include some relevant CLs, memory ranges from 524mb (+28%) to 593mb (+45%), with a mean of 563mb (+37%), with n=43. DO NOT SUBMIT -- trybot bait for the moment Fixes golang#9933. Change-Id: Id31f3ae086ec324abf70e8f1a8044c4a0c27e274
DWARF generation appears to assume Cpos is cheap and this makes linking godoc about 8% faster and linking the standard library into a single shared library about 22% faster on my machine. Updates golang#10571 Change-Id: I3f81efd0174e356716e7971c4f59810b72378177
Memory usage has been reduced. The tests are still slow, but that is issue golang#10571. /usr/bin/time shows significant variation in the peak memory usage compiling with tip. This is unsurprising, given GC. Using Go 1.4.2, memory is stable at 410mb. Using tip at 791bb4f, memory ranges from 506mb (+23%) to 571mb (+39%), with a mean of 536mb (+31%), with n=50. Fixes golang#9933. Change-Id: Id31f3ae086ec324abf70e8f1a8044c4a0c27e274
Memory usage has been reduced. The tests are still slow, but that is issue #10571. /usr/bin/time shows significant variation in the peak memory usage compiling with tip. This is unsurprising, given GC. Using Go 1.4.2, memory is stable at 410mb. Using tip at d2ee09298, memory ranges from 470mb (+15%) to 534mb (+30%), with a mean of 504mb (+23%), with n=50. Fixes #9933. Change-Id: Id31f3ae086ec324abf70e8f1a8044c4a0c27e274 Reviewed-on: https://go-review.googlesource.com/10211 Reviewed-by: Brad Fitzpatrick <[email protected]>
CL https://golang.org/cl/10833 mentions this issue. |
For the record, although I'm thrilled that the cmd/go tests now run by default, they take 55 seconds on my machine. More to do. |
DO NOT SUBMIT I had some time for some recreational hacking and I'd been wondering how much using a symbol table in object files would speed up the linker. It turns out that it was a lot more than I expected: this CL improves all.bash by about 25-30s on my laptop (~6.5 mins to ~6 mins). So even though it's late in the release to do this, is that enough of an improvement to be worth it? This is mostly just the simplest thing I could do, I didn't think about things very hard. Updates golang#10571 Change-Id: I24eb071425c77b1c611d8f1f4e63deee22887e76
CL https://golang.org/cl/18085 mentions this issue. |
CL https://golang.org/cl/18087 mentions this issue. |
CL https://golang.org/cl/18086 mentions this issue. |
CL https://golang.org/cl/18088 mentions this issue. |
CL https://golang.org/cl/18110 mentions this issue. |
Takes 3% off my all.bash run time. For #10571. Change-Id: I8f00f523d6919e87182d35722a669b0b96b8218b Reviewed-on: https://go-review.googlesource.com/18087 Reviewed-by: Ian Lance Taylor <[email protected]> Reviewed-by: Brad Fitzpatrick <[email protected]> Run-TryBot: Russ Cox <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
Mostly we just care that the test binaries link and start up. No need to run the full test suites. Takes 12% off my all.bash run time. For #10571. Change-Id: I01af618f3d51deb841ea638424e1389a2df7d746 Reviewed-on: https://go-review.googlesource.com/18086 Reviewed-by: Brad Fitzpatrick <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> Run-TryBot: Russ Cox <[email protected]>
Takes 15% off my all.bash run time (after this and earlier CLs, now down to 3½ from 5½ minutes). For #10571. Change-Id: Iac316ffb730c9ff0a0faa7cc3b82ed4f7e6d4361 Reviewed-on: https://go-review.googlesource.com/18088 Reviewed-by: Ian Lance Taylor <[email protected]>
CL https://golang.org/cl/18198 mentions this issue. |
These find approximately nothing. Takes 5% off my all.bash run time. For #10571. Change-Id: I21d3a844af756eb37f59bba0064f24995626da0d Reviewed-on: https://go-review.googlesource.com/18198 Reviewed-by: Brad Fitzpatrick <[email protected]>
CL https://golang.org/cl/18205 mentions this issue. |
CL https://golang.org/cl/18206 mentions this issue. |
Now there are just three programs to compile instead of many, and repeated tests can reuse the compilation result instead of rebuilding it. Combined, these changes reduce the time spent testing runtime during all.bash on my laptop from about 60 to about 30 seconds. (All.bash itself runs in 5½ minutes.) For #10571. Change-Id: Ie2c1798b847f1a635a860d11dcdab14375319ae9 Reviewed-on: https://go-review.googlesource.com/18085 Reviewed-by: Austin Clements <[email protected]> Run-TryBot: Austin Clements <[email protected]>
For #10571. Change-Id: I4bdad64e2dfd692ef2adccf2e5e82e9b1996a8ea Reviewed-on: https://go-review.googlesource.com/18206 Reviewed-by: Austin Clements <[email protected]> Run-TryBot: Austin Clements <[email protected]>
For #10571. Change-Id: I9a42226078b9c52dbe0c65cb101b5f452233e911 Reviewed-on: https://go-review.googlesource.com/18205 Reviewed-by: Ian Lance Taylor <[email protected]> Reviewed-by: Mikio Hara <[email protected]> Run-TryBot: Russ Cox <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
I notice that all.bash uses a tiny fraction of the CPU on my machine, and seems to only execute one process at a time. Would it be feasible to run more than one test process in parallel? |
@bcmills, please open a separate issue with details about your machine, Go version, and what |
Closing in favor of #26473, which has most of the recent work. |
all.bash is taking too long. There are many reasons. This is a general tracking bug for work to fix this.
The text was updated successfully, but these errors were encountered: