You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by Aleksi Kallio <al...@csc.fi> on 2009/05/20 11:28:01 UTC

Why UseDedicatedTaskRunner is true by default?

Hello,

We have had problems with too many threads killing the broker. They were
solved by setting UseDedicatedTaskRunner to false.

The reason was that we are using a lot of temporary topics. TemporaryTopic
is a Destination, and broker creates a TaskRunner thread for each of them.

To me this seems quite counterintuitive, because TemporaryTopic (obtained
from Message.getJMSReplyTo) is something that you can use and throw away
without much thought. It is surprising that by default they block a thread
on the broker, i.e., reserve quite a heavy resource.

Because of the excessive thread creation, using dedicated TaskRunners was
also slower. If they are preferred, shouldn't temporary topics (and queues)
be handled in a more lighweight manner?

Cheers,
Aleksi

-- 
View this message in context: http://www.nabble.com/Why-UseDedicatedTaskRunner-is-true-by-default--tp23631976p23631976.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.


Re: Why UseDedicatedTaskRunner is true by default?

Posted by Rob Davies <ra...@gmail.com>.
+1 for that

Rob Davies
Sent from my iPhone

On 28 May 2009, at 08:37, Dejan Bosanac <de...@nighttale.net> wrote:

> Maybe we can provide a couple configuration files with different  
> setups,
> such as:
>
> activemq-performance.xml
> activemq-scaling.xml
> activemq-deep.xml
> activemq-network.xml
> activemq-full.xml
>
> it would give users good starting points to tune ActiveMQ to their  
> needs.
>
> Cheers
> --
> Dejan Bosanac
>
> Open Source Integration - http://fusesource.com/
> ActiveMQ in Action - http://www.manning.com/snyder/
> Blog - http://www.nighttale.net
>
>
> On Thu, May 28, 2009 at 4:35 AM, Bruce Snyder  
> <br...@gmail.com>wrote:
>
>> On Wed, May 27, 2009 at 8:22 PM, Aaron Mulder
>> <am...@alumni.princeton.edu> wrote:
>>> +1 for both
>>>
>>> Thanks,
>>>      Aaron
>>>
>>> On Wed, May 27, 2009 at 10:00 PM, Hiram Chirino <ch...@gmail.com>
>> wrote:
>>>> +1
>>
>> This was submitted in August 2008:
>>
>> https://issues.apache.org/activemq/browse/AMQ-1894
>>
>> Bruce
>> --
>> perl -e 'print
>> unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
>> );'
>>
>> ActiveMQ in Action: http://bit.ly/2je6cQ
>> Blog: http://bruceblog.org/
>> Twitter: http://twitter.com/brucesnyder
>>

Re: Why UseDedicatedTaskRunner is true by default?

Posted by Timothy Bish <ta...@gmail.com>.
+1 

On Thu, 2009-05-28 at 09:37 +0200, Dejan Bosanac wrote:
> Maybe we can provide a couple configuration files with different setups,
> such as:
> 
> activemq-performance.xml
> activemq-scaling.xml
> activemq-deep.xml
> activemq-network.xml
> activemq-full.xml
> 
> it would give users good starting points to tune ActiveMQ to their needs.
> 
> Cheers
> --
> Dejan Bosanac
> 
> Open Source Integration - http://fusesource.com/
> ActiveMQ in Action - http://www.manning.com/snyder/
> Blog - http://www.nighttale.net
> 
> 
> On Thu, May 28, 2009 at 4:35 AM, Bruce Snyder <br...@gmail.com>wrote:
> 
> > On Wed, May 27, 2009 at 8:22 PM, Aaron Mulder
> > <am...@alumni.princeton.edu> wrote:
> > > +1 for both
> > >
> > > Thanks,
> > >       Aaron
> > >
> > > On Wed, May 27, 2009 at 10:00 PM, Hiram Chirino <ch...@gmail.com>
> > wrote:
> > >> +1
> >
> > This was submitted in August 2008:
> >
> > https://issues.apache.org/activemq/browse/AMQ-1894
> >
> > Bruce
> > --
> > perl -e 'print
> > unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
> > );'
> >
> > ActiveMQ in Action: http://bit.ly/2je6cQ
> > Blog: http://bruceblog.org/
> > Twitter: http://twitter.com/brucesnyder
> >


Re: Why UseDedicatedTaskRunner is true by default?

Posted by Dejan Bosanac <de...@nighttale.net>.
Maybe we can provide a couple configuration files with different setups,
such as:

activemq-performance.xml
activemq-scaling.xml
activemq-deep.xml
activemq-network.xml
activemq-full.xml

it would give users good starting points to tune ActiveMQ to their needs.

