asynchronous I/O (was Re: Gasp!)
Adam L. Beberg
beberg@mithral.com
Tue, 3 Sep 2002 19:35:47 -0700 (PDT)
On Tue, 3 Sep 2002, Kragen Sitaker wrote:
> Unix acquired nonblocking I/O in the form of select() about 23 years
> ago, and Solaris has had the particular aio_* calls we are discussing
> for many years.
select() "scaling" is a joke at best, and I know you know that. poll() is
only a bit better.
> Very few applications need the aio_* calls ---
> essentially only high-performance RDBMS servers even benefit from them
> at all, and most of those have been faking it fine for a while with
> multiple threads or processes. This just provides a modicum of extra
> performance.
Wrong, it makes a huge difference in even what I consider small programs.
> Although I don't have a copy of the spec handy, I think the aio_* APIs
> come from the POSIX spec IEEE Std 1003.1-1990, section 6.7.9, which is
> 13 years old, and which I think documented then-current practice.
> They might be even older than that.
Yes, SGI has a patch to the linux kernel to implement the aio_ interfaces,
but it's still not built in, who knows when it will be. The point is it's
not portable in either case.
> Unix has been multiprocess since 1969, and most Unix implementations
> have supported multithreading for a decade or more.
And most UNIX is still kinda-sorta supporting the pthreads (POSIX)
interface, each in their own 7/8 implementation. You're safe if you stick to
the basics.
- Adam L. "Duncan" Beberg
http://www.mithral.com/~beberg/
beberg@mithral.com