A server that handles a million requests per second is not really doing a million units of work. It is doing a million units of work plus the cost of telling the kernel about each one, and at that scale the telling dominates. epoll has been the answer since 2002: register the sockets once, then ask which ones are ready. io_uring, merged in Linux 5.1, asks a different question — why tell the kernel anything at all, when you can drop requests into a shared ring and let it pick them up?

epoll costs roughly three syscalls per request, which at a million requests per second is three million mode switches and about half a core; io_uring with submission polling can drive the same load with zero syscalls per request, at the price of a kernel-version and security-policy matrix.

Part One: What is being compared

epoll is a readiness interface. You add a file descriptor to an epoll set, call epoll_wait, and the kernel tells you which descriptors are readable or writable. You then call read and write yourself, in your own thread, with your own buffers. The kernel does no work on your behalf beyond reporting state.

io_uring is a completion interface. You place a submission queue entry describing an operation — read from this descriptor into this buffer, accept a connection, open a file, send a message — and the kernel executes it and posts a completion queue entry with the result. Submission and completion share memory-mapped rings, so in the ideal case neither side makes a syscall at all. With submission queue polling enabled, a kernel thread watches the ring continuously.

The difference in programming model is bigger than the difference in speed. epoll gives you an event loop where every operation is non-blocking and every buffer lifetime is yours to manage. io_uring gives you an asynchronous execution engine that can do blocking-looking things, including filesystem operations, without a thread pool.

Part Two: The arithmetic

Count syscalls for a simple request-response server. With epoll, a request costs an epoll_wait return, a read, and a write, so three syscalls, plus an accept every so often and a close when the connection ends. A syscall on a modern x86 server costs roughly 200 to 500 nanoseconds once Spectre-era mitigations are counted, so three syscalls are about one microsecond of pure overhead. At one million requests per second that is one full core burned on transitions, before any application logic runs.

With io_uring, the same request can be submitted as a read and a write in one batch, and completions are harvested from the ring without entering the kernel. The syscall count per request drops to zero in steady state. The cost moves to memory barriers and ring management, on the order of tens of nanoseconds. The saving is not the whole core, because the kernel still copies data and runs the protocol stack, but it is a large fraction of the fixed per-request overhead.

Throughput numbers from storage benchmarks show the same shape. On a fast NVMe device at high queue depth, io_uring reaches roughly 1.5 to 2 times the IOPS of an epoll-plus-thread-pool design, mostly because it removes the context switches between worker threads and the kernel. At low queue depth the two are close, and at one outstanding operation the latency is essentially identical.

The second arithmetic difference is batching. io_uring lets you submit thirty-two operations with one syscall and reap thirty-two completions with one more. epoll can batch readiness events, but the read and write calls stay one per operation. For a proxy moving small messages, that ratio is the whole game.

Part Three: Where the model breaks

The first break is the kernel you are running on. io_uring appeared in 5.1, but the features that make it fast — registered buffers, fixed files, multishot accept, provided buffer rings — arrived across 5.4 through 6.x. A design that depends on multishot accept will not run on the kernel shipped by an older enterprise distribution, and containers inherit the host kernel, so a managed Kubernetes cluster may hand you a version you did not choose.

The second break is security policy. Because io_uring can perform arbitrary operations from a shared ring, several container runtimes and hardened kernels disable it by default, and seccomp profiles frequently block the setup syscalls. A service that works in staging can fail at startup in production because the sandbox denies io_uring_setup. This is not a bug in either side; it is a deliberate reduction in attack surface after a run of vulnerabilities in the subsystem.

The third break is complexity. With epoll, a partial read is a normal event and the buffer lives in your struct. With io_uring, every in-flight operation owns a buffer, and the kernel may write to it after your function returns. Use-after-free bugs in this model are subtle and expensive. Libraries exist to hide it, but the moment you need a custom operation you are back to manual lifetime management.

Part Four: The later cost

The operational bill for epoll is familiarity. Every profiling tool understands it, every runtime has an event loop built on it, and a new engineer can read the code. Its scaling limit is real but high: with edge-triggered mode and careful non-blocking handling, epoll handles hundreds of thousands of connections per process. The cost is per-request syscalls, which is a CPU bill that grows linearly and predictably.

The operational bill for io_uring is a compatibility matrix. You need a runtime feature probe, a fallback path, and tests that cover both. You need to watch kernel release notes for behaviour changes, because the interface is younger and semantics have been adjusted. You need to explain to a security team why the ring is enabled.

There is a third option that changes the comparison: a thread-per-core runtime with blocking sockets and no event loop at all. At low concurrency it beats both on simplicity and often on latency, because a blocking read costs one syscall and no state machine. The event-driven designs only win when concurrency is high enough that thread stacks and scheduling become the constraint.

Part Five: Outside the team

For a user, the difference is tail latency under load. A proxy built on epoll with a thread pool shows a latency cliff when the pool saturates; an io_uring design degrades more smoothly because there are no worker threads to queue behind. A poorly written io_uring design shows a different cliff, when the completion ring fills and submissions start failing.

For the business, the difference is instance count. Shaving one core per million requests per second is a rounding error at small scale and a five-figure monthly line item at large scale. It is also a hiring constraint: engineers who can debug an io_uring lifetime bug are scarcer than engineers who can debug an epoll loop.

A fair comparison fixes the kernel version, the container security profile, the request size and the concurrency, then measures requests per second per core and the ninety-ninth percentile. Benchmarking io_uring on a bare-metal 6.x kernel against epoll inside a locked-down container measures the sandbox, not the interface.

Market sizing check

If asynchronous I/O becomes the default for high-throughput services over the next five years, the market affected is not a product category but a cost line: compute spent on syscall overhead across proxies, databases and storage services is plausibly in the billions of dollars a year, with the addressable saving in the low hundreds of millions. The swing factor is how quickly sandboxed environments allow the interface.

These numbers are an order-of-magnitude estimate built from published per-syscall costs and fleet sizes, not a measured total.

The comparison that matters

The comparison that matters is between a mature readiness API that charges per operation and a younger completion API that charges in compatibility and buffer discipline. epoll wins on portability, debuggability and any environment where the sandbox blocks the ring. io_uring wins on syscall-bound workloads, on storage, and wherever batching thirty operations into one entry is natural.

The ranking assumes you control the kernel and can test the fallback. Give up either and the older interface is the safer engineering choice.

Adopt io_uring when syscall overhead is a measured fraction of your CPU profile and you can pin the kernel; otherwise epoll remains the lower-risk path, and the difference at moderate load is smaller than the migration cost.

SOL: HCqPmPJM3NVtS6YrmVaTZYnuP8XZ2PFgQZKT94VK1LkS
If this saved you time, a tip is appreciated.