evio icon indicating copy to clipboard operation
evio copied to clipboard

numLoops > 1 will make udp server slower

Open tianlin opened this issue 2 years ago • 0 comments

Hi: I found when set numLoops > 1, udp server with evio will be slower than numLoops = 1. Use profile, I found there is too much syscall in loopUDPRead(s, l, i, fd).
I add a debug code fmt.Println("-- loop udp read --", l.idx) before loopUDPRead, then send just one udp msg to it, there are numLoops's print in stdout. I change the LoadBalance to AtLeastConnections / RoundRobin, there is also more call to loopUDPRead when numLoops > 1.

tianlin avatar Mar 31 '22 07:03 tianlin