Skip to main content

Python binding for Linux AIO

Project description

[english] | [한국어 (korean)]

linux_aio_bind: Python binding for Linux Kernel AIO

A low-level python binding module that matches the Linux kernel AIO system call.

If you are not using the ctypes module to develop high-level python modules directly, but you want to use AIO functionality in python, see High-level python wrapper.

What is Linux Kernel AIO?

Linux IO Models table

In summary, it allows non-blocking and asynchronous use of blocking IO operations such as read(2) and write(2).

Related documents

It is different from POSIX AIO

The POSIX AIO APIs have the aio_ prefix, but the Linux Kernel AIO has the io_ prefix.

There is already a POSIX AIO API for asynchronous I/O, but Linux implements it in glibc, a user-space library, which is supposed to use multi-threading internally. So, as you can see from the experiment, it's much worse than using the blocking IO API.

Implementation & Structure


Examples can be found in the code in the test directory.

Notes & Limits

  • Obviously available only on Linux
  • Because it is a wrapper, it brings the constraints of Linux.
    • It can not be used for files used as a kernel interface. (e.g. cgroup)
    • Sometimes it works as Blocking.
      • There are some things that have been solved through development after posting.
    • Some features are being added because they are still under development.
    • There are also some features that are not supported when the Linux version is low
      • You need to check Linux man pages (4.16) and its related API documentation
      • Poll is 4.19 or higher, fsync and fdsync require 4.18 or higher kernel

Release history Release notifications

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page