4 ms·
I think "zero-copy" is the actual gem which might actually move us closer to making more of our systems have "less visible" plumbing. There's always going to
by breatheoften 4y ago
I think "zero-copy" is the actual gem which might actually move us closer to making more of our systems have "less visible" plumbing. There's always going to be plumbing somewhere and it's not so actually directly actionable to observe that we have "too much of it". There needs to be a signal to guide a process by which we remove unnecessary necessary plumbing to obtain benefit.
I think there are significant advantages that will accrue by moving toward systems designs that encourage "more zero copy plumbing" -- not totally clear on all the ways the posix legacy might prevent that but the parts of posix that do prevent that will prove to be the most important pieces to shed I think.
- PaulDavisThe1st 4y agoConsider mmap .. your perfect candidate, it would seem, to be the basis for zero copy everything. No more read/write, your files are just chunks of memory and if you are reasonably smart about it, you can end up with either zero or just single copy semantics. Wheee! Then you go and look at performance, and you start to notice how some programs seem to benefit from this design, and some suffer greatly for it. You start to realize that the OS's model of likely program I/O (because let's face it, your data is not actually in volatile RAM) is sometimes right and sometimes wrong. And so you start moving either towards a model that defines the data you want to read, so that the OS can do a better job of making it all work the way you imagine it should, or you start trying to bypass the OS entirely to avoid it interfering (O_DIRECT, dear friend). But then you start realizing that your lovely zero-or-low copy design doesn't play well with others, because the OS is still working for them, and you and the OS are now stepping on each other toes. And so it goes. Then you try to use mmap on your audio interface, precisely to avoid unnecessary data copies, and you realize you didn't even understand what memory or mmap actually meant at all. Which is probably as it should be.
- puffoflogic 4y agoOne of the things which most fascinated me about the Mill architecture (don't bother checking for updates, it's as vaporware as ever) was the ability to pass arbitrary memory ranges across "process"/security boundaries, rather than being stuck with page granularity and requiring complex OS assistance. This would make zero-copy much easier to accomplish. Page-based memory protection is holding us back: pages are a clever solution to, well, paging to disk, but a remarkably terrible solution for everything else they're used for.