Basic proxy implementation using io_uring
git.kernel.dk
git.kernel.dk
Does the job nicely without even half the boilerplate of aio if you use liburing.
Most software doesn’t properly use the old io_submit facility and that has been around for decades, despite the large performance improvements possible. Even when io_uring is widely deployable, most software won’t use it.
But sometimes it means that what you have is software that can't run on recent enough kernel to have io_uring (^_^;;)
PREEMPT_RT also includes a lot of possible low-latency work.
io_uring also provides ridiculous performance benefits for normal server code, too.
My experience with io_uring is that it requires a fairly fundamental change in the way you architect software, which makes it hard to retrofit it to existing code (eg. code using poll). If you have a greenfield project that requires very high performance and will only/mainly run on Linux then you should strongly consider it. I'd actually love to hear peoples' thoughts on whether there is a good way to retrofit code.
This is highly disappointing to me, but also not surprising given the nature of io_uring. Solving it will require more design rigor, probably some performance compromises and possibly some degree of formal validation.
[1] https://www.phoronix.com/news/Google-Restricting-IO_uring
Whenever you write an application for internal use, where there is no possibility for an adversary to interfere and control in any way the arguments of the system calls, there is no reason to avoid io_uring or other risky system calls.
Google also writes applications in golang, maintains their own version of the Linux kernel and runs a browser monopoly. What works/doesn’t work for them shouldn’t be treated as the only standard worth considering. FWIW, fb makes plentiful use of it as I understand.
Docker doesn’t block IO_URING syscalls, you just have to be able to lock memory.
Clearly you have an axe to grind about io_uring, which is fine, I guess? But you’re really going out of your way to make it seem like it’s the worst thing ever, which is a extra.
Until now I had written exactly one message in this thread. If others have made similar statements or cited the same link it's down to the fact that some of us care a great deal and are enthusiastic about io_uring, so this relatively recent information is top of mind.
> Docker doesn’t block IO_URING syscalls
"Update RuntimeDefault seccomp profile to disallow io_uring related syscalls" from containerd-2.0.0 beta2 release[1], 3 weeks ago... (bear in mind there is considerable history here.)
What a bizarre reply.
[1] https://github.com/containerd/containerd/releases/tag/v2.0.0...
Comment history says otherwise. If you’re going to make ad hominems, at least make ‘em accurate.
# grep -i uring /boot/config-$(uname -r)
CONFIG_IO_URING=y"Google production servers" is what I should have written. io_uring on your GPC VMs has no security implications for Google itself.
1300 lines...
also, the line numbers dont actually align with the lines:
https://git.kernel.dk/cgit/liburing/tree/examples/proxy.c#n1...
and yeah, this is why you don't abuse side-by-side divs ... actually, that's a table ... and instead just make your number unselectable (there are several ways to do this).
Needs .linenumbers { line-height: 12pt } but I think vertical line spacing within text node cannot be precisely controlled and is browser dependent.
The weird thing is both are controlled by a single CSS rule,
div#cgit pre {
font-family: "Source Code Pro", "Courier New", monospace;
}
(Changing to just `monospace` fixes it.)I'm not sure how two elements could have different fonts with that. I'm possibly missing something obscure, but it really feels like a browser bug.
div#cgit pre, div#cgit code { ... }
(The buggy CSS is not present in the the official cgit repository, so I assume the owner of kernel.dk is running a patched version of cgit.)