Re: Sneer code, Async I/O and Vanilla-java

Clebert Suconic <[email protected]>
Newsgroups gmane.comp.java.prevayler
Message-ID <CAKF+bsr-X_vG8U1kKbpw+Qfx=b=xJCJbsi1u-=fSSF7CqKC-cw@mail.gmail.com>
On Wed, Sep 14, 2011 at 8:50 AM, Klaus Wuestefeld <[email protected]> wrote:
>> Klaus.. this async I/O stuff can lead to great preformance improvements..
>
> Any benchmarks we can see?
>
>> We
>> can ask the journal to serielize objects and a callback will be called when
>> it's finished.. maybe not a default behaviour but as an option i think that
>> would be great..
>
> Prevayler needs to know when writes are finished. What is the
> difference in performance between this async IO stuff and a separate
> Java thread that waits and notifies other threads when ready?

The Linux Layer will perform a lot of DMA when dealing with writes on
the disk. I have been able to perform syncs on HornetQ up to the
hardware capacities while  I couldn't achieve that by doing in just a
thread through NIO.

Also: for Linux AIO to work, you need to pre-allocate the files,
that's somewhat a pre-requirement as any time you expand the file that
forces you to also change the meta-data of the file (what actually
decreases performance).

Also: we had to use a TimedBuffer and perform flushes on nano-seconds
intervals. We needed that both on pure java NIO and libAIO.

Java7 now supports asynchronous IO on writes but the performance is
not as good as on AIO as it's not using the native layer (what
includes direct disk access and DMA, some optimizations done at kernel
level).

------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
Learn about the latest advances in developing for the 
BlackBerry&reg; mobile platform with sessions, labs & more.
See new tools and technologies. Register for BlackBerry&reg; DevCon today!
http://p.sf.net/sfu/rim-devcon-copy1 
_______________________________________________
To unsubscribe go to the end of this page: http://lists.sourceforge.net/lists/listinfo/prevayler-discussion
_______________________________________________
"Databases in Memoriam" -- http://www.prevayler.org
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.