3 ms·
Yeah, KV is GNN's vehicle for excessively controversial (i.e., what I might call "bad") takes. I don't think he's wrong that the POSIX synchronous IO model isn
by loeg 4y ago
Yeah, KV is GNN's vehicle for excessively controversial (i.e., what I might call "bad") takes.
I don't think he's wrong that the POSIX synchronous IO model isn't a great fit for modern hardware, though. He doesn't really go into it much but (Windows) NT's async-everything IOCP model really seems to be the winner, as far as generic abstractions that have stood the test of time.
- wruza 4y agoNT's async-everything IOCP model really seems to be the winner The author talks about plumbing to data processing ratio. Let’s take hundred average programmers, let them plumb IOCP and see how many of them can even get to the “data” part.
- simplotek 4y ago> I don't think he's wrong that the POSIX synchronous IO model isn't a great fit for modern hardware, though. Opinions don't really matter. Solutions to real-world problems do. To me, the fact that no one up to this day felt that the issues in this area was significant enough to warrant a fix or an alternative tells me that it's noise about nothing.
- loeg 4y ago> To me, the fact that no one up to this day felt that the issues in this area was significant enough to warrant a fix or an alternative tells me that it's noise about nothing. Do you not view io_uring or Windows IOCP as alternatives? Or the plethora of other non-POSIX IO extensions in Linux, such as splice and sendfile? SPDK and DPDK? There’s also Google’s Fuschia operating system, which is not Posix. I think it’s pretty clear that people are investing in a variety of alternative approaches.
- PaulDavisThe1st 4y agoso what you're actually saying is that the POSIX elephant isn't (and hasn't been) actually standing on our necks after all?
- foobarian 4y agoI mean if what they want is a better standard, so there can be a dozen compliant operating systems we can all compile our stuff for, then maybe. To look at things from another angle, what if having had POSIX all these years actually made things more uniform, in the sense that we didn't have variance between systems as large as e.g. between a BSD Unix and a Lisp machine? What if that were our choices today. As it is the largest mainstream departure is maybe Windows.
- jen20 4y agoNone of the things mentioned are POSIX _or_ portable.
- deleted 4y ago[deleted]
- simplotek 4y ago> Do you not view io_uring or Windows IOCP as alternatives? I don't simply due to the fact that no one ever bothered to put something together on UNIX-like systems that resembles any of those options. If anyone felt that those were worthy ventures, in these last few years we would already have seen something resembling that effort. But we haven't.
- maccam94 4y ago> no one ever bothered to put something together on UNIX-like systems that resembles any of those options. What do you mean? io_uring is a Linux kernel interface, and there are several userspace projects that are building upon it.
- jcelerier 4y ago> To me, the fact that no one up to this day felt that the issues in this area was significant enough to warrant a fix or an alternative tells me that it's noise about nothing. yes, let's just ignore the mountains of people who end up literally reimplementing complete network stacks in userspace to handle events in a modern way
- simplotek 4y ago> yes, let's just ignore the mountains of people (...) Who are they, exactly, and why haven't anyone from that mountain thought it would be a worthy investment of their time to pull it off? I see you complaining that people have to implement things, but why has no one ever implemented the thing you perceive to be so invaluable?
- maccam94 4y agoBecause usually they are implementing a subset of the network stack that meets their needs for communication within their internal network. Porting the entire kernel stack that actually handles all of the complexities and quirks of the open internet is a larger task than they needed to tackle.
- Karrot_Kream 4y agoPeople/projects can and do implement userspace networking stacks. For example, gVisor implements its own userspace networking stack [1] isolated from the kernel networking stack. [1]: https://gvisor.dev/docs/user_guide/networking/ https://gvisor.dev/docs/user_guide/networking/
- throwaway09223 4y agoYeah, I agree that's an area that needs work. I admit I didn't bother to read every word, but I did search for "async" to see if he mentions aio(7) to complain about it and I saw that he didn't. Don't get me wrong, there are lots of room for improvements in POSIX IO interfaces. For example, POSIX doesn't define any modern event systems (epoll, kqueue, etc). But what's the result? We use libevent/libev. This sort of seems like the result he's asking for in diverging from POSIX, which we ... already have. There are a lot of pretty great non-posix standard interfaces available too!
- astrange 4y agoConcurrency is hard. If you don't have anything better to do but wait on a single file operation (which, in a CLI tool, you might not), then a synchronous call is just fine. If you do have multiple I/O operations to issue at once, that can still be synchronous with writev(). Most forms of async programming are also unstructured, which is bad for correctness, but also for performance since it can lead to priority inversions.