#io_uring

Marcel Waldvogelmarcel@waldvogel.family
2025-05-16

All you never wanted to know about creating fast socket I/O on #Linux. Unless you are a real geek.

A small, ultra-high performance publish-subscribe server doing kind of TCP #multicast using #sendfile, #io_uring, #splice, (mapped) files, and #fallocate for file hole punching.

Saturating a 10 Gbps link with useful data with just 8 cores.

A beautiful writeup for anyone into fast Linux networking. Not just for #ATproto

h/t @nohillside
#PubSub #Kernel #Hacking
asayers.com/jetrelay

Ersatz social image for the article; screenshot of title and abstract:

"
Let the kernel do the work!
Tricks for implementing a pub/sub server

This post explains the design of jetrelay, a pub/sub server compatible with Bluesky’s “jetstream” data feed. Using a few pertinent Linux kernel features, it avoids doing almost any work itself. As a result, it’s highly efficient: it can saturate a 10 Gbps network connection with just 8 CPU cores.
May 2025
"
Geeklandgeekland
2025-05-01
Scripter :verified_flashing:scripter@social.tchncs.de
2025-04-29

Linux: Kritische Sicherheitslücke in Kernel-API entdeckt
winfuture.de/news,150557.html #Linux #LinuxKernel #Sicherheitslücke #io_uring

2025-04-15

Do any operating systems other than #Linux (#Windows, #macOS, #FreeBSD, #OpenBSD, etc) have an API for non-blocking file IO?

I know Linux has that in #io_uring, which can do almost any IO operation (even fsync) in the background and tell you when it's done, but is that the only OS with such a feature?

#programming #async

Nils Goroll 🕊️:varnishcache:slink@fosstodon.org
2025-03-02

