frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Epoll vs. io_uring in Linux

https://sibexi.co/posts/epoll-vs-io_uring/
55•Sibexico•2h ago

Comments

mrlonglong•2h ago
Boost asio if you love C++ and asynchronous networking.
MathMonkeyMan•2h ago
I switched out asio's epoll backend for its io_uring in a database server and CPU utilization shot up. Probably depends on usage and the specifics of how it's integrated into the event code.
vlovich123•1h ago
That’s paradoxically what you can expect on a busy server - your CPU can spend time doing work that would have been previously IO wait time. Of course, it could be a bug in the implementation where you’re spinning doing no work erroneously, but depends on the details.
saghm•1h ago
Yeah, the explanation that I've usually heard for this sort of thing is that it's intended to get back CPU time that's lost when too many system threads are blocking to keep something on every core even during I/O (or pay for it in terms of the context switching overhead if you compensate for this with an extremely large number of system threads). The theory is that you'll avoid idle CPU compared to the common "one thread per core" way of doing things due to some of them being idle during I/O, at the cost of using some extra CPU to handle more things in user space. Obviously how much this helps can vary between use cases, but the measure of how much it's helping (or if it's maybe not helping at all!) is throughput, not CPU utilization.
Uptrenda•2h ago
Yes, io_uring is significantly faster than epoll (I think I had like 20% faster req/s with io_uring.) The catch is that its kernel opt-in and disabled just about everywhere for security reasons. I think that it has direct memory sharing between the kernel and user-land which is kind of yikes. There's been multiple exploits that hit io_uring in recent times. It's because of this that even engineering projects that try to reach the highest performance possible (like Go) don't really bake io_uring in as a sane default. Though if you want to take the risk you can always run it yourself for your favourite language. It is faster but the cost is possible exploits.
happyPersonR•1h ago
Any kind of poll mode networking:

Rdma, dpdk, io_uring it’s really kind of up to the user to do the memory isolation

In io_urings case tho, you can’t do much because the rings are in the kernel.

I’m hopeful though that with Llm things will get better.

But it’s just hard problem to solve . Very difficult to do in the kernel itself, and folks don’t really even understand tuning for it.

kshri24•45m ago
The ring buffers are in shared memory not kernel private. The ring buffers (submission and completion) are shared between kernel space and user space. User publishes requests via submission queue entries (updates tail of buffer while kernel reads head of the buffer), kernel shifts the submission queue buffer on its end and returns a completion queue event by publishing to completion buffer. User pulls from this buffer (specifically the head, kernel updates tail of buffer) in user space.
omcnoe•55m ago
For a project like Go, wouldn't it be an option to do one-time iouring feature detection in the runtime startup? Exploits are an issue for the entire OS, not the program choosing to use iouring, yeah?
spliffedr•1h ago
Take a look at https://github.com/concurrencykit/ck and https://github.com/microsoft/mimalloc, it will fit well for a zero-copy and mem aligned reverse proxy. Also, if you want to add a DDoS protection and more advanced L4 stuff check out https://docs.ebpf.io/ebpf-library/libxdp/libxdp/
Sibexico•4m ago
Yeah, the plan was to apply optimizations at the other levels, then we will go to allocators. Studying the allocators rn with my students, the previous post in the blog was about custom allocator on the Zig lang.
up2isomorphism•1h ago
The author takes a very benchmark focus on this topic which only says part of the story particularly for complex systems. Noticed that there are a number of very similar interface that exist on other platform like windows long before io_uring, but that does make Linux’s I/O system worse or slow than these platforms. A fast server is likely fast in either multiplexing or async API if implemented correctly in almost all cases.
RossBencina•39m ago
There is no benchmark in the post. There is analysis, discussion and code examples for epoll and io_uring usage.
Sibexico•9m ago
I'm now a Windows developer, mostly working with Linux and FreeBSD. Thx for the point, I'll look how it works in Windows systems.
toast0•48m ago
> But my students weren’t as happy as I was - they wanted to build something genuinely useful, and they were really disappointed that our “product” had strong architectural limits and couldn’t outperform titans like nginx and haproxy.

I took a (very brief) look at the github repo [1], it doesn't look like you're doing anything with cpu pinning.

You can probably eke (thanks) out a bit more performance if you cpu pin your threads and cpu pin your listen sockets (sockopt SO_INCOMING_CPU).

If you also cpu align your outgoing sockets, you should get a significant boost, but afaik, there's no great api for that. Linux does have an api for compatible NICs (traffic steering/flow steering) which can work, but if you know what hash your NIC uses (it's probably toeplitz) and you manage source port selection to your backend, you can pick ports that will hash properly.

The goal is for your proxy to be able to handle packets without any cross cpu communication.

[1] https://github.com/sibexico/TinyGate

jibal•21m ago
eke
Sibexico•6m ago
Basically, v0 and v1 of the repo is completely different implementations, written almost from scratch. Now working on the 3rd one implementation, I believe the last one. :) Completely different architectural choices was made.
csdreamer7•43m ago
RHEL 9 and 10 now fully support io_uring by default. It is very recent, but this covers a lot of corporate Linux installs. Gemini 'said' Ubuntu and SuSE support it as well, but did not provide any links to prove it.

