3 ms·
io_uring puts me in mind of a 2012 prototype of async and batched syscalls that sped up MySQL by 40%! https://www.usenix.org/legacy/events/osdi10/tech/full_pap
by willvarfar 7y ago
io_uring puts me in mind of a 2012 prototype of async and batched syscalls that sped up MySQL by 40%! https://www.usenix.org/legacy/events/osdi10/tech/full_papers/Soares.pdf https://www.usenix.org/legacy/events/osdi10/tech/full_papers...
The cost of syscalls has gone up massively due to all the mitigations against recent side channel attacks. Batching and async syscalls would be an even bigger win than ever.
Wouldn't it be great if glib or something could adopt new mechanisms and everyone got faster?
- api 7y agoIn the long term I think OS APIs need to be redesigned (or at least the calling mechanism) around something more like io_uring for a lot of things. Shared memory, lock-free data structures, no syscalls.
- willvarfar 7y agoAnd, back in 2012, cores were expensive. Now we have more cores than software to run on them, and having the kernel and user-space in respective busy nop loops waiting to get something is finally something to fill them up with? The dynamics and mechanical sympathy of different approaches are changing as hardware goes massively parallel faster than software can.
- tyingq 7y agoA popular standard cross process safe api to use mmap() for IPC, kv cache, locking, etc, might help as well. I understand it's already possible, but it's either reinvented every time, or eschewed for cross-host...often when not needed.
- BubRoss 7y agoLike this? https://github.com/LiveAsynchronousVisualizedArchitecture/simdb https://github.com/LiveAsynchronousVisualizedArchitecture/si...
- cesarb 7y ago> Shared memory, lock-free data structures, no syscalls. You'd still need a syscall to sleep when the ring is empty, and a syscall to wake up the mechanism when the first request is put on an empty ring. But yeah, other than that (and perhaps an "yield" syscall), you could do everything through the ring.
- yxhuvud 7y agoYou can actually go totally syscall free with io_uring, but that requires privileged mode as the setup call to enable the SQPOLL flag will fail otherwise. But yeah, I suppose most people don't like running things as sudo.
- couchand 7y agoWell, not totally free. If you don't submit an event before the sq poll timeout the kernel thread will sleep and you need to call enter again to wake it up.
- BubRoss 7y agoReinventing QNX will be cutting edge for decades
- hinkley 7y agoI’d be curious to see some statistics about the number of system calls per second now versus ten years ago. I have a suspicion they’re much higher. If the scale of the problem changes, so does the solution. We know this.