Does anyone happen to have any information on the relevance of UIO_FASTIOV (defined as 8 on #Linux). I understand that submitting vectored io with within this limit can avoid dynamic memory allocation in the kernel, but is this relevant in any way in practice? Is it relevant with #io_uring ?

Thorsten Leemhuis (acct. 1/4)kernellogger@fosstodon.org
2025-01-30

Support for #io_uring communication between #kernel and [#fuse] userspace using IORING_OP_URING_CMD is the highlight from the main fuse (Filesystem in Userspace) updates merged for #Linux 6.14:

git.kernel.org/torvalds/c/92cc

Miklos furthermore writes:

'"Following features enable gains in performance compared to the regular interface:

- Allow processing multiple requests with less syscall overhead

- Combine commit of old and fetch of new fuse request

- CPU/NUMA affinity of queues"'

#LinuxKernel

Felix Moessbauerfmoessbauer
2024-12-28

Just watching the
talk. That's the subsystem I recently fixed bugs around incorrect affinities. events.ccc.de/congress/2024/hu

GripNewsGripNews
2024-12-20

🌘 io_uring 中的程序創建 [LWN.net]
➤ Io_uring 補丁系列更新,加入新的程序創建操作。
lwn.net/SubscriberLink/1002371
在 Linux 內核中,io_uring 通常用於異步操作,最新的補丁系列使其能夠創建新程序,雖然目前仍存在限制。
+ 這項新功能或許將為 Linux 內核帶來更大的彈性和廣泛的應用。
+ 聚焦於程序創建操作對於內核功能的進一步擴展是一個值得期待的方向。

Nils Goroll 🕊️:varnishcache:slink@fosstodon.org
2024-11-25

as i am currently working on making #varnishcache client side io #async'hronous with #io_uring, i must say that lucumr.pocoo.org/2024/11/18/th made me think if we need more facilities for forensic analysis…

2024-11-18

This is probably a ridiculous question: is an event loop or does it resemble one?

And is it possible to make all subsystems use it? E.g. GPU drivers

If so, would it be possible to write something like a with good performance where internally subsystems submit things to ?

GripNewsGripNews
2024-10-30

🌘 異步 Rust 在 io_uring 中並不安全
➤ 異步 Rust 開發者在使用 io_uring 時需留意 TCP 連線洩漏的問題
tonbo.io/blog/async-rust-is-no
文章探討使用 io_uring 驅動遇到的 TCP 連線洩漏問題,揭示了這個在各種 io_uring 運行時都普遍存在的問題。
+ 對於 Rust 開發中的新挑戰有了更深入的瞭解。
+ 瞭解了 io_uring 可能存在的問題後,如何改進以確保程式碼的安全性。
Rust

2024-09-24

A new way to perform syscalls in the linux kernel, both batched and asynchronous : matklad.github.io/2024/09/32/-

There is something I don't understand though : if it's a ringbuffer, it means that some syscalls get discarded if the buffer gets full? 🤔 Or maybe it refuses more calls then, but then why make it a ringbuffer rather than a classic FIFO?

#io_uring #linux
(also, why is this article timestamp in the future, on Oct 2, 2024? ^^ )

Luke T. Shumakerlukeshu@fosstodon.org
2024-09-22

Anyone familiar with #io_uring have any idea what this bit in mini_liburing.h is doing? I think I understand the rest of io_uring_submit(), but I can't fathom what this bit is doing.

if (*sq->khead != *sq->ktail) {
submitted = *sq->kring_entries;
goto submit;
}

(Also, isn't the IORING_ENTER_GETEVENTS flag at the end no-op, since min_complete=0 ?)

Nils Goroll 🕊️:varnishcache:slink@fosstodon.org
2024-09-17

babysteps, but something is happening #io_uring #varnishcache

io_uring_enter(14, 1, 1, IORING_ENTER_GETEVENTS, NULL, 8) = 1
futex(0x7ff0c0d0a3bc, FUTEX_WAKE_PRIVATE, 1) = 1
<... futex resumed>)      = 0
io_uring_enter(14, 0, 1, IORING_ENTER_GETEVENTS, NULL, 8 <unfinished ...>
futex(0x7ff0c1e07008, FUTEX_WAKE_PRIVATE, 1) = 0
ioctl(19, FIONBIO, [0])   = 0
getpeername(19, {sa_family=AF_INET, sin_port=htons(54598), sin_addr=inet_addr("127.0.0.1")}, [28 => 16]) = 0
getsockname(19, {sa_family=AF_INET, sin_port=htons(8080), sin_addr=inet_addr("127.0.0.1")}, [28 => 16]) = 0
ioctl(19, FIONBIO, [0])   = 0
writev(19, [{iov_base="HTTP/1.1", iov_len=8}, {iov_base=" ", iov_len=1}, {iov_base="200", iov_len=3}, {iov_base=" ", iov_len=1}, {iov_base="OK", iov_len=2}, {iov_base="\r\n", iov_len=2}, {iov_base="Date: Tue, 17 Sep 2024 14:33:25 "..., iov_len=35}, {iov_base="\r\n", iov_len=2}, {iov_base="Server: Varnish", iov_len=15}, {iov_base="\r\n", iov_len=2}, {iov_base="X-Varnish: 32770", iov_len=16}, {iov_base="\r\n", iov_len=2}, {iov_base="Content-Type: text/html; charset"..., iov_len=38}, {iov_base="\r\n", iov_len=2}, {iov_base="Retry-After: 5", iov_len=14}, {iov_base="\r\n", iov_len=2}, {iov_base="Content-Length: 228", iov_len=19}, {iov_base="\r\n", iov_len=2}, {iov_base="Connection: keep-alive", iov_len=22}, {iov_base="\r\n", iov_len=2}, {iov_base="\r\n", iov_len=2}], 21) = 192
Nils Goroll 🕊️:varnishcache:slink@fosstodon.org
2024-09-03

the #io_uring example/proxy.c code really is super helpful. thank you, @axboe !

Nils Goroll 🕊️:varnishcache:slink@fosstodon.org
2024-08-01

@andreclaassen @derralf in dem bereich, in dem ich zu hause bin, ist es aber definitiv falsch, hier kommen quasi alle software innovationen zuerst als #foss. einige beispiele: bsd jails als blaupause für solaris zonen und linux container, das dateisystem #zfs, #varnishcache mit vcl als #edgecomputing oder aktueller das #io_uring kernel interface, das nun microsoft für windows kopiert hat.
🧵

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst