You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by comradgre <co...@gmail.com> on 2013/03/19 07:58:19 UTC

ActiveMQ topic vs queue

Hi!
Current system have about 100 messages per second. Could you pls help me
avoid flooding issue and improve performance of current activeMQ.
Please see attached activemq.xml
activemq.xml
<http://activemq.2283324.n4.nabble.com/file/n4664859/activemq.xml>  
Current MQ have 2 queues: inq and outq.

Sometimes i think, that it will be better to switch off producerFlowControl
and enable <systemUsage>, but i don't understand how to change current conf
file to have it (should I disable memoryLimit of policyEntry, what
systemUsage elements should be enable).

Please help me, thanks!



--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-topic-vs-queue-tp4664859.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: ActiveMQ topic vs queue

Posted by comradgre <co...@gmail.com>.
Also how to monitor store and memory usage using jconsole? I tried to monitor
it here: org.apache.activemq.broker.jmx.BrokerView
(Mbeans/prod.domain/localhost/Broker/Attributes) but jconsole shows me 0 for
all memory counters.



--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-topic-vs-queue-tp4664859p4664860.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: ActiveMQ topic vs queue

Posted by comradgre <co...@gmail.com>.
I have ActiveMQ 5.5.0 if it will help.



--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-topic-vs-queue-tp4664859p4664865.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Re: ActiveMQ topic vs queue

Posted by comradgre <co...@gmail.com>.
I found average size of messaged around 100 bytes using web site
http://mothereff.in/byte-counter



--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-topic-vs-queue-tp4664859p4664933.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Re: ActiveMQ topic vs queue

Posted by Christian Posta <ch...@gmail.com>.
SuoNayi,
My mistake, you're correct. PFC should hit at 64MB.

comradgre,
in your case, increase the system limits should be helpful. If you're doing
persistent messaging on queues, you can turn off PFC and allow the cursor
to know when the cache is full and not store to memory anymore. How big are
your messages?


On Tue, Mar 19, 2013 at 6:02 PM, SuoNayi <su...@163.com> wrote:

> I don't think the default memory usage and 100MB for the queue memory
> limit will lead to OOM.
> Because PFC is enabled for the queue and the default message cursor will
> take care of the usage.
> Disabling PFC and using vmcursor is the first suspect to lead to OOM.
>
>
>
> At 2013-03-19 22:05:10,"Christian Posta" <ch...@gmail.com>
> wrote:
> ><systemUsage> entries will set limits for mem, store, temp, etc for entire
> >broker. if you comment them out, they'll revert to default entries
> >
> http://activemq.apache.org/producer-flow-control.html#ProducerFlowControl-Systemusagewhich
> >are quite low depending on your requirements.
> >
> >The default for memoryUsage is 64MB but you set your queue memoryLimit to
> >100MB. That could very well lead to OOM.
> >
> >Please take a look at
> >http://activemq.apache.org/producer-flow-control.html
> >http://activemq.apache.org/javalangoutofmemory.html
> >http://www.christianposta.com/blog/?p=273
> >
> >
> >On Mon, Mar 18, 2013 at 11:58 PM, comradgre <co...@gmail.com> wrote:
> >
> >> Hi!
> >> Current system have about 100 messages per second. Could you pls help me
> >> avoid flooding issue and improve performance of current activeMQ.
> >> Please see attached activemq.xml
> >> activemq.xml
> >> <http://activemq.2283324.n4.nabble.com/file/n4664859/activemq.xml>
> >> Current MQ have 2 queues: inq and outq.
> >>
> >> Sometimes i think, that it will be better to switch off
> producerFlowControl
> >> and enable <systemUsage>, but i don't understand how to change current
> conf
> >> file to have it (should I disable memoryLimit of policyEntry, what
> >> systemUsage elements should be enable).
> >>
> >> Please help me, thanks!
> >>
> >>
> >>
> >> --
> >> View this message in context:
> >>
> http://activemq.2283324.n4.nabble.com/ActiveMQ-topic-vs-queue-tp4664859.html
> >> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> >>
> >
> >
> >
> >--
> >*Christian Posta*
> >http://www.christianposta.com/blog
> >twitter: @christianposta
>



