Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

POSIX pollqs should scale horizontally #530

Closed
gdamore opened this issue Jun 12, 2018 · 5 comments
Closed

POSIX pollqs should scale horizontally #530

gdamore opened this issue Jun 12, 2018 · 5 comments
Milestone

Comments

@gdamore
Copy link
Contributor

gdamore commented Jun 12, 2018

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 gdamore added this to the v1.2 milestone Nov 6, 2018
@zhuoyw
Copy link

zhuoyw commented Oct 21, 2019

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

@gdamore
Copy link
Contributor Author

gdamore commented Oct 21, 2019

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

@gdamore
Copy link
Contributor Author

gdamore commented Oct 21, 2019

Which platform do you need this for ?

@gdamore gdamore modified the milestones: v1.2, v1.3 Jan 21, 2020
@gdamore gdamore modified the milestones: v1.3, v1.4 Feb 25, 2020
@gdamore
Copy link
Contributor Author

gdamore commented Jan 17, 2021

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 gdamore modified the milestones: v1.4, v1.5 Jan 17, 2021
@gdamore
Copy link
Contributor Author

gdamore commented Dec 29, 2024

So I have recently been in this code, and while i don't really want to do this for the select poller, the other pollers can do it pretty much nearly trivially. The epoll() one is probably the highest priority, followed by kqueue().

@gdamore gdamore modified the milestones: v1.5, v2.0 Dec 29, 2024
gdamore added a commit that referenced this issue Dec 31, 2024
This should help Linux platforms scale even further with NNG.

Port events and *maybe* poll are the last to do.  Probably select
will remain left in the cold, because honestly select based systems
are already performance constrained.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants