[go-nuts] Re: Golang goroutine slow down when adding concurrency

2017-10-28 Thread Yannic
You might want to take a look at this video https://youtu.be/ySy3sR1LFCQ which shows some common issues with concurrency in go and how to use pprof and the go tracer to inspect and fix them. Hope this helps a bit. Yannic On Friday, October 27, 2017 at 2:38:00 PM UTC+2, Christian LeMoussel wrot

[go-nuts] Re: Golang goroutine slow down when adding concurrency

2017-10-27 Thread Christian LeMoussel
@Jake, I start in Go. I'm not familiar with the use of pprof. I do this go tool pprof -list=calculate goRoutineBench /tmp/profile152563623/cpu.pprof I get this Total: 1.84mins ROUTINE main.calculate in goRoutineBench.go 1.84mins 1.84mins (flat, cum) 99.86% of Total

[go-nuts] Re: Golang goroutine slow down when adding concurrency

2017-10-27 Thread T L
try debug.SetGCPercent(1000). On Friday, October 27, 2017 at 8:38:00 AM UTC-4, Christian LeMoussel wrote: > > Hi, I am studying about golang and use of goroutine. > With this sample code, on my PC with 4 logical CPUs, I can't understand > why I don't have any performance improvement. > > If I

[go-nuts] Re: Golang goroutine slow down when adding concurrency

2017-10-27 Thread jake6502
You could run pprof to get a full breakdown. But just looking at your code, it occurs to me that you have goroutines that do pretty much no actual computation. It is basically testing the concurrent performance of *append()*. Without looking at pprof, I can not say for sure where the bottlenec