aio

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 kernel asynchronous I/O support here says that sockets don't work, but the "aio.h" manual pages...

Compiling C++ program with POSIX AIO lib on Linux

I'm having difficulty with the linker when it comes to compiling a sample program that uses the POSIX aio library (e.g. aio_read(), aio_write(), etc) on Linux. I'm running Ubuntu with a 2.6 kernel, and have used the apt-get utility to install libaio. But even though I'm linking with the aio library, the compiler still gives me linker er...

POSIX AIO Library and Callback Handlers

According to the documentation on aio_read/write, there are basically 2 ways that the AIO library can inform your application that an async file I/O operation has completed. Either 1) you can use a signal, 2) you can use a callback function I think that callback functions are vastly preferable to signals, and would probably be much eas...

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 eventfd for the aio signal? ...

revisiting "how do you use aio and epoll together"

following the discussion at http://stackoverflow.com/questions/1825621/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 (?), the io_* family. The first one allows registrat...

AIO on OS X vs Linux - why it doesn't work on Mac OS X

My question is really simple. Why the code below does work on linux, and doesn't on Mac OS X. To compile save the file to aio.cc, and compile with g++ aio.cc -o aio -lrt on Linux, and g++ aio.cc -o aio on Mac OS X. I'm using Mac OS X 10.6.2 for testing on a Mac, and Linux kernel 2.6 for testing on Linux. The failure I see on OS X is ai...

Is I/O Completion ports(Windows) or Asynchronous I/O (AIO) will improve performance of multithreaded servers handling large volume of requests?

Hi, I want to use I/O Completion ports for Windows and Asynchronous I/O (AIO) for solaris and Linux versions of my server application. The application server is multithreaded and it can accept lot of concurrent TCP connections and can process many requests per conenction. Is this criteria well enough to use the latest AIO?. Is there any...

AIO network sockets and zero-copy under Linux

I have been experimenting with async Linux network sockets (aio_read et al in aio.h/librt), and one thing i have been trying to find out is whether these are zero-copy or not. Pretty much all i have read so far discusses file I/O, whereas its network I/O i am interested in. AIO is a bit of a pain to use and i suspect is non-portable, so...

Posix AIO Bad/Broken?

I'm working on a TFTP implementation that is transitioning away from a convoluted multi-threaded implementation to a single-thread/single-process implementation which uses a state machine to track the state of the sessions connected. TFTP is simple enough, and the number of concurrent sessions are small enough that the there really is no...

Where can I get the latest information about aio on Linux 2.6.x

Recently I am learning how to write a high performance web server.There is a experiment by RedHat says that epoll is faster than aio. someone says that because aio in Linux kernel is implemented with pthread. It's difficult for me to find latest information to prove this.Also I don't know is epoll still better than aio now on Linux?So I ...

IO multiplexing in Linux

Is there something like the sendfile-syscall that works with multiple target file descriptors (i.e. instead of copying from one FD to another FD, it could should copy to, say, 4 FDs)? I know that when talking about asynchronous IO, this is known as gather/scatter, but I could not find anything in the Linux AIO documentation. ...

use aio_write() but still see data going through cache?

I'm playing with this code on Linux 2.6.16.46: io.aio_fildes = open(name, O_CREAT | O_TRUNC | O_WRONLY | O_SYNC, 00300); io.aio_buf = buffer; io.aio_nbytes = size; io.aio_sigevent = sigev; io.aio_lio_opcode = LIO_WRITE; aio_write( &io ); This should use the memory pointed by buffer for the IO operation. Still, I see the number of di...

Does posix aio in linux 2.6 support socket file descriptor?

I've seached such question in google and got different answers.I cann't determine whether posix aio in linux 2.6 support socket file descriptor or not. if it support tcp socket,does the aiocb.aio_offset=0 relative to the first byte readed from the tcp socket fd? if it doesn't,does any asynchronous io library in linux support socket fd?...