Re: Stratos creating thread pools per application?

2016-01-08 Thread Imesh Gunaratne
It's good to see the summary of the thread pools Isuru. Will add this to the Wiki. Thanks On Fri, Jan 8, 2016 at 11:14 AM, Thanuja Uruththirakodeeswaran < thanu...@wso2.com> wrote: > > > On Fri, Jan 8, 2016 at 11:12 AM, Isuru Haththotuwa > wrote: > >> This is a short summary on Thread Pools use

Re: Stratos creating thread pools per application?

2016-01-07 Thread Thanuja Uruththirakodeeswaran
On Fri, Jan 8, 2016 at 11:12 AM, Isuru Haththotuwa wrote: > This is a short summary on Thread Pools used by Stratos atm: > > IdClassUsageConfigurable?Default Sizemonitor.thread.poolApplicationMonitor > ClusterMonitor > GroupMonitormonitoring tasks (Cluster, Application and Group) > Yes100autoscal

Re: Stratos creating thread pools per application?

2016-01-07 Thread Isuru Haththotuwa
This is a short summary on Thread Pools used by Stratos atm: IdClassUsageConfigurable?Default Sizemonitor.thread.poolApplicationMonitor ClusterMonitor GroupMonitormonitoring tasks (Cluster, Application and Group) Yes100autoscaler.thread.poolAutoscalerServiceComponentany general autoscaler controll

Re: Stratos creating thread pools per application?

2016-01-05 Thread Imesh Gunaratne
Great work Isuru! It might be better to document the list of thread pools, their usage and how to tune them. Thanks On Tuesday, January 5, 2016, Isuru Haththotuwa wrote: > The following are the list of improvements done: > >- make the threads pools dynamic by allowing to grow/shrink when >

Re: Stratos creating thread pools per application?

2016-01-05 Thread Isuru Haththotuwa
The following are the list of improvements done: - make the threads pools dynamic by allowing to grow/shrink when required - determining the min threads that a thread pool should have based on a ratio (configurable) between max and min number of threads - using a custom thread factory

Re: Stratos creating thread pools per application?

2015-12-03 Thread Imesh Gunaratne
On Thu, Dec 3, 2015 at 10:20 AM, Isuru Haththotuwa wrote: > > This is in addition to the scheduled executor services we are using. Shall > we optimize the StratosThreadPool implementation to dynamically shrink and > grow when required? We are currently using fixed thread pools. > +1 > > > > On Su

Re: Stratos creating thread pools per application?

2015-12-02 Thread Isuru Haththotuwa
Created [1] to track the improvements, will do the changes for the new release. [1]. https://issues.apache.org/jira/browse/STRATOS-1639 On Thu, Dec 3, 2015 at 12:38 PM, Reka Thirunavukkarasu wrote: > Hi Akila, > > On Thu, Dec 3, 2015 at 11:11 AM, Akila Ravihansa Perera < > raviha...@wso2.com> w

Re: Stratos creating thread pools per application?

2015-12-02 Thread Reka Thirunavukkarasu
Hi Akila, On Thu, Dec 3, 2015 at 11:11 AM, Akila Ravihansa Perera wrote: > Hi Isuru, > > Big +1 for this effort. Shall we create a JIRA to track this and get it > fixed in next release? > > I've noticed few other issues related to Stratos threading behavior. > > - New threads are created in cer

Re: Stratos creating thread pools per application?

2015-12-02 Thread Akila Ravihansa Perera
Hi Isuru, Big +1 for this effort. Shall we create a JIRA to track this and get it fixed in next release? I've noticed few other issues related to Stratos threading behavior. - New threads are created in certain places [1] which should be avoided as much as possible. @Reka: Any idea on why we c

Re: Stratos creating thread pools per application?

2015-12-02 Thread Isuru Haththotuwa
Hi Devs, Currently what we have is a static set of thread pools: 1. monitor thread pool 2. autoscaler thread pool 3. cartridge agent event listener thread pool 4. cloud controller context thread pool 5. cloud controller thread pool 6. cloud controller instance manager thread poo

Re: Stratos creating thread pools per application?

2015-11-21 Thread Imesh Gunaratne
Hi Akila, On Sat, Nov 21, 2015 at 1:20 PM, Akila Ravihansa Perera wrote: > > Any idea why thread pools are created per monitor object? Is it not > possible to share a common thread pool as per the current design? > No, we do not create a thread pool per monitor object, have a look at the code c

Re: Stratos creating thread pools per application?

2015-11-21 Thread Isuru Haththotuwa
Hi, +1 for a common Thread pool. On Sat, Nov 21, 2015 at 8:08 PM, Reka Thirunavukkarasu wrote: > Hi Akila, > > Yah..I think that we can share a common thread pool per monitor. AFAIK, > there was no specific reason to maintain thread pool per monitor object. > > @Gayan, Do you aware of any parti

Re: Stratos creating thread pools per application?

2015-11-21 Thread Gayan Gunarathne
IMO it is ok to have separate thread pools for each monitors.With the separate thread pool for each monitor makes sure that those tasks get run regardless of how busy the rest of the monitors are.I don't think we can get any advantage by having common thread pool for this. But we need to introduce

Re: Stratos creating thread pools per application?

2015-11-21 Thread Reka Thirunavukkarasu
Hi Akila, Yah..I think that we can share a common thread pool per monitor. AFAIK, there was no specific reason to maintain thread pool per monitor object. @Gayan, Do you aware of any particular reason why we did like that? All the monitors need one thread allocated for periodic execution. Other

Stratos creating thread pools per application?

2015-11-20 Thread Akila Ravihansa Perera
Hi, I noticed that ExecutorService objects are created in the constructors of ClusterMonitor, ApplicationMonitor, GroupMonitor, ParentComponentMonitor classes. These thread pools' size is 100 [1, 2, 3, 4]. Any idea why thread pools are created per monitor object? Is it not possible to share a com