Uploaded image for project: 'AMQ Broker'
  1. AMQ Broker
  2. ENTMQBR-3233

Understanding on AIO and NIO Journal Types

    XMLWordPrintable

Details

    • Story
    • Resolution: Unresolved
    • Minor
    • None
    • None
    • None
    • None
    • Documentation (Ref Guide, User Guide, etc.)

    Description

      Hi,

      Below are a few understandings on AIO and NIO journal types:

      NIO:
      NIO uses a Java API provided with the JDK that is using POSIX blocking file API to write/read manipulate files. This is a Java API and makes synchronous calls to the file system to write data to the journal files. Thus, when a durable message is received, AMQ thread makes a call to write the data to the journal file and waits until the data is written on the files. There is no time-out configured in this case. To prevent AMQ from going into an indefinite hung state, AMQ has a built-in housekeeping mechanism called Critical Analyzer to shutdown the AMQ Broker. The Critical Analyzer is customizable in the broker.xml.

      AsyncIO (AIO)
      ASYNCIO is built using a JNI library that makes uses of libAIO. LibAIO is not POSIX and provides kernel support for asynchronous I/O operations. Thus, AMQ broker issues file write requests for durable messages through libAIO. LibAIO makes asynchronous calls to the kernel and requests callBack once the IO operation is successfully completed. LibAIO waits for 10 seconds for the call back request. If any operation does not return successfully within this time, Critical IO Error is thrown to the broker.

      Recommendations:

      • In any environment where the disk storage is remote in nature (i.e. requiring access through the network) or shared with other applications with high IO, the recommended journal type is NIO.
      • If AMQ will be writing to its local filesystem, then the recommended journal type is AIO.

      Attachments

        Activity

          People

            jcliffor@redhat.com John Clifford
            rhn-support-shchavan Shrikant Chavan (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: