nng icon indicating copy to clipboard operation
nng copied to clipboard

POSIX pollqs should scale horizontally

Open gdamore opened this issue 6 years ago • 4 comments

Right now we are using only a single thread for POSIX based pollqs.

There are some reasons for this, not the last of which is that event removal is difficult to coordinate across different threads. But we can either scale to multiple pollqs (based on nni_plat_ncpu), or examine the opportunity to scale a single pollq to multiple threads.

Specially the poll based poller (which nobody uses) should expand to multiple threads trivially. The others will be easier or harder depending on how we can synchronize them.

gdamore avatar Jun 12 '18 16:06 gdamore

Are there any plans for this feature? One pollq thread is not enough to leverage line rate.

zhuoyw avatar Oct 21 '19 02:10 zhuoyw

It should not be hard to do. Just haven’t got around to it.

gdamore avatar Oct 21 '19 05:10 gdamore

Which platform do you need this for ?

gdamore avatar Oct 21 '19 05:10 gdamore

There is quite a lot of evidence that this wasn't the main performance limiter. I'm moving this to 1.5. (Other issues, like the aio lock being highly contended, were a higher priority.)

gdamore avatar Jan 17 '21 00:01 gdamore