Live data from Hacker News

Asynchronous IO: the next billion-dollar mistake?

yorickpeterse.com

161–165 of 165 posts

Re: Asynchronous IO: the next billion-dollar mistake?

#161
post #30

Earlier quoted context omitted.

Sorry, which one came first between io_uring and windows RIO? https://learn.microsoft.com/en-us/previous-versions/windows/...

I think you missed the point: io_uring is the newer API. Microsoft saw the new async IO API developed for Linux, and made a version for Windows. If what Windows has had all along is so great, why did they bother cloning io_uring when io_uring came along? It definitely isn't because there's any significant body of software relying on io_uring yet. My theory: people like to extol the virtues of NT's IOCP as "checking t…

> I think you missed the point: io_uring is the newer API.

GP was pointing out that io_uring came after RIO; RIO has similar capabilities to io_uring for the network space. GP did not "miss the point".

> Microsoft understand quite well that they have pervasive issues with IO performance

This has nothing to do with IOCP but rather the file system filters. This is why removal of file system filters from "DevDrive" (a ReFS volume) improves performance vs a ReFS volume with file system filters in place.

> If what Windows has had all along is so great, why did they bother cloning io_uring when io_uring came along?

IoRing eliminates the need to copy buffers between kernel and user space [0][1].

With regards to performance, this is a bench between a traditional multithreaded UDP server and an RIO IOCP UDP server. The gains are significant. [2] And further comparisons... [3]

> seldom bother to assess whether the decades-old async API actually offers good performance in comparison to more recent alternatives

There are no complete alternatives [r]. Nor is Linux fully asynchronous throughout the kernel.

> introducing DirectStorage

Not really relevant to the context. DirectStorage is a method to deliver data from nVME storage with minimal CPU overhead and/or compressed [4]. Such a system would improve performance on any OS and indeed, we can see that on PS OS (PS5, FreeBSD-based (probably)). Again, limited in scope.

I'm honestly not sure what you're attempting to argue. IoRing brings improvements, yes, but isn't a replacement of IOCP. We should see improvements in any mainstream kernel as a good thing. It's progress. And hopefully the Linux kernel gets to full async I/O at some point in the future.

[0] https://windows-internals.com/i-o-rings-when-one-i-o-operati... (this is from a co-author of Windows Internals)

[1] https://windows-internals.com/ioring-vs-io_uring-a-compariso...

[2] https://serverframework.com/asynchronousevents/2012/08/winso...

[3] https://speakerdeck.com/trent/pyparallel-how-we-removed-the-...

[4] https://stackoverflow.com/questions/73878597/what-are-the-di...

[5] https://learn.microsoft.com/en-us/gaming/gdk/_content/gc/sys...

Re: Asynchronous IO: the next billion-dollar mistake?

#162
post #153

Earlier quoted context omitted.

Yes, it is nearly a 1:1 copy of io_uring, but unlike io_uring which applies to a single function, all I/O in the NT kernel is asynchronous. IOCP acts on file, network, mail slot, pipes, etc. IoRing/io_uring is for files only. RegisteredIO is network only. While Windows userland itself may be a 'mess' and archaic in it's own way (among the other anti-consumer bits), the NT kernel is technically quite advanced, not onl…

A free sample chapter from Windows Internals about the I/O system for the curious: https://www.microsoftpressstore.com/articles/article.aspx?p=...

Thanks, but I've been referring people like you who lack an understanding of Windows I/O (and VMM) to this book since at least the 4th edition.

I've had my copy of the 7th since it came out.

Re: Asynchronous IO: the next billion-dollar mistake?

#163
post #99

Earlier quoted context omitted.

> a consequence of C winning. C likes a single flat address space. Interesting. What other language did C beat? How was their address space handling different?

C allows casting to (void *). That implies all pointers are in the same address space. Segmented architectures, where that's not true, have mostly died out. Burroughs used to build segmented address space machines where an address was a path, something like programname/scopename/variablename[subscript]. IBM's System 38 had an "object" architecture. Both worked fine, but were not very C-compatible.

Thanks.

Re: Asynchronous IO: the next billion-dollar mistake?

#164
post #153

Earlier quoted context omitted.

A free sample chapter from Windows Internals about the I/O system for the curious: https://www.microsoftpressstore.com/articles/article.aspx?p=...

Thanks, but I've been referring people like you who lack an understanding of Windows I/O (and VMM) to this book since at least the 4th edition. I've had my copy of the 7th since it came out.

It wasn't for your benefit somce you obviously are familiar with the topic, but for passers-by who may be interested in the topic.
Post reply on HN