I am trying to do a performance benchmark of using Openwire and AMQP with ActiveMQ and getting huge variation in throughput
Using Openwire
Persistent Message size: 43 byes, no compression, 200 concurrent connections, throughput around 9006 msgs/sec.
Persistent Message size: 1580 byes, no compression, 200 concurrent connections, throughput around 3678.86 msgs/sec.
There is not much load on CPU less than 5% so I can use compression to get better throughput but that's a different story.
Using AMQP 1.0
Persistent Message size: 43 byes, no compression, 200 concurrent connections, throughput around 12.8 msgs/sec.
Persistent Message size: 1580 byes, no compression, 200 concurrent connections, throughput around 11.9 msgs/sec.
Our configuration is as
**Client**
- JMeter 2.11 using Apache QPid 0.28 as AMQP 1.0 client
- Java 1.7
- Ubuntu 12.04 LTS Quad Core 2.0 GHz,7GB RAM, 512 KB Cache
**Broker**
- ActiveMQ 5.10 with KahaDB, using LevelDB didn't give much different numbers
- Java 1.7
- Ubuntu 12.04 LTS Quad Core 2.0 GHz,7GB RAM, 512 KB Cache
Tuning Efforts:
I looked at the following
For Openwire, on Broker side, changed tcp to nio
<transportConnector name="openwire" uri="nio://0.0.0.0:61616?maximumConnections=1000&wireFormat.tcpNoDelayEnabled=true&wireFormat.maxFrameSize=104857600"/>
On Client side url was as
tcp://<broker ip>:61616?jms.useAsyncSend=true
For AMQP 1.0, on Broker side, changed to nio and added some options on url but have no apparent effect
<transportConnector name="amqp" uri="amqp+nio://0.0.0.0:5672?maximumConnections=1000&wireFormat.maxFrameSize=104857600"/>
On Client side
connectionFactory = amqp://username:password@<broker ip>:5672?remote-host=default
All the tuning options available on Openwire are not available on amqp, especially on producer using jms.useAsyncSend=true gave me huge performance boost, of course with the less reliability of ack. I came to know that by default sending message with amqp is in async mode by default. Apparently the numbers are telling us that it is possibly being processed in synchronous mode ?
Here are some of the links that I already look into
- http://activemq.apache.org/amqp.html
- http://bhavin.directi.com/rabbitmq-vs-apache-activemq-vs-apache-qpid/
- http://activemq.2283324.n4.nabble.com/Interesting-Persistent-Messaging-Performance-td4676001.html
- http://activemq.2283324.n4.nabble.com/Any-Performance-Latency-benchmarks-for-ActiveMQ-s-AMQP-implementation-against-OpenWire-td4674713.html
- http://www.slideshare.net/ceposta/activemq-performance-tuning#
http://working-with-activemq.blogspot.com/2012/05/performance-improvements.html
Are there configuration (for connections or channels) or tuning options with ActiveMQ AMQP and/or QPid that I are unaware of ?
UPDATE 1:
As Tim pointed out below, my comparisons were incorrect, I was using Async.Send for Openwire and Sync.Send for AMQP 1.0, it was my mis-understanding that AMQP 1.0 by default uses Async.Send. Robbie pointed out that is not the case for Persistent messages. Here are the correct comparison numbers
Synchronous Send using Openwire Persistent Message size: 43 byes, no compression, 200 concurrent connections, 100,000 message count, throughput around 13.1 msgs/sec.
Persistent Message size: 1580 byes, no compression, 200 concurrent connections, 100,000 message count, throughput around 13.1 msgs/sec.
Synchronous Send using AMQP 1.0 Persistent Message size: 43 byes, no compression, 200 concurrent connections, 100,000 message count, throughput around 12.8 msgs/sec.
Persistent Message size: 1580 byes, no compression, 200 concurrent connections, 100,000 message count, throughput around 11.9 msgs/sec.
Async.Send using Openwire Persistent Message size: 43 byes, no compression, 200 concurrent connections, 100,000 message count, throughput around 9006 msgs/sec.
Persistent Message size: 1580 byes, no compression, 200 concurrent connections, 100,000 message count, throughput around 3678.86 msgs/sec.
Async.Send using AMQP 1.0 Persistent Message size: 43 byes, no compression, 200 concurrent connections, 100,000 message count, throughput around 21.7 msgs/sec.
Persistent Message size: 1580 byes, no compression, 200 concurrent connections, 100,000 message count, throughput around 21.2 msgs/sec.
Note:
Even though with Async.Send message delivery is not guaranteed, using Openwire I always received all 100,0000 messages while with AMQP 1.0 around 25% of messages went missing.
AMQP 1.0 Async.Send numbers are still not close to Openwire Async.Send numbers. Any other suggestion(s) ?
Thanks for your help.