You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stratos.apache.org by Reka Thirunavukkarasu <re...@wso2.com> on 2015/06/23 08:50:13 UTC

Merging all the threading pools used in autoscaler to one thread pool

Hi

While testing found out that we are using different pool for different
purposes like application monitor, group monitor, cluster monitor and etc.
Is it possible to use one thread pool per component such as autoscaler with
higher pool size like 100. Then we can make sure that there will always be
threads available to do the job whenever needed. WDYT?

Would you find any issues with merging all the different pools in
autoscaler to just with one thread pool?


Thanks,
Reka

-- 
Reka Thirunavukkarasu
Senior Software Engineer,
WSO2, Inc.:http://wso2.com,
Mobile: +94776442007

Re: Merging all the threading pools used in autoscaler to one thread pool

Posted by Reka Thirunavukkarasu <re...@wso2.com>.
Hi Imesh,

On Tue, Jun 23, 2015 at 2:01 PM, Imesh Gunaratne <im...@apache.org> wrote:

> Hi Reka,
>
> I do not think it should be one thread pool. May be few high-level ones
> for different features:
>
> 1. Application Monitors
> 2. Message Listeners
> 3. Any other functionality using threads
>

+1 to have functional wise as we can calculate the pool size also based on
the kind of application structure that is getting used.

>
> Thanks
>
> On Tue, Jun 23, 2015 at 1:42 PM, Reka Thirunavukkarasu <re...@wso2.com>
> wrote:
>
>> Hi Isuru,
>>
>> On Tue, Jun 23, 2015 at 1:00 PM, Isuru Haththotuwa <is...@apache.org>
>> wrote:
>>
>>> Hi Reka,
>>>
>>>
>>> On Tue, Jun 23, 2015 at 12:20 PM, Reka Thirunavukkarasu <re...@wso2.com>
>>> wrote:
>>>
>>>> Hi
>>>>
>>>> While testing found out that we are using different pool for different
>>>> purposes like application monitor, group monitor, cluster monitor and etc.
>>>> Is it possible to use one thread pool per component such as autoscaler with
>>>> higher pool size like 100. Then we can make sure that there will always be
>>>> threads available to do the job whenever needed. WDYT?
>>>>
>>> +1 for the suggestion. Additionally, lets give the threads meaningful
>>> names using a custom Thread Factory [1] so that we can determine what
>>> threads are causing issues when debugging a threading related issue.
>>>
>>
>> +1. It is a good suggestion. Will try to incorporate it as well.
>>
>>>
>>> [1].
>>> http://docs.oracle.com/javase/1.5.0/docs/api/java/util/concurrent/ThreadFactory.html
>>>
>>>>
>>>> Would you find any issues with merging all the different pools in
>>>> autoscaler to just with one thread pool?
>>>>
>>>
>>>>
>>>> Thanks,
>>>> Reka
>>>>
>>>> --
>>>> Reka Thirunavukkarasu
>>>> Senior Software Engineer,
>>>> WSO2, Inc.:http://wso2.com,
>>>> Mobile: +94776442007
>>>>
>>>> --
>>>> <%2B94776442007>
>>>> <%2B94776442007>
>>>> Thanks and Regards,
>>>>
>>>> Isuru H.
>>>> <%2B94776442007>
>>>> +94 716 358 048 <%2B94776442007>* <http://wso2.com/>*
>>>>
>>>>
>>>> * <http://wso2.com/>*
>>>>
>>>>
>>>>
>>
>>
>> --
>> Reka Thirunavukkarasu
>> Senior Software Engineer,
>> WSO2, Inc.:http://wso2.com,
>> Mobile: +94776442007
>>
>>
>>
>
>
> --
> Imesh Gunaratne
>
> Senior Technical Lead, WSO2
> Committer & PMC Member, Apache Stratos
>



-- 
Reka Thirunavukkarasu
Senior Software Engineer,
WSO2, Inc.:http://wso2.com,
Mobile: +94776442007

Re: Merging all the threading pools used in autoscaler to one thread pool

Posted by Imesh Gunaratne <im...@apache.org>.
Hi Reka,

I do not think it should be one thread pool. May be few high-level ones for
different features:

1. Application Monitors
2. Message Listeners
3. Any other functionality using threads

Thanks

On Tue, Jun 23, 2015 at 1:42 PM, Reka Thirunavukkarasu <re...@wso2.com>
wrote:

