Re:Practices for writing high-performance Go
by kasey_junk on Monday May 06, 2019 @05:57PM
(#19844336)
Not for nothing but channels become a bottleneck pretty early when you start doing highly concurrent golang.
You can very carefully design around it using only channels but it quickly starts making more sense to just use a different concurrency abstraction.
Re:Practices for writing high-performance Go
by chessturk on Monday May 06, 2019 @10:11PM
(#19845792)
My experience has been channels are a really good way to make highly concurrent code readable for people who hate concurrency (ymmv).
They aren't as efficient, but using them as a semaphore (i.e. only signaling) can facilitate fairly-efficient, easier-to-read shared memory. But I'm kind of proving the whole...
> You can very carefully design around it only channels
...part of your post.
Profile your channel latency, then design around that. "Small RPCs?" With an 88 core server, should you be making that many remote procedure calls? Find the 20% most intensive code and take that out of the hands of the scheduler, as much as possible.
and runtime.mallocgc
Even with sync.Pool? Can you design those parts of the system to mostly use the stack?