-- 
*Christian Posta*
http://www.christianposta.com/blog
twitter: @christianposta

Re:Re: ActiveMQ topic vs queue

Posted by SuoNayi <su...@163.com>.
I don't think the default memory usage and 100MB for the queue memory limit will lead to OOM.
Because PFC is enabled for the queue and the default message cursor will take care of the usage.
Disabling PFC and using vmcursor is the first suspect to lead to OOM.



At 2013-03-19 22:05:10,"Christian Posta" <ch...@gmail.com> wrote:
><systemUsage> entries will set limits for mem, store, temp, etc for entire
>broker. if you comment them out, they'll revert to default entries
>http://activemq.apache.org/producer-flow-control.html#ProducerFlowControl-Systemusagewhich
>are quite low depending on your requirements.
>
>The default for memoryUsage is 64MB but you set your queue memoryLimit to
>100MB. That could very well lead to OOM.
>
>Please take a look at
>http://activemq.apache.org/producer-flow-control.html
>http://activemq.apache.org/javalangoutofmemory.html
>http://www.christianposta.com/blog/?p=273
>
>
>On Mon, Mar 18, 2013 at 11:58 PM, comradgre <co...@gmail.com> wrote:
>
>> Hi!
>> Current system have about 100 messages per second. Could you pls help me
>> avoid flooding issue and improve performance of current activeMQ.
>> Please see attached activemq.xml
>> activemq.xml
>> <http://activemq.2283324.n4.nabble.com/file/n4664859/activemq.xml>
>> Current MQ have 2 queues: inq and outq.
>>
>> Sometimes i think, that it will be better to switch off producerFlowControl
>> and enable <systemUsage>, but i don't understand how to change current conf
>> file to have it (should I disable memoryLimit of policyEntry, what
>> systemUsage elements should be enable).
>>
>> Please help me, thanks!
>>
>>
>>
>> --
>> View this message in context:
>> http://activemq.2283324.n4.nabble.com/ActiveMQ-topic-vs-queue-tp4664859.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
>
>
>
>-- 
>*Christian Posta*
>http://www.christianposta.com/blog
>twitter: @christianposta

Re: ActiveMQ topic vs queue

Posted by comradgre <co...@gmail.com>.
>The default for memoryUsage is 64MB but you set your queue memoryLimit to
100MB. That could very well lead to OOM. 
Should I update value to 128 or 64?

I found how to enable StoreUsage using kahaDB, but currently i have next 2
questions:
1) What will be best: current realisation or StoreUsage?
2) How to improve current ProducerFlowControl realisation?



--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-topic-vs-queue-tp4664859p4664892.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: ActiveMQ topic vs queue

Posted by Christian Posta <ch...@gmail.com>.
<systemUsage> entries will set limits for mem, store, temp, etc for entire
broker. if you comment them out, they'll revert to default entries
http://activemq.apache.org/producer-flow-control.html#ProducerFlowControl-Systemusagewhich
are quite low depending on your requirements.

The default for memoryUsage is 64MB but you set your queue memoryLimit to
100MB. That could very well lead to OOM.

Please take a look at
http://activemq.apache.org/producer-flow-control.html
http://activemq.apache.org/javalangoutofmemory.html
http://www.christianposta.com/blog/?p=273


On Mon, Mar 18, 2013 at 11:58 PM, comradgre <co...@gmail.com> wrote:

> Hi!
> Current system have about 100 messages per second. Could you pls help me
> avoid flooding issue and improve performance of current activeMQ.
> Please see attached activemq.xml
> activemq.xml
> <http://activemq.2283324.n4.nabble.com/file/n4664859/activemq.xml>
> Current MQ have 2 queues: inq and outq.
>
> Sometimes i think, that it will be better to switch off producerFlowControl
> and enable <systemUsage>, but i don't understand how to change current conf
> file to have it (should I disable memoryLimit of policyEntry, what
> systemUsage elements should be enable).
>
> Please help me, thanks!
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/ActiveMQ-topic-vs-queue-tp4664859.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>



-- 
*Christian Posta*
http://www.christianposta.com/blog
twitter: @christianposta