All Topics
All Topics
Technology
Technology
Design
Design
Programming
Programming
Science
Science
News
News
Gaming
Gaming
Entertainment
Entertainment
Business
Business
Finance
Finance
Sports
Sports
Health
Health
Food
Food
Travel
Travel
Art
Art
Music
Music
Books
Books
Education
Education
Politics
Politics
Personal
Personal
No algorithm. No AI slop. No ads. Just RSS. Pro-human. Indie writers. Real journalism. Open web. Chronological. Hand toasted.

Comparing I/O Performance: Blocking I/O vs io_uring and kqueue with Programmer-Friendly Abstractions

By

enz

6mo ago· 12 min readenInsight

Summary

This technical article explores I/O performance optimization by comparing different approaches to file and network operations. It starts with traditional blocking I/O, then examines modern asynchronous I/O mechanisms like io_uring (Linux) and kqueue (BSD/macOS), and ultimately presents a programmer-friendly abstraction layer that creates an event loop similar to familiar software patterns. The content is deeply technical, focusing on system programming, performance considerations, and cross-platform I/O abstractions for developers working with low-level file and network operations.

Key quotes

· 4 pulled
When you want to read from a file you might open() and then call read() as many times as necessary to fill a buffer of bytes from the file.
This is a twist on King's talk at Software You Can Love Milan '22.
Consider this tale of I/O and performance. We'll start with blocking I/O, explore io_uring and kqueue, and take home an event loop very similar to some software you may find familiar.
It's similar for a TCP client with sockets, but instead of open() you first call socket() and then connect()
Snippet from the RSS feed
Consider this tale of I/O and performance. We’ll start with blocking I/O, explore io_uring and kqueue, and take home an event loop very similar to some software you may find familiar.

You might also wanna read