Questions tagged [aio]

Asynchronous Input/Output, in computer science, is a form of input/output processing that permits other processing to continue before the transmission has finished.

177 questions
101
votes
4 answers

What is the status of POSIX asynchronous I/O (AIO)?

There are pages scattered around the web that describe POSIX AIO facilities in varying amounts of detail. None of them are terribly recent. It's not clear what, exactly, they're describing. For example, the "official" (?) web site for Linux…
Glyph
  • 31,152
  • 11
  • 87
  • 129
56
votes
1 answer

Difference between POSIX AIO and libaio on Linux?

What I seem to understand: POSIX AIO APIs are prototyped in and you link your program with librt(-lrt), while the libaio APIs in and your program is linked with libaio (-laio). What I can't figure out: 1.Does the kernel handle the…
itisravi
  • 3,406
  • 3
  • 23
  • 30
55
votes
4 answers

What's the difference between event-driven and asynchronous? Between epoll and AIO?

Event-driven and asynchronous are often used as synonyms. Are there any differences between the two? Also, what is the difference between epoll and aio? How do they fit together? Lastly, I've read many times that AIO in Linux is horribly broken. How…
Continuation
  • 12,722
  • 20
  • 82
  • 106
32
votes
4 answers

buffered asynchronous file I/O on linux

I am looking for the most efficient way to do asynchronous file I/O on linux. The POSIX glibc implementation uses threads in userland. The native aio kernel api only works with unbuffered operations, patches for the kernel to add support for…
Marenz
  • 2,722
  • 3
  • 20
  • 19
21
votes
1 answer

How does the Linux kernel handle Asynchronous I/O (AIO) requests?

I am writing a C program to read data from an SSD drive by reading directly from the raw block device file. I am trying the Linux AIO (I am talking about the Linux AIO API, i.e. the functions provided by linuxaio.h, such as io_submit(...) etc., not…
rob6ll
  • 221
  • 2
  • 6
17
votes
3 answers

Linux AIO: Poor Scaling

I am writing a library that uses the Linux asynchronous I/O system calls, and would like to know why the io_submit function is exhibiting poor scaling on the ext4 file system. If possible, what can I do to get io_submit not to block for large IO…
void-pointer
  • 14,247
  • 11
  • 43
  • 61
17
votes
1 answer

Linux splice() + kernel AIO when writing to disk

With kernel AIO and O_DIRECT|O_SYNC, there is no copying into kernel buffers and it is possible to get fine grained notification when data is actually flushed to disk. However, it requires data to be held in user space buffers for…
jop
  • 2,226
  • 15
  • 16
16
votes
2 answers

Getting to know the basics of Asynchronous programming on *nix

For some time now I have been googling a lot to get to know about the various ways to acheive asynchronous programming/behavior on nix machines and ( as known earlier to me ) got confirmed on the fact that there is still no TRULY async pattern…
Arunmu
  • 6,837
  • 1
  • 24
  • 46
15
votes
2 answers

asynchronous IO io_submit latency in Ubuntu Linux

I am looking for advice on how to get efficient and high performance asynchronous IO working for my application that runs on Ubuntu Linux 14.04. My app processes transactions and creates a file on disk/flash. As the app is progressing through…
user5739398
  • 151
  • 1
  • 4
15
votes
2 answers

Linux kernel AIO, open system call

Why Linux Kernel AIO does not support async 'open' system call? Because 'open' can block on filesystem for long time, cant it?
andreych
  • 181
  • 6
12
votes
1 answer

linux kernel aio functionality

I am testing kernel asynchronous io functions (not posix aio) and am trying to figure out how it works. The code below is a complete program where I simply write an array repeatedly to a file opened using O_DIRECT. I get an error in the callback…
Korizon
  • 3,677
  • 7
  • 37
  • 52
11
votes
1 answer

revisiting "how do you use aio and epoll together"

following the discussion at How do you use AIO and epoll together in a single event loop?. There are in fact 2 "aio" APIs in linux. There's POSIX aio (the aio_* family of functions), included in glibc and libaio developed I believe by RedHat (?),…
user237419
  • 8,829
  • 4
  • 31
  • 38
10
votes
2 answers

Linux Disk File AIO

According to this tutorial asynchronous disk file io can easily be achieved using AIO on linux, at least from a programming/api point-of-view. But before and after this tutorial I had read a lot of posts and articles that this either can not be done…
p00ya00
  • 796
  • 1
  • 10
  • 20
10
votes
0 answers

UnknownMemberId Error in AIOKafka library while consuming messages

I am facing an error with the library AIOKafka in Python (versions at the end). Basically, I am receiving a failed heartbeat message and then the commit of the offsets cannot be performed. This is the log: Heartbeat failed for group…
Victor Cadena
  • 191
  • 2
  • 7
9
votes
4 answers

How do you use AIO and epoll together in a single event loop?

How can you combine AIO and epoll together in a single event loop? Google finds lots of talk from 2002 and 2003 about unifying them, but its unclear if anything happened, or if it's possible. Has anyone rolled-their-own with an epoll loop using…
Will
  • 73,905
  • 40
  • 169
  • 246
1
2 3
11 12