== About == Gospeed is a library of micro-benchmarks for Go which evolved from the GoLightly project. It's main utility is for understanding and reasoning about the performance of Go programs. == Usage == Download the repo to a convenient location in your $GOPATH and then run the benchmarks with: go test -v -test.bench=".*" -test.timeout="60m" the sixty minute timeout may be necessary when running the entire benchmark suite or portions which make significant use of channels as the default aggregate test timeout is ten minutes.
Go micro-benchmarks for calculating the speed of language constructs
== About == Gospeed is a library of micro-benchmarks for Go which evolved from the GoLightly project. It's main utility is for understanding and reasoning about the performance of Go programs. == Usage == Download the repo to a convenie
Resource links
0 Open
More issues
Closed
I encountered a out of memory error when running the full benchmark. Obviously not your fault, but just wanted to give you a heads up.
It seems the memory overhead for creating a mere 500 000 go routines required more than my 4GB. I added another 1GB of swap just to test and it still crashed with an OOM.
The issue is reproducible on my machine by running the benchmarks with
$ go test -v -test.bench=".*"
which would throw out the following when hitting the BaselineGo benchmark.
throw: out of memory (FixAlloc)
goroutine 1 [chan receive]:
testing.(*B).run(0xf8400730a0, 0x9732500000003, 0x7ff66dc53e10, 0x100000001)
/home/simon/lib/golang/src/pkg/testing/benchmark.go:133 +0x49
testing.RunBenchmarks(0x400c00, 0x571850, 0x6700000067, 0x0)
/home/simon/lib/golang/src/pkg/testing/benchmark.go:244 +0x4c1
testing.Main(0x400c00, 0x56c528, 0x100000001, 0x571850, 0x6700000067, ...)
/home/simon/lib/golang/src/pkg/testing/testing.go:293 +0x180
main.main()
/tmp/go-build113068524/github.com/feyeleanor/gospeed/_test/_testmain.go:249 +0x91
goroutine 2 [syscall]:
created by runtime.main
/home/simon/lib/golang/src/pkg/runtime/proc.c:221
goroutine 54 [running]:
github.com/feyeleanor/gospeed.BenchmarkBaselineGo(0xf8400730a0, 0x41f661)
/home/simon/src/github.com/feyeleanor/gospeed/baseline_benchmark_test.go:282 +0x37
testing.(*B).runN(0xf8400730a0, 0xf4240, 0x2710000f4240, 0xbabf2000babf2)
/home/simon/lib/golang/src/pkg/testing/benchmark.go:84 +0x4e
testing.(*B).launch(0xf8400730a0, 0x0)
/home/simon/lib/golang/src/pkg/testing/benchmark.go:169 +0x147
created by testing.(*B).run
/home/simon/lib/golang/src/pkg/testing/benchmark.go:132 +0x2c
Simply running
$ go test -v -test.bench="BaselineGo"
would not reproduce the error, but still consume a lot of memory.
P.S. Thanks for the nice benchmarks. Really helps when you'd like to know how the basic constructs of the language perform.
opened Mar 22, 2012 by simonklee 3
Contents
Share this repo
Related Repos
3
4
4.6k
8
8
2k
18
5.9k
13
59
245
34
185
3.3k
97