Cheers
--
Dejan Bosanac

Open Source Integration - http://fusesource.com/
ActiveMQ in Action - http://www.manning.com/snyder/
Blog - http://www.nighttale.net


On Thu, May 28, 2009 at 4:35 AM, Bruce Snyder <br...@gmail.com>wrote:

> On Wed, May 27, 2009 at 8:22 PM, Aaron Mulder
> <am...@alumni.princeton.edu> wrote:
> > +1 for both
> >
> > Thanks,
> >       Aaron
> >
> > On Wed, May 27, 2009 at 10:00 PM, Hiram Chirino <ch...@gmail.com>
> wrote:
> >> +1
>
> This was submitted in August 2008:
>
> https://issues.apache.org/activemq/browse/AMQ-1894
>
> Bruce
> --
> perl -e 'print
> unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
> );'
>
> ActiveMQ in Action: http://bit.ly/2je6cQ
> Blog: http://bruceblog.org/
> Twitter: http://twitter.com/brucesnyder
>

Re: Why UseDedicatedTaskRunner is true by default?

Posted by Bruce Snyder <br...@gmail.com>.
On Wed, May 27, 2009 at 8:22 PM, Aaron Mulder
<am...@alumni.princeton.edu> wrote:
> +1 for both
>
> Thanks,
>       Aaron
>
> On Wed, May 27, 2009 at 10:00 PM, Hiram Chirino <ch...@gmail.com> wrote:
>> +1

This was submitted in August 2008:

https://issues.apache.org/activemq/browse/AMQ-1894

Bruce
-- 
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

ActiveMQ in Action: http://bit.ly/2je6cQ
Blog: http://bruceblog.org/
Twitter: http://twitter.com/brucesnyder

Re: Why UseDedicatedTaskRunner is true by default?

Posted by Aaron Mulder <am...@alumni.princeton.edu>.
+1 for both

Thanks,
       Aaron

On Wed, May 27, 2009 at 10:00 PM, Hiram Chirino <ch...@gmail.com> wrote:
> +1
>
> On Wed, May 27, 2009 at 7:54 AM, Gary Tully <ga...@gmail.com> wrote:
>> +1 to simplifying/minimising the default config.
>>
>> 2009/5/27 Aleksi Kallio <al...@csc.fi>
>>
>>>
>>> Hi,
>>>
>>> Thanks for your replies! I would also support making the default
>>> configuration production ready and simple. In my opinion, it is better to
>>> have the examples in Wiki or similar, instead of the default configuration.
>>>
>>> -Aleksi
>>>
>>>
>>> rajdavies wrote:
>>> >
>>> > Hi Aleksi,
>>> >
>>> > creating lots of temporary topics is definately ok.
>>> > +1 to change useDedicatedTaskRunner back to false
>>> >
>>> > cheers,
>>> >
>>> > Rob
>>> >
>>> > Rob Davies
>>> > http://fusesource.com
>>> > http://rajdavies.blogspot.com/
>>> >
>>> > On 26 May 2009, at 14:38, Aleksi Kallio wrote:
>>> >
>>> >>
>>> >> Hi,
>>> >>
>>> >>
>>> >> Aleksi Kallio wrote:
>>> >>>
>>> >>> Because of the excessive thread creation, using dedicated
>>> >>> TaskRunners was
>>> >>> also slower. If they are preferred, shouldn't temporary topics (and
>>> >>> queues) be handled in a more lighweight manner?
>>> >>>
>>> >>
>>> >> My question did not arouse much interest, so I'll have a second go: Is
>>> >> creating a lot of temporary topics (resulting in a lots of threads
>>> >> at the
>>> >> broker) against the general design philosophy of JMS or ActiveMQ? In
>>> >> other
>>> >> words, are we doing something stupid or is it just that the default
>>> >> value of
>>> >> UseDedicatedTaskRunner is a bit counterintuitive?
>>> >>
>>> >> Cheers,
>>> >> Aleksi
>>> >>
>>> >> --
>>> >> View this message in context:
>>> >>
>>> http://www.nabble.com/Why-UseDedicatedTaskRunner-is-true-by-default--tp23631976p23723071.html
>>> >> Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
>>> >>
>>> >
>>> >
>>> >
>>> >
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Why-UseDedicatedTaskRunner-is-true-by-default--tp23631976p23738535.html
>>> Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>> --
>> http://blog.garytully.com
>>
>> Open Source SOA
>> http://FUSESource.com
>>
>
>
>
> --
> Regards,
> Hiram
>
> Blog: http://hiramchirino.com
>
> Open Source SOA
> http://fusesource.com/
>
>

Re: Why UseDedicatedTaskRunner is true by default?

Posted by Hiram Chirino <ch...@gmail.com>.
+1

