On Wed, 2007-01-17 at 18:27 +0800, yueyu lin wrote:
> OK, I finally implement a stable version based on the signal call in
> aio_read .

This is awesome!  I'm going to try and integrate some of this into my
AIO framework.  Good work.

> The performance is improved about 70%~100% compared with the thread
> notification way.
> But sadly, it's still slower than Sun's simple implementation. I've checked
> the codes, it just only call read(2) for any read invokation. No special
> operations.
> Mentioned by the mail from Sun's employee in OpenJDK, the aio_read is
> aio_read(3)
> instead of aio_read(2). That means that's a lib call, not a syscall. The
> syscall may benefit from the legacy interrupt to improve performance.  I
> also noted that Linux has already put the aio_read implemented in the kernel
> in the Kernel 2.5 or later. But it's still a software way to do that.
> Indeed, the asynchronous read may improve the throughput, but it needs
> current application to change their model to event-driven model. My idea
> that is to replace the RandomAccessFile may not work. Because our
> application is just work as a block reading way.

MINA uses an event-driven model which is why I've been looking at using
POSIX AIO with Java.  Java has excellent support for event-driven
networking (which MINA takes advantage of) but but Java is still
limited with file AIO.  I should point out though that JSR 203 is in
active development and will be released with Java 7.

I'm hoping to have some solid benchmarks measuring the performance
difference between using AIO and blocking I/O on a server handling
thousands of concurrent network connections.  I'll post my results on
this list.  I'm also very interested to see the difference in
performance of POSIX AIO between Linux and Solaris.  I'll try to
benchmark that as well.

-Mike

Reply via email to