Community Blog OpenAnolis Whitepaper: Using io_uring to Improve Database System Performance

OpenAnolis Whitepaper: Using io_uring to Improve Database System Performance

This short article discusses the background, key technology, features, and application scenarios behind io_uring.


By High-Performance Storage SIG


The traditional I/O software stack can no longer fully meet the performance of high-performance storage devices. High-performance I/O stack is one of the key research topics in the current storage field, such as the user-mode solution SPDK and the standard kernel-mode solution io_uring.

Key Technology

The Linux community has designed a new asynchronous I/O framework, io_uring. io_uring provides a pair of shared ring buffers for the communication between the application and kernel to avoid memory copying during submission and completion events. The benefits of this design are listed below:

  • No memory copy is required between the application and the kernel when the request is submitted and completed.
  • The application does not require system calls when using the advanced features of SQPOLL.
  • It is lock-free and uses memory ordering to achieve synchronization.

Since the first half of 2020, OpenAnolis has been involved in the development of the io_uring community, contributing multiple features and optimizations and also putting it into practice in graph database scenarios containerized development.

Advantages: Applications use io_uring based on standard system calls. Compared with the traditional Linux Native AIO, io_uring eliminates the limitation of only supporting Direct I/O and the additional memory copy overhead. Compared with the user-mode framework SPDK, io_uring can reuse the standard driver of the Linux kernel without the need for additional user-mode driver development. Therefore, it can apply more commonly with more friendly programming interface.

Technical Features:

  • Simple and easy to use for application and integration
  • Scalable for storage I/O and network I/O
  • Rich in features that can meet all applications, such as buffer I/O
  • Efficient, especially for 512-byte or 4K I/O scenarios
  • Scalable to meet the performance needs in traffic peak scenarios

Application Scenario: io_uring is applicable to most businesses and applications with a demand for asynchronous I/O. As of now, io_uring has been integrated into multiple mainstream open-source applications, such as RocksDB, Netty, QEMU, SPDK, PostgreSQL, MariaDB, etc.

Optimization and Practice of Graph Database Engine: iGraph

Alibaba Cloud Graph Compute is a high-performance distributed graph computing product that supports the store, query, and compute complex graph-relational data and efficient graph algorithms and models. It is widely used in scenarios, such as advertisement search and recommendation, real-time risk control, knowledge graphs, social networks, etc. Its core engine iGraph introduces io_uring in disk-based query and access scenarios to support running steady at high IOPS.


Practical Effect: After iGraph is adapted and optimized with io_uring, the end-to-end latency of the service is optimized by up to 20% without any new introduced CPU overhead compared to the original Linux Native AIO version.

0 1 0
Share on


84 posts | 5 followers

You may also like



84 posts | 5 followers

Related Products