> Hi Isuru,
>
> On Tue, Jun 23, 2015 at 1:00 PM, Isuru Haththotuwa <is...@apache.org>
> wrote:
>
>> Hi Reka,
>>
>>
>> On Tue, Jun 23, 2015 at 12:20 PM, Reka Thirunavukkarasu <re...@wso2.com>
>> wrote:
>>
>>> Hi
>>>
>>> While testing found out that we are using different pool for different
>>> purposes like application monitor, group monitor, cluster monitor and etc.
>>> Is it possible to use one thread pool per component such as autoscaler with
>>> higher pool size like 100. Then we can make sure that there will always be
>>> threads available to do the job whenever needed. WDYT?
>>>
>> +1 for the suggestion. Additionally, lets give the threads meaningful
>> names using a custom Thread Factory [1] so that we can determine what
>> threads are causing issues when debugging a threading related issue.
>>
>
> +1. It is a good suggestion. Will try to incorporate it as well.
>
>>
>> [1].
>> http://docs.oracle.com/javase/1.5.0/docs/api/java/util/concurrent/ThreadFactory.html
>>
>>>
>>> Would you find any issues with merging all the different pools in
>>> autoscaler to just with one thread pool?
>>>
>>
>>>
>>> Thanks,
>>> Reka
>>>
>>> --
>>> Reka Thirunavukkarasu
>>> Senior Software Engineer,
>>> WSO2, Inc.:http://wso2.com,
>>> Mobile: +94776442007
>>>
>>> --
>>> <%2B94776442007>
>>> <%2B94776442007>
>>> Thanks and Regards,
>>>
>>> Isuru H.
>>> <%2B94776442007>
>>> +94 716 358 048 <%2B94776442007>* <http://wso2.com/>*
>>>
>>>
>>> * <http://wso2.com/>*
>>>
>>>
>>>
>
>
> --
> Reka Thirunavukkarasu
> Senior Software Engineer,
> WSO2, Inc.:http://wso2.com,
> Mobile: +94776442007
>
>
>


-- 
Imesh Gunaratne

Senior Technical Lead, WSO2
Committer & PMC Member, Apache Stratos

Re: Merging all the threading pools used in autoscaler to one thread pool

Posted by Reka Thirunavukkarasu <re...@wso2.com>.
Hi Isuru,

On Tue, Jun 23, 2015 at 1:00 PM, Isuru Haththotuwa <is...@apache.org>
wrote:

> Hi Reka,
>
>
> On Tue, Jun 23, 2015 at 12:20 PM, Reka Thirunavukkarasu <re...@wso2.com>
> wrote:
>
>> Hi
>>
>> While testing found out that we are using different pool for different
>> purposes like application monitor, group monitor, cluster monitor and etc.
>> Is it possible to use one thread pool per component such as autoscaler with
>> higher pool size like 100. Then we can make sure that there will always be
>> threads available to do the job whenever needed. WDYT?
>>
> +1 for the suggestion. Additionally, lets give the threads meaningful
> names using a custom Thread Factory [1] so that we can determine what
> threads are causing issues when debugging a threading related issue.
>

+1. It is a good suggestion. Will try to incorporate it as well.

>
> [1].
> http://docs.oracle.com/javase/1.5.0/docs/api/java/util/concurrent/ThreadFactory.html
>
>>
>> Would you find any issues with merging all the different pools in
>> autoscaler to just with one thread pool?
>>
>
>>
>> Thanks,
>> Reka
>>
>> --
>> Reka Thirunavukkarasu
>> Senior Software Engineer,
>> WSO2, Inc.:http://wso2.com,
>> Mobile: +94776442007
>>
>> --
>> <%2B94776442007>
>> <%2B94776442007>
>> Thanks and Regards,
>>
>> Isuru H.
>> <%2B94776442007>
>> +94 716 358 048 <%2B94776442007>* <http://wso2.com/>*
>>
>>
>> * <http://wso2.com/>*
>>
>>
>>


-- 
Reka Thirunavukkarasu
Senior Software Engineer,
WSO2, Inc.:http://wso2.com,
Mobile: +94776442007

Re: Merging all the threading pools used in autoscaler to one thread pool

Posted by Isuru Haththotuwa <is...@apache.org>.
Hi Reka,



On Tue, Jun 23, 2015 at 12:20 PM, Reka Thirunavukkarasu <re...@wso2.com>
wrote:

