Live data from Hacker News

A programmer-friendly I/O abstraction over io_uring and kqueue

tigerbeetle.com

21–30 of 34 posts

Re: A programmer-friendly I/O abstraction over io_uring and kqueue

#21
post #17

"The good news is that Windows also has a completion based system similar to io_uring but without batching, called IOCP" fwiw IOCP in NT predates the similar mechanisms in Linux by at least a decade (and the VMS QIO scheme upon which it was in turn based is even older). As I understand it the reason Unix(1) (and then Linux) did not have efficient network I/O kernel interfaces until relatively recently was due to fear…

TL;DR - Async I/O wasn't included in Unices because it's hard & complex and unices are about keeping to the simple till you can no longer lie about it being painless. Considering that Windows NT's IOCP is very close to direct copy of VMS QIO mechanism (and even more underneath in officially undocumented boundary layer between user space and kernel space), I don't think it's a case of patents. UNIX was just always aga…

MS fought a legal battle with Dec over Cutler's move. Supposedly that ended up settled such that MS had license to Dec patents and explains why NT resembles VMS yet no lawsuit from Dec. Meanwhile other Unix vendors did not have said license. Fwiw I heard this story directly from Unix vendors OS devs when I worked at Netscape on servers (that supported IOCP on NT and hence often performed much better on a low end PC vs high end Unix iron).

https://techmonitor.ai/technology/dec_forced_microsoft_into_...

Re: A programmer-friendly I/O abstraction over io_uring and kqueue

#23
post #17

Earlier quoted context omitted.

TL;DR - Async I/O wasn't included in Unices because it's hard & complex and unices are about keeping to the simple till you can no longer lie about it being painless. Considering that Windows NT's IOCP is very close to direct copy of VMS QIO mechanism (and even more underneath in officially undocumented boundary layer between user space and kernel space), I don't think it's a case of patents. UNIX was just always aga…

> Considering that Windows NT's IOCP is very close to direct copy of VMS QIO mechanism Microsoft hired the main architect of VMS, Dave Cutler, away from DEC to design Windows NT - so this shouldn’t be a surprise. https://news.ycombinator.com/item?id=32602132

Not only that, Cutler went to MS essentially with a team and a project (that didn't get accepted at Digital) to redo VMS from scratch using same principles but with new experience and in cleaner way.

Re: A programmer-friendly I/O abstraction over io_uring and kqueue

#24
post #17

Earlier quoted context omitted.

TL;DR - Async I/O wasn't included in Unices because it's hard & complex and unices are about keeping to the simple till you can no longer lie about it being painless. Considering that Windows NT's IOCP is very close to direct copy of VMS QIO mechanism (and even more underneath in officially undocumented boundary layer between user space and kernel space), I don't think it's a case of patents. UNIX was just always aga…

MS fought a legal battle with Dec over Cutler's move. Supposedly that ended up settled such that MS had license to Dec patents and explains why NT resembles VMS yet no lawsuit from Dec. Meanwhile other Unix vendors did not have said license. Fwiw I heard this story directly from Unix vendors OS devs when I worked at Netscape on servers (that supported IOCP on NT and hence often performed much better on a low end PC v…

The legal battle happened because it wasn't just that MS hired Cutler out of Digital - They effectively hired out a team that will as already working on design for next generation OS based on the same principles as VMS, and litigation went down on that IP.

Re: A programmer-friendly I/O abstraction over io_uring and kqueue

#25

Earlier quoted context omitted.

Is there any attempt to reorder IO events such that writes (and maybe reads) operate in as contiguous of a manner as possible? It might only be relevant in the case of multiple writes to the same file, so the complexity trade-off might not be worth it for TigerBeetle, but might be worth it for other systems. Edit: also, are you guys hiring? ;)

We are definitely hiring a designer in Europe. :) I asked DJ (not on HN, but hangs out in our community Slack [3] where you can ask further if curious), who knows the disk side of things best, and he responds: The OS is free to reorder writes (this is true for both io_uring and conventional IO). In practice it does this for spinning disks, but not SSDs. The OS is aware of the "geometry" of a spinning disk, i.e. what…

Write (and read) request reordering happens on Windows with all disk types. In theory it shouldn't be, but in practice we have stats that show that it does. Just fyi.

Re: A programmer-friendly I/O abstraction over io_uring and kqueue

#27
post #24

Earlier quoted context omitted.

MS fought a legal battle with Dec over Cutler's move. Supposedly that ended up settled such that MS had license to Dec patents and explains why NT resembles VMS yet no lawsuit from Dec. Meanwhile other Unix vendors did not have said license. Fwiw I heard this story directly from Unix vendors OS devs when I worked at Netscape on servers (that supported IOCP on NT and hence often performed much better on a low end PC v…

The legal battle happened because it wasn't just that MS hired Cutler out of Digital - They effectively hired out a team that will as already working on design for next generation OS based on the same principles as VMS, and litigation went down on that IP.

Afaik Dec was pretty mismanaged at this time and Cutler didn't get his project greenlit. So "hired out" sounds more evil than it actually was. Microsoft saw the potential of Cutler's vision while Dec was busy being stupid. Why stay at Dec and work in something you don't believe in?

Re: A programmer-friendly I/O abstraction over io_uring and kqueue

#28
post #26

I just watched your talk at the CMU database talks. Just wanted to say I really appreciate reading/hearing about your approach! TB is a super interesting system, I hope I get to properly use it someday.

Thanks @valzam! Really appreciate hearing also that you enjoyed our talk! Would be great to stay in touch.

Re: A programmer-friendly I/O abstraction over io_uring and kqueue

#29
post #26

I just watched your talk at the CMU database talks. Just wanted to say I really appreciate reading/hearing about your approach! TB is a super interesting system, I hope I get to properly use it someday.

Which talk is this? This one: https://www.youtube.com/watch?v=FyGukn77gqA ?

Re: A programmer-friendly I/O abstraction over io_uring and kqueue

#30
post #24

Earlier quoted context omitted.

The legal battle happened because it wasn't just that MS hired Cutler out of Digital - They effectively hired out a team that will as already working on design for next generation OS based on the same principles as VMS, and litigation went down on that IP.

Afaik Dec was pretty mismanaged at this time and Cutler didn't get his project greenlit. So "hired out" sounds more evil than it actually was. Microsoft saw the potential of Cutler's vision while Dec was busy being stupid. Why stay at Dec and work in something you don't believe in?

Oh, I didn't see "hired out" as evil. Whether it was mismanagement on Digital side to not greenlit Cutler's vision I'm not sure, but there could have been better ways even if they didn't want to replace VMS at the time.
Post reply on HN