FAQ
Hello,

I am doing some raw performance tests on ActiveMQ to replace SonicMQ (JMS
based) on C++ side. We have CMS using OpenWire.
My test has got five Non Durable subscribers on a Topic. When I send 25000
messages, following happens:

1. Persistent - It takes 3 times (27sec) more than what it takes on SonicMQ
(9sec). I need to find out what's causing this delay and how to improve it.
I understand that publisher will wait until broker comes back to ack
messages. I am using Auto_ACK. I have looked at SonicMQ settings for IO
Buffer and socket buffer and do the same for ActiveMQ but no success.


2. Non Persistent - This one is faster as fire and forget but messages are
sometime 2 seconds in flight on subscriber which is unacceptable to our use
case. I tried setting prefetch etc thinking it's slow consumer but no
success.

Hardware is same for both. ActiveMQ install is default installation. I am
going through performance tuning guide mentioned in the forum but any quick
clues / areas to look at will be appreciated.

Sorry if my query is too subjective but I want to find out where ActiveMQ is
taking time and why. I have done raw tests just using stomp on ActiveMQ (No
CPP involved) and it was way faster as compared to Sonic. So I suspect, I
need to tweak some settings which may be causing it.


Thanks
AJ




--
View this message in context: http://activemq.2283324.n4.nabble.com/Active-MQ-Performance-tp4712952.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.