https://access.redhat.com/solutions/4723221

Go should reconsider support. They should have a 'go' at it.

Renting a sewing machine from the library

https://www.bbc.com/future/article/20260618-the-weird-and-wonderful-libraries-of-finland
103•sohkamyung•3h ago•45 comments

Epoll vs. io_uring in Linux

https://sibexi.co/posts/epoll-vs-io_uring/
56•Sibexico•2h ago•18 comments

Show HN: TownSquare, a tiny presence layer for websites

https://townsquare.cauenapier.com/
64•cauenapier•14h ago•22 comments

15-minute at-home Lyme disease tick test

https://www.bostonglobe.com/2026/06/17/business/lyme-disease-tick-test/
35•bookofjoe•2d ago•12 comments

When I reject AI code even if it works

https://vinibrasil.com/when-i-reject-ai-code-even-if-it-works/
16•vnbrs•1h ago•3 comments

Slow breathing modulates brain function and risk behavior

https://www.cell.com/neuron/fulltext/S0896-6273(26)00339-9
58•croes•3h ago•6 comments

Loupe – A iOS app that raises awareness about what native apps can see

https://github.com/mysk-research/loupe
64•Cider9986•13h ago•16 comments

SMPTE Makes Its Standards Freely Accessible

https://www.smpte.org/blog/smpte-makes-its-standards-freely-accessible-openingstandards-library-t...
232•zdw•9h ago•64 comments

Project Fetch: Phase Two

https://www.anthropic.com/research/project-fetch-phase-two
28•stopachka•2h ago•9 comments

Alice is impatient

https://brooker.co.za/blog/2026/06/19/waiting.html
55•birdculture•5h ago•15 comments

Unauthorized alert sent to cell phones across Brazil

https://www.cnn.com/2026/06/20/americas/brazil-hackers-unauthorized-alert-latam
87•zdw•6h ago•62 comments

UHF X11: X11 Built for VisionOS and Apple Vision Pro

https://www.lispm.net/apps/uhf-x11/
168•zdw•9h ago•29 comments

White House delays US voting-machine vulnerability report

https://www.reuters.com/world/white-house-delays-release-us-voting-machine-study-midterms-near-20...
23•logickkk1•37m ago•2 comments

'We had to get out of the way': The backlash over delivery robots

https://www.bbc.com/news/articles/c0rygp005wjo
19•higginsniggins•1h ago•12 comments

DOS Game "F-15 Strike Eagle II" reversing project needs DOS test pilots

https://neuviemeporte.github.io/f15-se2/2026/06/20/needyou.html
206•LowLevelMahn•10h ago•57 comments

CSSQuake

https://cssquake.com/
465•msalsas•15h ago•101 comments

Semiconductor Lifeline Keeps Fighter Jets in the Air

https://spectrum.ieee.org/phoenix-semiconductors-legacychips-oems
36•rbanffy•4d ago•10 comments

Moving Beyond Fork() + Exec()

https://lwn.net/Articles/1076018/
5•signa11•1d ago•1 comments

Whole cross-sectional human ultrasound tomography

https://www.nature.com/articles/s41551-026-01660-4
24•lnyan•2d ago•3 comments

PostgresBench: A Reproducible Benchmark for Postgres Services

https://clickhouse.com/blog/postgresbench
79•saisrirampur•7h ago•22 comments

Show HN: StartupWiki – A Free Alternative to Crunchbase

https://startupwiki.tech/
156•shpran•10h ago•54 comments

Show HN: Make PDFs look scanned (CLI or in the browser via WASM)

https://github.com/overflowy/make-look-scanned
91•overflowy•7h ago•45 comments

Inference cost at scale with napkin math

https://injuly.in/blog/napkin-inference-cost/index.html
59•gmays•4d ago•13 comments

Linux eliminates the strncpy API after six years of work, 360 patches

https://www.phoronix.com/news/Linux-7.2-Drops-strncpy
90•simonpure•5h ago•67 comments

The rise of South Korea’s weapons business

https://www.politico.com/news/magazine/2026/06/20/south-korea-weapons-dealer-trump-00959559
115•JumpCrisscross•14h ago•42 comments

Pre-2022 Books

https://notes.lorenzogravina.com/musings/pre-2022-books
158•trms•3h ago•95 comments

The Wholesale Plagiarism of Obscure Sorrows

https://waxy.org/2026/06/the-wholesale-plagiarism-of-obscure-sorrows/
323•ridesisapis•8h ago•136 comments

Temporary Cloudflare accounts for AI agents

https://blog.cloudflare.com/temporary-accounts/
172•farhadhf•14h ago•95 comments

Supermarket giant Tesco sues VMware for breach of contract

https://www.theregister.com/software/2025/09/03/supermarket-giant-tesco-sues-vmware-for-breach-of...
92•wglb•4h ago•24 comments

Bun has an open PR adding shared-memory threads to JavaScriptCore

https://github.com/oven-sh/WebKit/pull/249
114•gr4vityWall•9h ago•214 comments