You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Rainer Klute (JIRA)" <ji...@apache.org> on 2008/02/22 10:39:14 UTC

[jira] Issue Comment Edited: (AMQ-1586) Topic throughput drops with the number of consumers

    [ https://issues.apache.org/activemq/browse/AMQ-1586?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=41368#action_41368 ] 

rainer klute edited comment on AMQ-1586 at 2/22/08 1:38 AM:
------------------------------------------------------------

To corrobate the description above with some numbers, I ran a test that did the following:
* A producer sends 10,000 messages to a topic. This takes 7 seconds.
* A consumer registers as a durable subscriber and receives those 10,000 messages. This takes 6 seconds.
* Now 100 consumers register with the topic instead of just one. Each consumer receives each message. How long should this take?
** Well, first I'd expect a factor of 100, because each message will be read 100 times from the topic.
** Then we will have some administrative overhead, so lets be very pessimistic and add a factor of 2.
** Or, no, lets use 3 instead of 2, because we might have been exceptionally lucky with the 6 seconds it took to receive the messages with one consumer.

Following this calculation, I'd expect a runtime of at most '''6s * 100 * 3 = 1,800s''' (30 minutes).

However, instead of half an hour the test program ran '''5 hours and 18 minutes'''!

With ActiveMQ revision 629726 the situation has improved considerably. Instead of 5 hours and 18 minutes the test took '''1 hour and 58 minutes'''. This a considerable gain by a factor of 2,7! However, it still seems slow compared with the worst-case expection of 30 minutes.

      was (Author: rainer klute):
    To corrobate the description above with some numbers, I ran a test that did the following:
* A producer sends 10,000 messages to a topic. This takes 7 seconds.
* A consumer registers as a durable subscriber and receives those 10,000 messages. This takes 6 seconds.
* Now 100 consumers register with the topic instead of just one. Each consumer receives each message. How long should this take?
** Well, first I'd expect a factor of 100, because each message will be read 100 times from the topic.
** Then we will have some administrative overhead, so lets be very pessimistic and add a factor of 2.
** Or, no, lets use 3 instead of 2, because we might have been exceptionally lucky with the 6 seconds it took to receive the messages with one consumer.
: Following this calculation, I'd expect a runtime of at most '''6s * 100 * 3 = 1,800s''' (30 minutes).

However, instead of half an hour the test program ran '''5 hours and 18 minutes'''!

With ActiveMQ revision 629726 the situation has improved considerably. Instead of 5 hours and 18 minutes the test took '''1 hour and 58 minutes'''. This a considerable gain by a factor of 2,7! However, it still seems slow compared with the worst-case expection of 30 minutes.
  
> Topic throughput drops with the number of consumers
> ---------------------------------------------------
>
>                 Key: AMQ-1586
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1586
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.1.0
>            Reporter: Rainer Klute
>
> If many consumers are reading from a topic, the performance of the producer and the consumers drops tremendously. More on this in the forum discussion <http://www.nabble.com/Optimising-PrefetchSubscription.dispatchPending%28%29-ideas-td15359726s2354.html>.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.