|
|
Log in / Subscribe / Register

Axboe: io_uring and networking in 2023

Jens Axboe has posted a detailed guide to improving the performance of networking applications with io_uring.

Network applications have been written with a readiness type of model for decades, most commonly using epoll(2) these days to get notified when a given socket has data available. While these applications can be adapted to io_uring by swapping epoll notifiers with io_uring notifiers, going down that path does not lead to an outcome that fully takes advantage of what io_uring offers. It’ll potentially provide a reduction of system calls compared to epoll, but will not be able to take advantage of some of the other features that io_uring offers. To do that, a change to the IO event loop must be done.


to post comments

Axboe: io_uring and networking in 2023

Posted Feb 15, 2023 22:07 UTC (Wed) by dcoutts (subscriber, #5387) [Link] (2 responses)

This is great. The one thing I'd like to know more about is how much of a performance effect we're likely to see when using the various performance features. I know any detailed answer would have to include "it depends...", but some indication of the order of magnitude of the effect would be useful. Coding up and benchmarking each one takes quite some time, so help to prioritise the ones that are worth it would be very useful.

Axboe: io_uring and networking in 2023

Posted Feb 15, 2023 23:05 UTC (Wed) by axboe (subscriber, #904) [Link] (1 responses)

I hope to post something like that too, as I agree it would be useful. This is why there's a sentence in there about this particular doc not being a case study, it's merely describing some of the newer features that a) are applicable to networking, and b) may not be as well known just yet.

Axboe: io_uring and networking in 2023

Posted Feb 15, 2023 23:17 UTC (Wed) by dcoutts (subscriber, #5387) [Link]

Wonderful! Will look forward to it.

Axboe: io_uring and networking in 2023

Posted Feb 15, 2023 23:16 UTC (Wed) by dcoutts (subscriber, #5387) [Link]

More closely related further reading: https://kernel.dk/axboe-kr2022.pdf

Slides by Jens Axboe covering similar material. Also includes one benchmark result, yay!

Axboe: io_uring and networking in 2023

Posted Feb 15, 2023 23:33 UTC (Wed) by abacus (guest, #49001) [Link] (2 responses)

There is another networking API that requires pre-registration of buffers, namely the RDMA API. Does anyone plan to write a comparison of these two APIs?

Axboe: io_uring and networking in 2023

Posted Feb 16, 2023 12:33 UTC (Thu) by stefanha (subscriber, #55072) [Link] (1 responses)

The difference is that RDMA provides that receive buffers that hardware will receive into while io_uring provided buffers are only selected when data has already been received by the network device.

The advantage of RDMA is zero-copy receive. The advantage of io_uring provided buffers is the ability to receive efficiently from many sockets into a smaller pool of buffers (for scalability).

Axboe: io_uring and networking in 2023

Posted Feb 16, 2023 19:47 UTC (Thu) by axboe (subscriber, #904) [Link]

Work is ongoing to support zerocopy rx with io_uring, so basically using provided buffers but passing them all the way down so that the NIC receives into them.

Axboe: io_uring and networking in 2023

Posted Nov 15, 2023 3:11 UTC (Wed) by walkerlala (guest, #104060) [Link]

Great to hear that!

Hope that we could close this long standing thread this year https://github.com/axboe/liburing/issues/189 !


Copyright © 2023, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds