I'm trying to figure out the bottleneck of my program. Accroding to the benchmark result, the process is blocked at line 485 of runtime/select.go for a considerably long time which is caused by http.(*persistConn).writeLoop, but I have no idea of the root cause.
I've tried to analyse the http operation in my program. but accroding to the flamegraph, my url fetch operations executed by several goroutines parallelly didn't become a significant burden. I have not use "select" in my program, either
Here is the pprof output in the "source" view:
runtime.selectgo
/usr/lib/golang/src/runtime/select.go
Total: 2.75mins 2.75mins (flat, cum) 79.42%
480 . . }
481 . . goto retc
482 . .
483 . . retc:
484 . . if cas.releasetime > 0 {
485 2.75mins 2.75mins blockevent(cas.releasetime-t0, 1)
486 . . }
487 . . return casi, recvOK
488 . .
489 . . sclose:
490 . . // send on closed channel
I'd like to know the possible cause of this cost or the way to analyze the reason of this cost.