activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Torsten Mielke <tors...@fusesource.com>
Subject Re: systemUsage and destinationPolicy config
Date Tue, 04 Oct 2011 10:02:07 GMT

On Oct 3, 2011, at 12:28 PM, James Black wrote:

> Hello,
> 
> looking for some help around systemUsage and destinationPolicy configuration
> as I'm having some difficulty fully understanding the relationship between
> systemUsage, destinationPolicy, and flow control.
> 
> All our messages are persistent!  producerFlowControl is on.
> 
> So we give ActiveMQ say a maximum of 512MB heap space.
> 
> Our systemUsage is set as below:
> 
> <systemUsage>
>    <systemUsage>
>        <memoryUsage>
>            <memoryUsage limit="200 mb"/>
>        </memoryUsage>
>        <storeUsage>
>            <storeUsage limit="10 gb"/>
>        </storeUsage>
>        <tempUsage>
>            <tempUsage limit="1000 mb"/>
>        </tempUsage>
>    </systemUsage>
> </systemUsage>
> 
> Our destination policy as below:
> 
> <destinationPolicy>
>    <policyMap>
>      <policyEntries>
>        <policyEntry topic=">" producerFlowControl="true" memoryLimit="1mb">
>          <pendingSubscriberPolicy>
>          </pendingSubscriberPolicy>
>        </policyEntry>
>        <policyEntry queue=">" producerFlowControl="true" memoryLimit="1mb">
>        </policyEntry>
>      </policyEntries>
>    </policyMap>
> </destinationPolicy>
> 
> Please verify the if the following is correct:
> 
> This means that for each individual queue/topic the memory limit is 1MB. 
> What exactly happens when this 1MB is hit, does the queue block or does it
> page to disc?

When the 1MB limit is hit, producer flow control kicks in and stops the producer until some
messages are consumed.
Persistent msgs are always stored to persistence adapter. 

> 
> The total allowed memory for all queues and topics is 200MB.  Meaning that
> we could have 200 channels operating at their full capacity of 1MB.  We
> currently have 16 queues and topics in total so obviously that is never
> reached.

Correct. If your amount of queues and topics is fixed, perhaps you want to raise the memory
limit for each destination to better utilize the 200MB memory usage?

> 
> Are we better to remove the individual policy entry on the memory limit and
> share the memory between the various channels?

As mentioned above, you could increase the memory limit per destination from 1mb to perhaps
5 or more MB.
If you disable the memory limit per destination, then producer flow control only kicks in
whenever the overall memory usage of the broker gets hit. A particular destination may then
use up more space than only 1 or 5 MB, depending on producer rate and consumer speed.



> If we do this at what point would they block?
> 
> Any help very much appreciated!  Can paypal you some beer money!
> 
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/systemUsage-and-destinationPolicy-config-tp3867059p3867059.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.



Torsten Mielke
torsten@fusesource.com
tmielke@blogspot.com




Mime
View raw message