On Wed, May 27, 2009 at 7:54 AM, Gary Tully <ga...@gmail.com> wrote:
> +1 to simplifying/minimising the default config.
>
> 2009/5/27 Aleksi Kallio <al...@csc.fi>
>
>>
>> Hi,
>>
>> Thanks for your replies! I would also support making the default
>> configuration production ready and simple. In my opinion, it is better to
>> have the examples in Wiki or similar, instead of the default configuration.
>>
>> -Aleksi
>>
>>
>> rajdavies wrote:
>> >
>> > Hi Aleksi,
>> >
>> > creating lots of temporary topics is definately ok.
>> > +1 to change useDedicatedTaskRunner back to false
>> >
>> > cheers,
>> >
>> > Rob
>> >
>> > Rob Davies
>> > http://fusesource.com
>> > http://rajdavies.blogspot.com/
>> >
>> > On 26 May 2009, at 14:38, Aleksi Kallio wrote:
>> >
>> >>
>> >> Hi,
>> >>
>> >>
>> >> Aleksi Kallio wrote:
>> >>>
>> >>> Because of the excessive thread creation, using dedicated
>> >>> TaskRunners was
>> >>> also slower. If they are preferred, shouldn't temporary topics (and
>> >>> queues) be handled in a more lighweight manner?
>> >>>
>> >>
>> >> My question did not arouse much interest, so I'll have a second go: Is
>> >> creating a lot of temporary topics (resulting in a lots of threads
>> >> at the
>> >> broker) against the general design philosophy of JMS or ActiveMQ? In
>> >> other
>> >> words, are we doing something stupid or is it just that the default
>> >> value of
>> >> UseDedicatedTaskRunner is a bit counterintuitive?
>> >>
>> >> Cheers,
>> >> Aleksi
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/Why-UseDedicatedTaskRunner-is-true-by-default--tp23631976p23723071.html
>> >> Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
>> >>
>> >
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Why-UseDedicatedTaskRunner-is-true-by-default--tp23631976p23738535.html
>> Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
>>
>>
>
>
> --
> http://blog.garytully.com
>
> Open Source SOA
> http://FUSESource.com
>



-- 
Regards,
Hiram

Blog: http://hiramchirino.com

Open Source SOA
http://fusesource.com/

Re: Why UseDedicatedTaskRunner is true by default?

Posted by Gary Tully <ga...@gmail.com>.
+1 to simplifying/minimising the default config.

2009/5/27 Aleksi Kallio <al...@csc.fi>

>
> Hi,
>
> Thanks for your replies! I would also support making the default
> configuration production ready and simple. In my opinion, it is better to
> have the examples in Wiki or similar, instead of the default configuration.
>
> -Aleksi
>
>
> rajdavies wrote:
> >
> > Hi Aleksi,
> >
> > creating lots of temporary topics is definately ok.
> > +1 to change useDedicatedTaskRunner back to false
> >
> > cheers,
> >
> > Rob
> >
> > Rob Davies
> > http://fusesource.com
> > http://rajdavies.blogspot.com/
> >
> > On 26 May 2009, at 14:38, Aleksi Kallio wrote:
> >
> >>
> >> Hi,
> >>
> >>
> >> Aleksi Kallio wrote:
> >>>
> >>> Because of the excessive thread creation, using dedicated
> >>> TaskRunners was
> >>> also slower. If they are preferred, shouldn't temporary topics (and
> >>> queues) be handled in a more lighweight manner?
> >>>
> >>
> >> My question did not arouse much interest, so I'll have a second go: Is
> >> creating a lot of temporary topics (resulting in a lots of threads
> >> at the
> >> broker) against the general design philosophy of JMS or ActiveMQ? In
> >> other
> >> words, are we doing something stupid or is it just that the default
> >> value of
> >> UseDedicatedTaskRunner is a bit counterintuitive?
> >>
> >> Cheers,
> >> Aleksi
> >>
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/Why-UseDedicatedTaskRunner-is-true-by-default--tp23631976p23723071.html
> >> Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
> >>
> >
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Why-UseDedicatedTaskRunner-is-true-by-default--tp23631976p23738535.html
> Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
>
>


-- 
http://blog.garytully.com

Open Source SOA
http://FUSESource.com

Re: Why UseDedicatedTaskRunner is true by default?

Posted by Aleksi Kallio <al...@csc.fi>.
Hi,

Thanks for your replies! I would also support making the default
configuration production ready and simple. In my opinion, it is better to
have the examples in Wiki or similar, instead of the default configuration.

-Aleksi


