You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by harry143 <ha...@yahoo-inc.com> on 2011/12/20 09:45:07 UTC

Re: Backlog data causes producers to slow down.

I am facing the similar problem.
Whenever my consumer goes down and there is a data back log the production
rate goes down significantly.
Moreover when my consumer is up again , the production rate goes down again
and this cycle goes on.
Some Info : 
I am using Producer flow control = FALSE , AsyncSend(true) , persistence =
true and ConcurrentQueueStoreAndDispatch = true
As i read in this post about cursors so i am using the default store cursor.

Here is snippet from broker.xml
destinationPolicy>
      <policyMap>
        <policyEntries>
          <policyEntry topic=">" optimizedDispatch="true" memoryLimit="1gb"
producerFlowControl="false"  />
          <policyEntry queue=">" optimizedDispatch="true" memoryLimit="1gb"
producerFlowControl="false" />
        </policyEntries>
      </policyMap>
    </destinationPolicy>

<systemUsage>
      <systemUsage sendFailIfNoSpace="true">
        <memoryUsage>
          <memoryUsage limit="20 gb" />
        </memoryUsage>
        <storeUsage>
          <storeUsage limit="500 gb" name="foo" />
        </storeUsage>
        <tempUsage>
          <tempUsage limit="1 gb" />
        </tempUsage>
      </systemUsage>
    </systemUsage>

I am using all the optimizations(i read from
http://fusesource.com/docs/broker/5.4/tuning/index.html )
for producer , consumer and broker.
These optimizations are able to increase message production rate a bit but
the main issue is the stability of the production rate.(why it goes down 10
times and then keep on going down with every time consumers goes down or
goes up again).
I am trying to figure out the cause but unable to pinpoint the code in
activeMQ which is causing this issue.
When i saw threads state in jconsole i found out that as soon as consumer
start running , producer thread goes into wait state ( State: WAITING on
java.util.concurrent.locks.AbstractQueuedSynchronizer ).I understand the
queue these producers write to is blocking queue.But i  don't understand why
consumers  are affecting producers while flow control is off and my store
size is 500 GB and memory is 20GB .Why not producers are producing at a
constant rate until my KahaDB store is full.

I really need help in this matter and deeply appreciate any help from you
guys.




--
View this message in context: http://activemq.2283324.n4.nabble.com/Backlog-data-causes-producers-to-slow-down-tp3806018p4217057.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Backlog data causes producers to slow down.

Posted by Gary Tully <ga...@gmail.com>.
@ harry143,  not easily. Do you have a test case you can share...
would like to get to the bottom of this but it would be great to have
some shared code that correctly captures the use case.
Something in Junit would be ideal.

On 21 December 2011 16:23, harry143 <ha...@yahoo-inc.com> wrote:
> Yea i tried With optimizedDispatch="false" as well as "true".But it really
> did not affect much.
> The problem of degradation in producer throughput remained.
> @gary : hey you mentioned in your previous post that producer and consumer
> share a common resource "consumer dispatch queue " . Is it also the case
> when producer flow control is false. If yes then is there any way to
> separate these producer and consumer to use different queue or something
> like that.
> T&R
> Harish Sharma
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Backlog-data-causes-producers-to-slow-down-tp3806018p4222279.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.



-- 
http://fusesource.com
http://blog.garytully.com

Re: Backlog data causes producers to slow down.

Posted by harry143 <ha...@yahoo-inc.com>.
Yea i tried With optimizedDispatch="false" as well as "true".But it really
did not affect much.
The problem of degradation in producer throughput remained.
@gary : hey you mentioned in your previous post that producer and consumer
share a common resource "consumer dispatch queue " . Is it also the case
when producer flow control is false. If yes then is there any way to
separate these producer and consumer to use different queue or something
like that.
T&R
Harish Sharma


--
View this message in context: http://activemq.2283324.n4.nabble.com/Backlog-data-causes-producers-to-slow-down-tp3806018p4222279.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.