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

Use epoll over io_uring channel for Unix Domain Sockets #2791

Closed
wants to merge 1 commit into from

Conversation

atakavci
Copy link
Collaborator

fix for the issue #2790

the current implementation uses io_uring as preferred.
the change contains switch of precedence to use epoll over io_uring.
I did some reading on the performance comparisons of io_uring and epoll;
io_uring is considered faster than epoll in some cases and not in others. -> axboe/liburing#536

Since we are changing default behavior when both of them are available, there will be some performance change for clients that have both in runtime.
i cant evaluate exactly how big the impact is and/or how many client will be impacted.
happy to hear any comments.

  • You have read the contribution guidelines.
  • You have created a feature request first to discuss your contribution intent. Please reference the feature request ticket number in the pull request.
  • You use the code formatters provided here and have them applied to your changes. Don’t submit any formatting related changes.
  • You submit test cases (unit or integration tests) that back your changes.

@@ -74,7 +74,7 @@ public static Class<? extends DatagramChannel> datagramChannelClass() {
public static class NativeTransports {

static EventLoopResources RESOURCES = KqueueProvider.isAvailable() ? KqueueProvider.getResources()
: IOUringProvider.isAvailable() ? IOUringProvider.getResources() : EpollProvider.getResources();
: EpollProvider.isAvailable() ? EpollProvider.getResources() : IOUringProvider.getResources();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would leave the order as is and only apply a tweak in the domain socket class retrieval. I'll take care of this during the merge.

@mp911de mp911de changed the title use epolll over io_uring channel for Unix Domain Sockets / issue #2790 Use epolll over io_uring channel for Unix Domain Sockets Mar 18, 2024
@mp911de mp911de changed the title Use epolll over io_uring channel for Unix Domain Sockets Use epoll over io_uring channel for Unix Domain Sockets Mar 18, 2024
mp911de pushed a commit that referenced this pull request Mar 18, 2024
mp911de added a commit that referenced this pull request Mar 18, 2024
Reinstate resources ordering to provide higher performance io_uring when epoll and io_uring transports are available. Use epoll domain socket channel when io_uring and epoll are available.

Original pull request: #2791
mp911de pushed a commit that referenced this pull request Mar 18, 2024
mp911de added a commit that referenced this pull request Mar 18, 2024
Reinstate resources ordering to provide higher performance io_uring when epoll and io_uring transports are available. Use epoll domain socket channel when io_uring and epoll are available.

Original pull request: #2791
@mp911de
Copy link
Collaborator

mp911de commented Mar 18, 2024

Thank you for your contribution. That's merged, polished, and backported now.

@mp911de mp911de closed this Mar 18, 2024
@mp911de mp911de added the type: bug A general bug label Mar 18, 2024
@mp911de mp911de added this to the 6.3.3.RELEASE milestone Mar 18, 2024
@tishun tishun modified the milestones: 6.3.3.RELEASE, 6.4.0.RELEASE Jul 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants