Recently I've been seeing this in different forums. As far as I can tell from reading some forum discussions it is something to do with input and output. What exactly is io_uring?
io_uring spawns workers only when there is work to process. We control how many requests we submit and can throttle new submissions based on completion notifications. io_uring retires workers when there is no more pending work in the queue. Although, there is a grace period before a worker dies.
liburing provides helpers to setup and teardown io_uring instances, and also a simplified interface for applications that don't need (or want) to deal with the full kernel side implementation.
Nuclei uses epoll on Linux as primary evented IO backend, secondarily (if your system supports) you can use io_uring. On MacOS, Nuclei is using kqueue. On Windows, IOCP backend is used. Current io_uring implementation needs Linux kernel 5.6+.
epoll is a Linux kernel system call for a scalable I/O event notification mechanism, first introduced in version 2.5. 44 of the Linux kernel. Its function is to monitor multiple file descriptors to see whether I/O is possible on any of them.
io_uring
is a (new as of mid 2019) Linux kernel interface to efficiently allow you to send and receive data asynchronously. It was originally designed to target block devices and files but has since gained the ability to work with things like network sockets.
Unlike something like epoll()
, it is built around a completion model rather than a readiness model. This is desirable because other operating systems have used the completion model successfully for some time. io_uring
provides something competitive and complete for Linux without the drawbacks the previous Linux AIO interface has.
The author of io_uring
has written a PDF document titled Efficient IO with io_uring which discusses its usage in a technical fashion. A gentler introduction is provided by the Lord of the io_uring guide. You can read ScyllaDB developer Glauber Costa proselytize it in How io_uring and eBPF Will Revolutionize Programming in Linux. Lastly, LWN.net has written about io_uring
many times.
(Shameless plug: I've written a more linky answer on the "Is there really no asynchronous block I/O on Linux?" question)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With