Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Linux aio (not posix) examples?

Does anyone have experience with Linux aio functions (io_*, not posix aio)? It would be great if someone could provide a link to some examples (or provide some examples here). Also, what are your general observations/comments about their use?

I am working on an I/O library and someone suggested I have a look at them. They are known to perform better than POSIX aio in certain cases and I would like to have a look.

Thanks.

like image 658
jitihsk Avatar asked Jul 09 '11 20:07

jitihsk


1 Answers

Update: this shows an example for the native linux io interface

(This is an example on the posix aio interface).

As to some of the commentters on the question: the aio library allows a program to issue multiple parallel request in a way where the kernel can execute them in the order which is most efficient for seeks and disk rotation -- i.e. the io request may not be executed in the order which they were issues which is different from making synchronous request in a thread. In very IO intensive applications this can dramatically increase IO performance, but for most applications it will just add complexity.

like image 191
Soren Avatar answered Nov 11 '22 07:11

Soren