I'm integrating libaio on the Journal, and I had to make few changes on my local box
to make it work correctly.
When you are dealing with DirectIO, every write has to be aligned to 512 bytes. To make
both AIO and NIO work correctly, I'm adding tail bytes to the end of each record to
complete a block of 512 bytes.
Say... you are writing a PrepareRecord
On the regular layout (before this change), you would do this:
1 BYTE - Prepare Record
8 BYTES - Long TXID
1 BYTE Done
After the change I'm making.. you will have
1 Byte - Prepare Record
8 Bytes - Long TXID
4 Bytes - Int fillerSize
1 Byte Done
N Bytes to complete the block (as determined by fillerSize)
With the second layout, both NIO and AIO can work on the same layout.
After we add an intermediate buffer on AIO, we will be able to remove these filler bytes.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4142379#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...