go: cmd/go: go cmd performance degradation on Plan 9 between Go 1.9 and 1.11
What version of Go are you using (go version
)?
go 1.11 plan9/amd64
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (go env
)?
GOARCH=‘amd64’ GOBIN=‘’ GOCACHE=‘/usr/driusan/lib/cache/go-build’ GOEXE=‘’ GOFLAGS=‘’ GOHOSTARCH=‘amd64’ GOHOSTOS=‘plan9’ GOOS=‘plan9’ GOPATH=‘/usr/driusan/go’ GOPROXY=‘’ GORACE=‘’ GOROOT=‘/usr/driusan/go1.11’ GOTMPDIR=‘’ GOTOOLDIR=‘/usr/driusan/go1.11/pkg/tool/plan9_amd64’ GCCGO=‘gccgo’ CC=‘6c’ CXX=‘g++’ CGO_ENABLED=‘0’ GOMOD=‘’ CGO_CFLAGS=‘-g -O2’ CGO_CPPFLAGS=‘’ CGO_CXXFLAGS=‘-g -O2’ CGO_FFLAGS=‘-g -O2’ CGO_LDFLAGS=‘-g -O2’ PKG_CONFIG=‘pkg-config’ GOGCCFLAGS=‘-fPIC -m64 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build647141787=/tmp/go-build -gno-record-gcc-switches’
What did you do?
Ran go fmt ./...
on the package github.com/driusan/dgit
. Load spikes to 100% and it takes over 2 minutes, while this wasn’t the case with previous versions of Go.
term% time $home/go1.9.2/bin/go fmt ./… 0.05u 0.11s 4.32r /usr/driusan/go1.9.2/bin/go fmt ./… term% time $home/go1.11/bin/go fmt ./… 39.60u 1.11s 129.93r /usr/driusan/go1.11/bin/go fmt ./…
What did you expect to see?
Similar performance to previous releases in go fmt.
What did you see instead?
A 30x performance degradation.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 1
- Comments: 18 (11 by maintainers)
I am unable to make sense of this statement no matter how I interpret it.
It’s not a problem of it getting slower; it’s a problem of something bad happening in the runtime.
Testing on several machines shows an average of around 0.5 seconds passing before main() is even reached, so calling it the “new performance baseline” and closing the issue seems a bit absurd in the face of evidence that the runtime may no longer be behaving sanely.
I found the commit that appears to mark when this problem began, but I don’t use or write go, so somebody else will have to investigate if they want to find out what is really going on. https://github.com/golang/go/commit/c2cdfbd1a75b74bf7b960f6904fcfaaad9edb708
At this point Go 1.11 is no longer even supported, so the regression in performance is de facto the new performance baseline for the
go
command on Plan 9.I have no objection if someone wants to contribute fixes for the general problem of Go getting slower on Plan 9, but I don’t think we need to keep an open issue against
cmd/go
to track it.As this is actively worked on, I am going to reopen this.
OK, that was mine, sorry. It seems to be only an amd64 problem: plan9 on arm and 386 are unaffected. I can see what’s gone wrong, so I’ll try to sort it out.