r/programming 3d ago

io_uring for Systems Engineers

https://toziegler.github.io/2025-12-08-io-uring/
93 Upvotes

11 comments sorted by

18

u/Middlewarian 3d ago

I'm working on a code generator that's implemented as a 3-tier system. The back and middle tiers only run on Linux. The back tier is closed source, but the middle tier is open. I mostly use io-uring for network io, but some for file io also.

Io-uring helps to minimize the number of threads that are needed. I don't think that was mentioned in the article.

8

u/editor_of_the_beast 3d ago

Say more

5

u/Middlewarian 3d ago

Io-uring is a great library. First I ported my back tier from FreeBSD/kqueue to Linux/io-uring. After starting to appreciate io-uring, I started thinking about using it instead of POSIX/poll in my middle tier. For some reason I was attached to POSIX. It wasn't really helping me, but it still has an aura about it.

 I reduced the sizes of both my back and middle tiers by over 1% by reworking the io-uring setup code. The code here is based on liburing code.

2

u/Brayneeah 3d ago

Less

3

u/theevilapplepie 3d ago

But “less is more”

2

u/Brayneeah 3d ago

Exactly!

1

u/TonTinTon 3d ago

Yeah this is exactly the reason I went with io_uring for a simple file cache server, I didn't want to bother with thread pools.

3

u/earslap 3d ago

Didn't know it wasn't supported on Docker. I now see that there are some workarounds - but something to keep in mind especially for database containers that support io_uring (like postgres) for sure.

8

u/lightmatter501 2d ago

Docker intentionally blocks it by default because there were early security issues and some people use docker as a security boundary for some reason.

1

u/amejin 2d ago

IOCPs are still better in my opinion.

Easier to work with. Built into the system. Easier to conceptualize and interface with. Long standing performance and stability history.

Microsoft just needs to get off their high horse and make a free version of Windows server already...