Alan Baugher

Wildfly and JMS (NIO to AIO) Performance

Discussion created by Alan Baugher Employee on Jun 15, 2018
Latest reply on Jul 20, 2018 by Alan Baugher

Team,

 

Thanks to Mark P. marpo01 for this note with regards to increasing performance for Wildfly JMS I/O.

    -  Key Phrases:   Journal / Hornetq

 

Important side note:   These settings appears to have a supportive role with database connection pooling to the J2EE datasources to allow use of maximum possible connections.

 

FYI  -  Out-of-the-box deployment of the JBOSS/Widfly component will have Hornetq Journal configuration set at NIO mode.

 

 

 

This can be validated within the <JBOSS_HOME>/standalone/configuration/<ca-standalone-full-ha.xml> file or within startup server.log.

 

grep NIO server.log

server.log INFO [org.hornetq.core.server] (ServerService Thread Pool -- 60) HQ221013: Using NIO Journal
server.log INFO [org.xnio] (MSC service thread 1-7) XNIO version 3.3.0.Final
server.log INFO [org.xnio.nio] (MSC service thread 1-7) XNIO NIO Implementation Version 3.3.0.Final

 

 

 

 

 

 

If your Linux OS file system allows for use of the library libaio; and your journal files are NOT on NFS, you may wish to explore this optional configuration.:   

            -View if already installed:   yum list libaio   

            - Install library:     yum install libaio

 

 

You may wish to run the JBOSS/Wildfly GUI to update the standalone.xml or use vi/sed for the file.

 

/opt/CA/wildfly-idm/bin/jboss-cli.sh --connect --user=jboss-admin --password=Password01!  --gui

    -  Requires X11 libraries to use

 

 

 

 

Alternatively, you may wish to use the jboss-cli.sh process.

 

Save the below lines to a new text file (jboss-aio.cli), and use jboss-cli.sh to import them (or copy-n-paste the lines one-by-one into the jboss-cli.sh shell).

   -  Example:

/opt/CA/wildfly-idm/bin/jboss-cli.sh --connect --user=jboss-admin --password=Password01! --file=/tmp/jboss-aio.cli

 

 

NOTE:  Be sure to update both the LIVE and the BACKUP of the Hornetq Journal system.

   -  If you ONLY have one node, you will likely ONLY have a LIVE section and no BACKUP.

 

Edit: 2018-07-20  [added thread-pool-max-size]

 

/subsystem=messaging/hornetq-server=default/:write-attribute(name=journal-type,value=ASYNCIO)
/subsystem=messaging/hornetq-server=default/:write-attribute(name=journal-sync-transactional,value=false)
/subsystem=messaging/hornetq-server=default/:write-attribute(name=journal-sync-non-transactional,value=false)
/subsystem=messaging/hornetq-server=default/:write-attribute(name=journal-file-size,value=10485760)
/subsystem=messaging/hornetq-server=default/:write-attribute(name=journal-min-files,value=20)
/subsystem=messaging/hornetq-server=default/:write-attribute(name=journal-compact-min-files,value=20)
/subsystem=messaging/hornetq-server=default/:write-attribute(name=journal-max-io,value=5000)

/subsystem=messaging/hornetq-server=default/:write-attribute(name=thread-pool-max-size,value=300)

 

/subsystem=messaging/hornetq-server=backup/:write-attribute(name=journal-type,value=ASYNCIO)
/subsystem=messaging/hornetq-server=backup/:write-attribute(name=journal-sync-transactional,value=false)
/subsystem=messaging/hornetq-server=backup/:write-attribute(name=journal-sync-non-transactional,value=false)
/subsystem=messaging/hornetq-server=backup/:write-attribute(name=journal-file-size,value=10485760)
/subsystem=messaging/hornetq-server=backup/:write-attribute(name=journal-min-files,value=20)
/subsystem=messaging/hornetq-server=backup/:write-attribute(name=journal-compact-min-files,value=20)
/subsystem=messaging/hornetq-server=backup/:write-attribute(name=journal-max-io,value=5000)

/subsystem=messaging/hornetq-server=backup/:write-attribute(name=thread-pool-max-size,value=300)

 

 

If you use the jboss-cli.sh in GUI mode, you can see documentation on the value of each item as you "hover-over-the-item"

 

 

 

/opt/CA/wildfly-idm/bin/jboss-cli.sh --connect --user=jboss-admin --password=Password01!  --command=:take-snapshot 

/opt/CA/wildfly-idm/bin/jboss-cli.sh --connect --user=jboss-admin --password=Password01! --file=jboss-aio.cli

/opt/CA/wildfly-idm/bin/jboss-cli.sh --connect --user=jboss-admin --password=Password01! --command=":reload"

 

 

 

Same script, but with a few extra keywords

 

 

 

 

After AIO is configured, you should see this listed in the server.log file

 

 

grep AIO server.log

INFO  [org.hornetq.core.server] (ServerService Thread Pool -- 60) HQ221012: Using AIO Journal

 

 

 

####   To "read" the new values:   ####

 

/subsystem=messaging/hornetq-server=default/:read-attribute(name=journal-type)
/subsystem=messaging/hornetq-server=default/:read-attribute(name=journal-sync-transactional)
/subsystem=messaging/hornetq-server=default/:read-attribute(name=journal-sync-non-transactional)
/subsystem=messaging/hornetq-server=default/:read-attribute(name=journal-file-size)
/subsystem=messaging/hornetq-server=default/:read-attribute(name=journal-min-files)
/subsystem=messaging/hornetq-server=default/:read-attribute(name=journal-compact-min-files)
/subsystem=messaging/hornetq-server=default/:read-attribute(name=journal-max-io)

/subsystem=messaging/hornetq-server=default/:read-attribute(name=thread-pool-max-size)

 

/subsystem=messaging/hornetq-server=backup/:read-attribute(name=journal-type)
/subsystem=messaging/hornetq-server=backup/:read-attribute(name=journal-sync-transactional)
/subsystem=messaging/hornetq-server=backup/:read-attribute(name=journal-sync-non-transactional)
/subsystem=messaging/hornetq-server=backup/:read-attribute(name=journal-file-size)
/subsystem=messaging/hornetq-server=backup/:read-attribute(name=journal-min-files)
/subsystem=messaging/hornetq-server=backup/:read-attribute(name=journal-compact-min-files)
/subsystem=messaging/hornetq-server=backup/:read-attribute(name=journal-max-io)

/subsystem=messaging/hornetq-server=backup/:read-attribute(name=thread-pool-max-size)

 

 

 

 

Cheers,

 

A.

Outcomes