News for hackers. Stuff that matters.
Re:Efficient IO with io_uring [pdf] by PaulHoule on Monday May 06, 2019 @06:51PM (#19844746)
How many times have we heard this story that there is a new async I/O interface for Linux that is better than the others?

How is this one different?

Re:Efficient IO with io_uring [pdf] by strmpnk on Monday May 06, 2019 @06:58PM (#19844783)
The linked PDF does a very good job answering that and thankfully the first couple paragraphs should give a good start to understanding how and what it solves.

The specific point to make is that while this can work with socket handles, it's primarily aimed to allow more efficient work with files (where AIO has failed to provide much benefit outside of batching operations with fewer syscalls).

io_uring is also one of the first post-spectre/meltdown syscall designs to be merged into the Linux kernel. If the ring buffer style used in this API becomes a pattern or not will be interesting.

Re:Efficient IO with io_uring [pdf] by newnewpdro on Monday May 06, 2019 @08:08PM (#19845200)
You tell me, how many?

Because to my knowledge, there's just one asynchronous IO interface Linux and it's Linux-AIO as used via io_setup()/io_submit()/io_getevents()/io_destroy() w/O_DIRECT.

There's glibc support for POSIX AIO, but that's not some kernel feature, it's just POSIX support and not especially great.

I'm inclined to suspect you're confusing asynchronous IO with the myriad file descriptor event multiplexing interfaces: select()/poll()/epoll_wait(), which are orthogonal to this.

Re:Efficient IO with io_uring [pdf] by xxpor on Monday May 06, 2019 @07:05PM (#19844826)
Using ring buffers is how networking has worked for a while now. They're nice because they're extremely fast, due to being in mechanical sympathy with hardware.

http://mechanitis.blogspot.com/2011/06/dissecting-disruptor-...

So I can't really speak to the API details, but the general concept seems like a good idea to me.

Re:Efficient IO with io_uring [pdf] by kazinator on Monday May 06, 2019 @07:57PM (#19845134)
For values of "a while" probably exceeding forty years.
Re:Efficient IO with io_uring [pdf] by xxpor on Monday May 06, 2019 @10:18PM (#19845831)
Ha. I originally wrote "a long time" but I wasn't actually sure.
Re:Efficient IO with io_uring [pdf] by gpderetta on Tuesday May 07, 2019 @10:45AM (#19849918)
forty years is probably a very conservative estimate!
Re:Efficient IO with io_uring [pdf] by rapsey on Monday May 06, 2019 @06:54PM (#19844759)
Being usable for writing to disk is pretty huge. Solves so many problems for webservers and databases.
Re:Efficient IO with io_uring [pdf] by hossbeast on Tuesday May 07, 2019 @02:17AM (#19847028)
Literally the first thing addressed in the article
Re:Efficient IO with io_uring [pdf] by hinkley on Tuesday May 07, 2019 @01:44PM (#19851686)
From the bibliography:

> In terms of benchmarks, I ran some numbers comparing io_uring to libaio and spdk. The tldr is that io_uring is pretty close to spdk, in some cases faster. Latencies over spdk are generally better. The areas where we are still missing a bit of performance all lie in the block layer, and I'll be working on that to close the gap some more.

From a status update in the article it looks like it's less than 2% slower than spdk now. Trading 2% throughput for lower latency sounds like a useful thing to me, as someone who gets judged by response times.