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

Kqueue multiple pollers #2035

Merged
merged 2 commits into from
Dec 31, 2024
Merged

Kqueue multiple pollers #2035

merged 2 commits into from
Dec 31, 2024

Conversation

gdamore
Copy link
Contributor

@gdamore gdamore commented Dec 31, 2024

fixes #

Note that the above format should be used in your git commit comments.
You agree that by submitting a PR, you have read and agreed to our
contributing guidelines.

This allows greatly increased scalability for kqueue based systems
with lots of cores (more likely FreeBSD than Darwin, as most macs
only have a smattering of cores), but even for macs we can engage
a few cores for system calls giving improvements.

The implementation here is pretty simple -- each file descriptor
gets assigned to its own kqueue by taking the numeric value of the
file descriptor modulo the number of kqueues we have opened.

The same approach will be adopted for epoll and Solaris/illumos port events.
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.
@gdamore gdamore force-pushed the kqueue-multiple-pollers branch from 9642ea6 to 90faa53 Compare December 31, 2024 02:01
Copy link

codecov bot commented Dec 31, 2024

Codecov Report

Attention: Patch coverage is 77.17391% with 21 lines in your changes missing coverage. Please review.

Project coverage is 82.80%. Comparing base (7f7a819) to head (90faa53).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/platform/posix/posix_pollq_epoll.c 67.44% 5 Missing and 9 partials ⚠️
src/platform/posix/posix_pollq_kqueue.c 85.71% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2035      +/-   ##
==========================================
- Coverage   82.88%   82.80%   -0.08%     
==========================================
  Files          95       95              
  Lines       23720    23771      +51     
  Branches     3052     3068      +16     
==========================================
+ Hits        19660    19684      +24     
- Misses       3987     4010      +23     
- Partials       73       77       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@gdamore gdamore merged commit 90faa53 into main Dec 31, 2024
34 of 36 checks passed
@gdamore gdamore deleted the kqueue-multiple-pollers branch December 31, 2024 02:32
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

Successfully merging this pull request may close these issues.

1 participant