rajdavies wrote:
> 
> Hi Aleksi,
> 
> creating lots of temporary topics is definately ok.
> +1 to change useDedicatedTaskRunner back to false
> 
> cheers,
> 
> Rob
> 
> Rob Davies
> http://fusesource.com
> http://rajdavies.blogspot.com/
> 
> On 26 May 2009, at 14:38, Aleksi Kallio wrote:
> 
>>
>> Hi,
>>
>>
>> Aleksi Kallio wrote:
>>>
>>> Because of the excessive thread creation, using dedicated  
>>> TaskRunners was
>>> also slower. If they are preferred, shouldn't temporary topics (and
>>> queues) be handled in a more lighweight manner?
>>>
>>
>> My question did not arouse much interest, so I'll have a second go: Is
>> creating a lot of temporary topics (resulting in a lots of threads  
>> at the
>> broker) against the general design philosophy of JMS or ActiveMQ? In  
>> other
>> words, are we doing something stupid or is it just that the default  
>> value of
>> UseDedicatedTaskRunner is a bit counterintuitive?
>>
>> Cheers,
>> Aleksi
>>
>> -- 
>> View this message in context:
>> http://www.nabble.com/Why-UseDedicatedTaskRunner-is-true-by-default--tp23631976p23723071.html
>> Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
>>
> 
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Why-UseDedicatedTaskRunner-is-true-by-default--tp23631976p23738535.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.


Re: Why UseDedicatedTaskRunner is true by default?

Posted by Rob Davies <ra...@gmail.com>.
Hi Aleksi,

creating lots of temporary topics is definately ok.
+1 to change useDedicatedTaskRunner back to false

cheers,

Rob

Rob Davies
http://fusesource.com
http://rajdavies.blogspot.com/

On 26 May 2009, at 14:38, Aleksi Kallio wrote:

>
> Hi,
>
>
> Aleksi Kallio wrote:
>>
>> Because of the excessive thread creation, using dedicated  
>> TaskRunners was
>> also slower. If they are preferred, shouldn't temporary topics (and
>> queues) be handled in a more lighweight manner?
>>
>
> My question did not arouse much interest, so I'll have a second go: Is
> creating a lot of temporary topics (resulting in a lots of threads  
> at the
> broker) against the general design philosophy of JMS or ActiveMQ? In  
> other
> words, are we doing something stupid or is it just that the default  
> value of
> UseDedicatedTaskRunner is a bit counterintuitive?
>
> Cheers,
> Aleksi
>
> -- 
> View this message in context: http://www.nabble.com/Why-UseDedicatedTaskRunner-is-true-by-default--tp23631976p23723071.html
> Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
>



Re: Why UseDedicatedTaskRunner is true by default?

Posted by Bruce Snyder <br...@gmail.com>.
On Tue, May 26, 2009 at 7:38 AM, Aleksi Kallio <al...@csc.fi> wrote:
>
> Hi,
>
>
> Aleksi Kallio wrote:
>>
>> Because of the excessive thread creation, using dedicated TaskRunners was
>> also slower. If they are preferred, shouldn't temporary topics (and
>> queues) be handled in a more lighweight manner?
>>
>
> My question did not arouse much interest, so I'll have a second go: Is
> creating a lot of temporary topics (resulting in a lots of threads at the
> broker) against the general design philosophy of JMS or ActiveMQ? In other
> words, are we doing something stupid or is it just that the default value of
> UseDedicatedTaskRunner is a bit counterintuitive?

Most times that I've helped someone to scale ActiveMQ, I've
recommended that the UseDedicatedTaskRunner property be set to false
in the startup script. The reason for this is that it will reduce the
number of threads that are created by the broker and therefore use
less memory. IMO, this option should probably be set to false, but I
also believe in making the default configuration more production ready
rather than full of examples.

Bruce
-- 
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

ActiveMQ in Action: http://bit.ly/2je6cQ
Blog: http://bruceblog.org/
Twitter: http://twitter.com/brucesnyder

Re: Why UseDedicatedTaskRunner is true by default?

Posted by Aleksi Kallio <al...@csc.fi>.
Hi,


Aleksi Kallio wrote:
> 
> Because of the excessive thread creation, using dedicated TaskRunners was
> also slower. If they are preferred, shouldn't temporary topics (and
> queues) be handled in a more lighweight manner?
> 

My question did not arouse much interest, so I'll have a second go: Is
creating a lot of temporary topics (resulting in a lots of threads at the
broker) against the general design philosophy of JMS or ActiveMQ? In other
words, are we doing something stupid or is it just that the default value of
UseDedicatedTaskRunner is a bit counterintuitive?

Cheers,
Aleksi

-- 
View this message in context: http://www.nabble.com/Why-UseDedicatedTaskRunner-is-true-by-default--tp23631976p23723071.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.