> Hi
>
> While testing found out that we are using different pool for different
> purposes like application monitor, group monitor, cluster monitor and etc.
> Is it possible to use one thread pool per component such as autoscaler with
> higher pool size like 100. Then we can make sure that there will always be
> threads available to do the job whenever needed. WDYT?
>
+1 for the suggestion. Additionally, lets give the threads meaningful names
using a custom Thread Factory [1] so that we can determine what threads are
causing issues when debugging a threading related issue.

[1].
http://docs.oracle.com/javase/1.5.0/docs/api/java/util/concurrent/ThreadFactory.html

>
> Would you find any issues with merging all the different pools in
> autoscaler to just with one thread pool?
>

>
> Thanks,
> Reka
>
> --
> Reka Thirunavukkarasu
> Senior Software Engineer,
> WSO2, Inc.:http://wso2.com,
> Mobile: +94776442007
>
> --
> <%2B94776442007>
> <%2B94776442007>
> Thanks and Regards,
>
> Isuru H.
> <%2B94776442007>
> +94 716 358 048 <%2B94776442007>* <http://wso2.com/>*
>
>
> * <http://wso2.com/>*
>
>
>

Re: Merging all the threading pools used in autoscaler to one thread pool

Posted by Reka Thirunavukkarasu <re...@wso2.com>.
Hi

On Tue, Jun 23, 2015 at 12:50 PM, Gayan Gunarathne <ga...@wso2.com> wrote:

> Hi Reka,
>
> On Tue, Jun 23, 2015 at 12:20 PM, Reka Thirunavukkarasu <re...@wso2.com>
> wrote:
>
>> Hi
>>
>> While testing found out that we are using different pool for different
>> purposes like application monitor, group monitor, cluster monitor and etc.
>> Is it possible to use one thread pool per component such as autoscaler with
>> higher pool size like 100. Then we can make sure that there will always be
>> threads available to do the job whenever needed. WDYT?
>>
>
> +1. Good suggestion. It is important to maintain the component vise thread
> pools.I guess we are already doing this with cloud controller.
>

Thanks. This was actually suggested by Imesh when finding out issues with
locks in the undeployment. Thanks Imesh for the good suggestion.

>
>
>> Would you find any issues with merging all the different pools in
>> autoscaler to just with one thread pool?
>>
>
> AFAIR we won't have issues by using the thread pool per component. BTW we
> need pass the component thread pool for each monitors.
>

Then great. Will start doing this..

Thanks,
Reka

>
>
>> Thanks,
>> Reka
>>
>> --
>> Reka Thirunavukkarasu
>> Senior Software Engineer,
>> WSO2, Inc.:http://wso2.com,
>> Mobile: +94776442007
>>
>>
>>  Thanks,
> Gayan
>
>
> --
>
> Gayan Gunarathne
> Technical Lead, WSO2 Inc. (http://wso2.com)
> Committer & PMC Member, Apache Stratos
> email : gayang@wso2.com  | mobile : +94 766819985
>
>
>



-- 
Reka Thirunavukkarasu
Senior Software Engineer,
WSO2, Inc.:http://wso2.com,
Mobile: +94776442007

Re: Merging all the threading pools used in autoscaler to one thread pool

Posted by Gayan Gunarathne <ga...@wso2.com>.
Hi Reka,

On Tue, Jun 23, 2015 at 12:20 PM, Reka Thirunavukkarasu <re...@wso2.com>
wrote:

> Hi
>
> While testing found out that we are using different pool for different
> purposes like application monitor, group monitor, cluster monitor and etc.
> Is it possible to use one thread pool per component such as autoscaler with
> higher pool size like 100. Then we can make sure that there will always be
> threads available to do the job whenever needed. WDYT?
>

+1. Good suggestion. It is important to maintain the component vise thread
pools.I guess we are already doing this with cloud controller.


> Would you find any issues with merging all the different pools in
> autoscaler to just with one thread pool?
>

AFAIR we won't have issues by using the thread pool per component. BTW we
need pass the component thread pool for each monitors.


> Thanks,
> Reka
>
> --
> Reka Thirunavukkarasu
> Senior Software Engineer,
> WSO2, Inc.:http://wso2.com,
> Mobile: +94776442007
>
>
>  Thanks,
Gayan


-- 

Gayan Gunarathne
Technical Lead, WSO2 Inc. (http://wso2.com)
Committer & PMC Member, Apache Stratos
email : gayang@wso2.com  | mobile : +94 766819985