Nginx - Google Summer of Code ideas

Maxim Dounin mdounin at mdounin.ru
Fri Mar 13 14:43:44 MSK 2009


Hello!

On Thu, Mar 12, 2009 at 06:40:13PM -0700, Merlin wrote:

> On Thu, Mar 12, 2009 at 4:51 PM, Michael Baudino <
> michael.baudino at acrelec.com> wrote:
> 
> > Hi C.
> >
> > Participating in the SoC is a definitively good idea.
> >
> > What about implementing async disk IO ?
> >
> > --
> > Michael Baudino
> >
> >
> >
> What's wrong with aio_write() and aio_read()?

Well, you really want to hear?  There is a couple of issues:

1. There is no good standard method of notification.  Per POSIX 
it's uses signals to notify process about completed operations.  
Under FreeBSD notifications is possible over kqueue, and probably 
other OSes have something too, but it's anyway will require some 
non-trivial porting.

2. It's usually implemented as a thread pool within OS kernel (at 
least FreeBSD and Linux implementations AFAIK), and usually have 
some limits administrator should be aware of (including maximum 
number of io requests system may queue).

3. It's not (yet) supported by nginx.

Personally I think that AIO interface is wierd and it would be 
much better to support O_NONBLOCK on normal file descriptors.  But 
it's not likely to happen in the near future. :)

So currently AIO is the only disk async IO interface we have, and 
it would be good thing to implement it's support in nginx.

Maxim Dounin





More information about the nginx mailing list