On Wednesday, 28 December 2016 19:06:42 UTC+11, Ganesh Sangle wrote: > > Hi, > While examining the stack trace from a crash where the process seems to > have become extremely slow, I see a lot of these goroutines: > > goroutine 66 [mark worker (idle)]: > runtime.gopark(0x2cf6cf0, 0xc820d10000, 0x29268b0, 0x12, 0x14, 0x0) > /usr/local/go/src/runtime/proc.go:185 +0x163 fp=0xc82006ff50 > sp=0xc82006ff28 > runtime.gcBgMarkWorker(0xc820016000) > /usr/local/go/src/runtime/mgc.go:1289 +0xf7 fp=0xc82006ffb8 > sp=0xc82006ff50 > runtime.goexit() > /usr/local/go/src/runtime/asm_amd64.s:1696 +0x1 fp=0xc82006ffc0 > sp=0xc82006ffb8 > created by runtime.gcBgMarkStartWorkers > /usr/local/go/src/runtime/mgc.go:1239 +0x93 > > > There are *65* such goroutines according to stack trace. Can someone help > me understand what could be going on ? > > 1. Why does go need so many routines gcBgMarkWorkers ? >
There should be only as many background workers as CPUs in your host. Have you, or a library you use, altered GOMAXPROCS? Does your machine have 64 or more cpus? > 2. Does it indicate that the process is thrashing memory somehow ? Does it > indicate to any specific symtoms ? > No, these workers are idle > 3. Can it make the process super slow ? > If there were all running, maybe, but they are idle. These are just normal goroutines and the runtime is built to handle hundreds of thousands of idle goroutines. > > Thanks for the help ! > > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.