Home A modern asynchronous I/O interface for Linux

A modern asynchronous I/O interface for Linux

The Linux kernel has had asynchronous I/O since version 2.5, but it was seen as difficult to use and inefficient.

io_uring (previously known as aioring) is a Linux kernel system call interface for storage device asynchronous I/O operations addressing performance issues with similar interfaces provided by functions like read()/write() or aio_read()/aio_write() etc. for operations on data accessed by file descriptors.

It was primarily developed by Jens Axboe at Facebook.

Internally it works by creating two buffers dubbed as “queue rings” (circular buffers) for storage of submission and completion of I/O requests (for storage devices, submission queue (SQ) and completion queue (CQ) respectively). Keeping these buffers shared between the kernel and application helps to boost the I/O performance by eliminating the need to issue extra and expensive system calls to copy these buffers between the two.According to the io_uring design paper, the SQ buffer is writable only by consumer application, and CQ - by kernel.

The API provided by liburing library for userspace (applications) can be used to interact with the kernel interface more easily.

Both kernel interface and library were adapted in Linux 5.1 kernel version.


This post is licensed under CC BY 4.0 by the author.

btrfs - A modern copy on write(CoW) filesystem for Linux

Useful tools to analyze network latency

Comments powered by Disqus.