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
Add io_uring support to nginx #21
Comments
Wow! It looks like a good patch. I'll test this patch and respond again. :) Can you send me a Pull Request if possible? (excluding .gitignore) |
I expect liburing will be a standard package for most Linux distributions in the future, just like today's libaio
After the patch being stable enough ;) |
The most efficient way is to replace the whole epoll module with liburing's io_uring_prep_poll_add. I've tried it and failed. The epoll module is too complicate for me :( |
conflict with lua nginx module |
oh, it's my fault. |
hmm |
I wonder which Linux distro ( uses kernel 5.1 ) are you guys using? :) |
yes, 5.1 by elrepo. which mean the "anon_inode:[io_uring] (stat: No such file or directory)" |
IDK... |
could you using this command?
你看方便看一下不,取liburing,是看不到提示的。。。
|
https://unix.stackexchange.com/questions/463548/what-are-anon-inodes It's strange that lsof recognizes io_uring fd as a regular file (REG). But because io_uring is not a regular file of course results in No such file or directory May because lsof doesn't support io_uring well (yet) |
OK, thank you. |
No, but there is no doubt that io_uring performs better than Linux AIO. Because Linux AIO only supports files opened with O_DIRECT, other files ( notably buffered files ) are implicitly all handled synchronously. |
How did you do that? |
@CarterLi |
After 3 hours of debugging, 2 bugs are fixed, patch updated. Still doesn't work though... (it's very strange that ngx_epoll_process_events doesn't seem to be called) To test it, make sure you have |
See #22 |
Add io_uring support to nginx (Fixes #21)
@denji What did you want to say? |
This patch tries to use the new AIO kernel feature
io_uring
. It simply replace the oldLinux AIO
code withliburing
( almost function to function change ). Have no time to test it yet.Any feedback is welcome.
Dependencies
More info:
Detail
Instead of using eventfd to bridge AIO code with epoll module, the patch polls ring_fd directly, which reduces a lot of code ( and may get better performance )
Patch
Should apply to the clean nginx-1.17.0
Patch removed
License
Public domain
The text was updated successfully, but these errors were encountered: