Uploaded image for project: 'JBoss A-MQ'
  1. JBoss A-MQ
  2. ENTMQ-879

Using XA Transaction from EAP causes high CPU on A-MQ

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • JBoss A-MQ 6.2
    • JBoss A-MQ 6.1
    • rar-jee
    • None
    • Hide

      1. Run A-MQ 6.1 after commenting admin user in etc/user.properties

      3. Setup Postgres Database as XA datasource, and run create-psql.txt from the test case.

      • Postgres driver module attached. Copy it to 'modules' directory.
      • Change Database configuration in attached standalone.xml

      3. Setup EAP 6.3 to connect to ActiveMQ using RAR by deploying RAR to standalone/deployments and using config from standalone.xml attached.

      • Full Documentation here

      4. Compile and Deploy the attached test case EAPJMSXA,

      #mvn clean package

      #cp target/JMSListenerEAP6-0.0.1-SNAPSHOT.war standalone/deployments

      5. Send messages to 'TESTQIN' queue on A-MQ using any client

      6. Observe A-MQ CPU go up to 40% and maintain there until connection from EAP is stopped.

      Show
      1. Run A-MQ 6.1 after commenting admin user in etc/user.properties 3. Setup Postgres Database as XA datasource, and run create-psql.txt from the test case. Postgres driver module attached. Copy it to 'modules' directory. Change Database configuration in attached standalone.xml 3. Setup EAP 6.3 to connect to ActiveMQ using RAR by deploying RAR to standalone/deployments and using config from standalone.xml attached. Full Documentation here 4. Compile and Deploy the attached test case EAPJMSXA, #mvn clean package #cp target/JMSListenerEAP6-0.0.1-SNAPSHOT.war standalone/deployments 5. Send messages to 'TESTQIN' queue on A-MQ using any client 6. Observe A-MQ CPU go up to 40% and maintain there until connection from EAP is stopped.

      When an XA connection is established from EAP to A-MQ using the RAR we see TCP connections are continuously opened and closed. You can watch the Topic ActiveMQ.Advisory.Queue enqueue count go up to verify this.This also causes CPU usage by A-MQ. Measuring the top consumers, they appear to be these, all with threads like this:| 23741 jshepher 20 0 4272184 1.231g 890668 S 19.7 8.0 0:14.04 java|

      23745 jshepher 20 0 4272184 1.231g 890668 S 19.7 8.0 0:13.80 java
      23612 jshepher 20 0 4272184 1.231g 890668 S 13.1 8.0 0:44.23 java
      23735 jshepher 20 0 4272184 1.231g 890668 S 13.1 8.0 0:13.69 java
      23744 jshepher 20 0 4272184 1.231g 890668 S 13.1 8.0 0:14.04 java
      23747 jshepher 20 0 4272184 1.231g 890668 S 13.1 8.0 0:15.66 java

      They are ActiveMQ transport sockets reading:| "ActiveMQ Transport: tcp:///127.0.0.1:37866@61616" daemon prio=10 tid=0x00007faa00004000 nid=0x5cbd runnable [0x00007fa9f9edd000]|

      java.lang.Thread.State: RUNNABLE
      at java.net.SocketInputStream.socketRead0(Native Method)
      at java.net.SocketInputStream.read(SocketInputStream.java:152)
      at java.net.SocketInputStream.read(SocketInputStream.java:122)
      at org.apache.activemq.transport.tcp.TcpBufferedInputStream.fill(TcpBufferedInputStream.java:50)
      at org.apache.activemq.transport.tcp.TcpTransport$2.fill(TcpTransport.java:609)
      at org.apache.activemq.transport.tcp.TcpBufferedInputStream.read(TcpBufferedInputStream.java:58)
      at org.apache.activemq.transport.tcp.TcpTransport$2.read(TcpTransport.java:594)
      at java.io.DataInputStream.readInt(DataInputStream.java:387)
      at org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:258)
      at org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.java:221)
      at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:213)
      at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:196)
      at java.lang.Thread.run(Thread.java:745)

      These threads live for a short time, but while they are alive consume 20% CPU each.

        1. eap-config.zip
          5 kB
        2. EAPJMSXA.zip
          47 kB
        3. postgres-module.zip
          523 kB

            rhn-support-tmielke Torsten Mielke
            rhn-support-jshepher Jason Shepherd
            Votes:
            2 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: