Article may be outdated

This article is 62 days old. Some details may have changed since publication.

Hacker News·6 min read·hard

Epoll vs. Io_uring in Linux

S
Sibexico
AI Summary

This technical article explores the evolution of asynchronous I/O in Linux, specifically comparing the older epoll system with the newer io_uring. The author details the performance overhead of syscalls and why modern high-performance servers are shifting toward io_uring.

Why it matters

Understanding these low-level kernel mechanisms is critical for developers building high-performance, scalable network applications.

Dive DeeperCreate a free account to unlock

First, I want to tell you how exactly I got to this point and why I started researching different options for handling asynchronous I/O on Linux... Last year, my students and I built a reverse proxy server called TinyGate. It was super simple, worker-based, and it basically worked well. Of course, I didn't expect it to be very fast, but it was an educational project, and since we'd made a real, kind of production-ready tool, I was really proud of it. 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. So they literally forced me to research together how those tools work under the hood and how to handle asynchronous I/O to cut down on the heavy overhead... Long story short, we made a second version of TinyGate, based on epoll. It still lost to nginx/haproxy in benchmarks, but it had a dramatic performance boost compared to the first version. But epoll isn't perfect either (as I'll explain below), and we eventually switched to io_uring, which led to a full rewrite of our project from scratch, again... So it's a really interesting topic, and today I'll share an overview of the two queueing systems Linux gives you for asynchronous I/O.

Continue reading on Headlinne

Create a free account to read the full article.

Read full article →
technologyscience
Political Bias
Center
LeftLean LCenterLean RRight
Confidence: 90%

The content is a technical explainer focused on software engineering performance metrics.

Get smarter about the news

Sign up free for a feed built around what you actually care about, Dive Deeper research on any story, and the full text of every article.

Create free account

Already have an account? Sign in