Search Discussions

  • Clebert Suconic at Jun 14, 2016 at 12:58 pm
    What version ?

    Can you try Artemis ?
    On Tuesday, June 14, 2016, ActiveMQ Investigation wrote:

    Hello,

    I am doing some raw performance tests on ActiveMQ to replace SonicMQ (JMS
    based) on C++ side. We have CMS using OpenWire.
    My test has got five Non Durable subscribers on a Topic. When I send 25000
    messages, following happens:

    1. Persistent - It takes 3 times (27sec) more than what it takes on SonicMQ
    (9sec). I need to find out what's causing this delay and how to improve it.
    I understand that publisher will wait until broker comes back to ack
    messages. I am using Auto_ACK. I have looked at SonicMQ settings for IO
    Buffer and socket buffer and do the same for ActiveMQ but no success.


    2. Non Persistent - This one is faster as fire and forget but messages are
    sometime 2 seconds in flight on subscriber which is unacceptable to our use
    case. I tried setting prefetch etc thinking it's slow consumer but no
    success.

    Hardware is same for both. ActiveMQ install is default installation. I am
    going through performance tuning guide mentioned in the forum but any quick
    clues / areas to look at will be appreciated.

    Sorry if my query is too subjective but I want to find out where ActiveMQ
    is
    taking time and why. I have done raw tests just using stomp on ActiveMQ (No
    CPP involved) and it was way faster as compared to Sonic. So I suspect, I
    need to tweak some settings which may be causing it.


    Thanks
    AJ




    --
    View this message in context:
    http://activemq.2283324.n4.nabble.com/Active-MQ-Performance-tp4712952.html
    Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.

    --
    Clebert Suconic
  • ActiveMQ Investigation at Jun 14, 2016 at 1:35 pm
    Hello Celebert,

    I am using apache-activemq-5.12.1.

    I found out the issue. My subscribers were on same machine as ActiveMQ
    install. While 5 subscribers, consuming messages on same machine as install,
    it was quite intensive. I moved subscribers to a separate machine than
    install and it took 9 seconds to send messages and almost similar to
    receive. This is about persistent messages.

    For non persistent, in new setup, it takes 1.7 seconds which is acceptable.
    However, consumer (gets all msgs in 6 seconds) in is showing messages
    waiting for 1+ seconds.


    For SonicMQ, time taken is consistent irrespective of consumer on machine
    where sonic install is there.


    I feel that this 9 second is still high for sending 25000 msgs. It can do
    better. Also, can this CPU and memory intensiveness improved.

    I will go through Artemis. Sorry for naive query but how different Artemis
    is to ActiveMQ. I haven't explored that front.

    Thanks
    AJ









    Thanks
    AJ



    --
    View this message in context: http://activemq.2283324.n4.nabble.com/Active-MQ-Performance-tp4712952p4712960.html
    Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
  • Clebert Suconic at Jun 14, 2016 at 2:23 pm
    Artemis is an initiative to make a new broker with similar features to
    ActiveMQ5 which is getting closer and closer each day.


    I would say It's worth giving it a try. 1.3.0 just passed the voting,
    you should see the announcement soon for the release.


    On Tue, Jun 14, 2016 at 8:56 AM, ActiveMQ Investigation
    wrote:
    Hello Celebert,

    I am using apache-activemq-5.12.1.

    I found out the issue. My subscribers were on same machine as ActiveMQ
    install. While 5 subscribers, consuming messages on same machine as install,
    it was quite intensive. I moved subscribers to a separate machine than
    install and it took 9 seconds to send messages and almost similar to
    receive. This is about persistent messages.

    For non persistent, in new setup, it takes 1.7 seconds which is acceptable.
    However, consumer (gets all msgs in 6 seconds) in is showing messages
    waiting for 1+ seconds.


    For SonicMQ, time taken is consistent irrespective of consumer on machine
    where sonic install is there.


    I feel that this 9 second is still high for sending 25000 msgs. It can do
    better. Also, can this CPU and memory intensiveness improved.

    I will go through Artemis. Sorry for naive query but how different Artemis
    is to ActiveMQ. I haven't explored that front.

    Thanks
    AJ









    Thanks
    AJ



    --
    View this message in context: http://activemq.2283324.n4.nabble.com/Active-MQ-Performance-tp4712952p4712960.html
    Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.


    --
    Clebert Suconic
  • Matt Pavlovich at Jun 15, 2016 at 8:49 pm
    Hi-

    How big are the messages? Can you post a link to the C++ code. There may
    be some gotchas in how its sent or recv'd.

    It sounds like you have confirmed that you do not have any network or
    disk performance issues, since SonicMQ is getting reasonable numbers on
    the same server.

    Out-of-the-box ActiveMQ is configured to ensure you don't run out of
    memory or lose messages, so it is setup to work for very low memory
    footprints.

    As a starting point adjust the memoryUsage setting here:

    <systemUsage>
          <systemUsage>
              <memoryUsage>
                  <memoryUsage percentOfJvmHeap="70" />
              </memoryUsage>
              <storeUsage>
                  <storeUsage limit="100 gb"/>
              </storeUsage>
              <tempUsage>
                  <tempUsage limit="50 gb"/>
              </tempUsage>
          </systemUsage>
    </systemUsage>

    Flip the openwire to nio as well:

                  <transportConnector name="openwire" uri="nio://0.0.0.0:0"/>

    On 6/14/16 7:56 AM, ActiveMQ Investigation wrote:
    Hello Celebert,

    I am using apache-activemq-5.12.1.

    I found out the issue. My subscribers were on same machine as ActiveMQ
    install. While 5 subscribers, consuming messages on same machine as install,
    it was quite intensive. I moved subscribers to a separate machine than
    install and it took 9 seconds to send messages and almost similar to
    receive. This is about persistent messages.

    For non persistent, in new setup, it takes 1.7 seconds which is acceptable.
    However, consumer (gets all msgs in 6 seconds) in is showing messages
    waiting for 1+ seconds.


    For SonicMQ, time taken is consistent irrespective of consumer on machine
    where sonic install is there.


    I feel that this 9 second is still high for sending 25000 msgs. It can do
    better. Also, can this CPU and memory intensiveness improved.

    I will go through Artemis. Sorry for naive query but how different Artemis
    is to ActiveMQ. I haven't explored that front.

    Thanks
    AJ









    Thanks
    AJ



    --
    View this message in context: http://activemq.2283324.n4.nabble.com/Active-MQ-Performance-tp4712952p4712960.html
    Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
  • ActiveMQ Investigation at Jun 16, 2016 at 7:52 am
    Hello Matt,

    Thanks for your message. I will do these settings and see what happens. I
    have attached links to code and results.

    My test show these two problems:

    - ActiveMQ Queue takes more time in Persistent Mode (Q28,Q31 rows in excel
    sheet) as compared to Sonic.
    - ActiveMQ Non Persistent Per Message Max time is very high. (Example: U59,
    U56). It looks consumer is not fast enough to process them.

    Overall, Maximum Time taken by any message in flight between producer and
    sender in ActiveMQ is quote high.



    I have copied the code to IDEONE editor (it's just a copy and IDEONE don't
    have necessary libs) to share if it helps:

    Producer: http://ideone.com/4nmARP
    Consumer: http://ideone.com/QnFHYk

    Results:
    https://docs.google.com/spreadsheets/d/1hHt7EsgwGSxHR11edunWSuzzTbc88Wch8lFkBXmPxUI/edit?usp=sharing

    If you can't access code on IDEONE:

    Producer -
    https://docs.google.com/document/d/1RbGUKYUbWUk8LcxqbCwf53_lNEfhnxfDz3TPqSNT2Dg/edit?usp=sharing

    Consumer -
    https://docs.google.com/document/d/1jW5qPG40yUTBaHezEpjKrwBFZriL2bpxHZcM0U_2Gfk/edit?usp=sharing


    Sorry if above link passage is not as per forum protocol. I am new to the
    forum.

    Thanks
    AJ



    --
    View this message in context: http://activemq.2283324.n4.nabble.com/Active-MQ-Performance-tp4712952p4713058.html
    Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdev @
categoriesactivemq
postedJun 14, '16 at 7:45a
activeJun 16, '16 at 7:52a
posts6
users3
websiteactivemq.apache.org

People

Translate

site design / logo © 2018 Grokbase