7 Replies Latest reply on Apr 16, 2013 7:57 PM by clebert.suconic

    AIO and Java 7

    hughbragg

      When will HornetQ be able to use the Java 7 AIO (NIO.2) features?

        • 1. Re: AIO and Java 7
          jbertram

          Are you referring to the network or filesystem portions of NIO.2 (or both)?

          • 2. Re: AIO and Java 7
            hughbragg

            I'm specifically interested in the work HQ has done relating to libaio which is journalling and so the filesystem portion.

            I'd be very interested to see if this works in windows using java 7 and what the performance comparison would be.

             

            If there are any plans to use the networking portions of jsr203, I'd be interested in learning about that too.

            • 3. Re: AIO and Java 7
              biggu

              I've seen increased libaio performance after upgrading to java 7 from java 6. Though I don't think ASYNCIO is related to jsr203.

              • 4. Re: AIO and Java 7
                jbertram

                Libaio is specific to Linux as it is a wrapper to provide access to kernel-level AIO functions.  It won't work in Windows and will likely never work in Windows unless something drastic changes.

                 

                As far as the networking goes, we use Netty.  If Netty implements support for NIO.2 then we'll get that as well.

                • 5. Re: AIO and Java 7
                  jbertram

                  As far as I understand, libaio performance shouldn't be any different no matter what JVM you are using since it is outside the JVM.  The performance of the JVM might be better overall, but I don't think that would impact the underlying performance of libaio.

                   

                  And you're right. ASYNCIO has nothing to do with JSR-203.

                  • 6. Re: AIO and Java 7
                    biggu

                    Hornetq has a whole library for using libaio, which in my benchmark is much faster with java 7.

                    • 7. Re: AIO and Java 7
                      clebert.suconic

                      We could implement it in top of the NIO. it's just a thin layer.. However there are a few differences. One must pre-allocate with HornetQ AIO. Which is different from NIO2. There are a few differences in semantics. But we could have the same API.