You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by Fabian Lange <fa...@codecentric.de> on 2016/10/03 19:21:14 UTC

Re-Using an ExecutorService for Felix Resolver calls

Hi,
what do you guys think about:
https://github.com/apache/karaf/pull/246

As noticed by me, and already reported here:
https://issues.apache.org/jira/browse/FELIX-5247

The current default behaviour is that every "resolve()" call will create a
new Executor Pool with number of CPU Cores as size. This is not very
efficient.
In my opinion this is unexpected behaviour by Felix, but fortunately we can
use other constructors.

I left in my PR the default behaviour, but added a new one, which can
re-use a bounded or unbounded ThreadPoolExecutor. I did not use a
FixedThreadPool because i wanted to mimic the current behaviour, which is:
After the resolve call, these Threads are gone again.

What do you guys think? Should we change the current "implicit default" to
re-use a Thread Pool?
Is a ThreadPoolExecutor with timeout fine to mimic the current behaviour,
or would we want to change this, lets say to have a dedicated thread pool
always available for Felix Resolve calls? (This would then be like
Executors.newFixedThreadPool())

I am trying to get this change into karaf 4.0.8.

Fabian


--
Fabian Lange | Performance Expert
mobil: +49 (0) 160.3673393

codecentric AG | Merscheider Straße 1 | 42699 Solingen | Deutschland

Sitz der Gesellschaft: Solingen | HRB 25917| Amtsgericht Wuppertal
Vorstand: Michael Hochgürtel . Mirko Novakovic . Rainer Vehns
Aufsichtsrat: Patric Fedlmeier (Vorsitzender) . Klaus Jäger . Jürgen Schütz

Re: Re-Using an ExecutorService for Felix Resolver calls

Posted by Fabian Lange <fa...@codecentric.de>.
Thanks, Karl!
That happens when both just show as dev in my mail client. 
Was indeed intended for karaf-dev. 
Fabian

> On 3 Oct 2016, at 23:14, Karl Pauls <ka...@gmail.com> wrote:
> 
> I guess I'm not sure if this message is intended for dev@felix or dev@karaf?
> 
> regards,
> 
> Karl
> 
> On Mon, Oct 3, 2016 at 9:21 PM, Fabian Lange <fa...@codecentric.de>
> wrote:
> 
>> Hi,
>> what do you guys think about:
>> https://github.com/apache/karaf/pull/246
>> 
>> As noticed by me, and already reported here:
>> https://issues.apache.org/jira/browse/FELIX-5247
>> 
>> The current default behaviour is that every "resolve()" call will create a
>> new Executor Pool with number of CPU Cores as size. This is not very
>> efficient.
>> In my opinion this is unexpected behaviour by Felix, but fortunately we can
>> use other constructors.
>> 
>> I left in my PR the default behaviour, but added a new one, which can
>> re-use a bounded or unbounded ThreadPoolExecutor. I did not use a
>> FixedThreadPool because i wanted to mimic the current behaviour, which is:
>> After the resolve call, these Threads are gone again.
>> 
>> What do you guys think? Should we change the current "implicit default" to
>> re-use a Thread Pool?
>> Is a ThreadPoolExecutor with timeout fine to mimic the current behaviour,
>> or would we want to change this, lets say to have a dedicated thread pool
>> always available for Felix Resolve calls? (This would then be like
>> Executors.newFixedThreadPool())
>> 
>> I am trying to get this change into karaf 4.0.8.
>> 
>> Fabian
>> 
>> 
>> --
>> Fabian Lange | Performance Expert
>> mobil: +49 (0) 160.3673393
>> 
>> codecentric AG | Merscheider Straße 1 | 42699 Solingen | Deutschland
>> 
>> Sitz der Gesellschaft: Solingen | HRB 25917| Amtsgericht Wuppertal
>> Vorstand: Michael Hochgürtel . Mirko Novakovic . Rainer Vehns
>> Aufsichtsrat: Patric Fedlmeier (Vorsitzender) . Klaus Jäger . Jürgen Schütz
>> 
> 
> 
> 
> -- 
> Karl Pauls
> karlpauls@gmail.com

Re: Re-Using an ExecutorService for Felix Resolver calls

Posted by Karl Pauls <ka...@gmail.com>.
I guess I'm not sure if this message is intended for dev@felix or dev@karaf?

regards,

Karl

On Mon, Oct 3, 2016 at 9:21 PM, Fabian Lange <fa...@codecentric.de>
wrote:

> Hi,
> what do you guys think about:
> https://github.com/apache/karaf/pull/246
>
> As noticed by me, and already reported here:
> https://issues.apache.org/jira/browse/FELIX-5247
>
> The current default behaviour is that every "resolve()" call will create a
> new Executor Pool with number of CPU Cores as size. This is not very
> efficient.
> In my opinion this is unexpected behaviour by Felix, but fortunately we can
> use other constructors.
>
> I left in my PR the default behaviour, but added a new one, which can
> re-use a bounded or unbounded ThreadPoolExecutor. I did not use a
> FixedThreadPool because i wanted to mimic the current behaviour, which is:
> After the resolve call, these Threads are gone again.
>
> What do you guys think? Should we change the current "implicit default" to
> re-use a Thread Pool?
> Is a ThreadPoolExecutor with timeout fine to mimic the current behaviour,
> or would we want to change this, lets say to have a dedicated thread pool
> always available for Felix Resolve calls? (This would then be like
> Executors.newFixedThreadPool())
>
> I am trying to get this change into karaf 4.0.8.
>
> Fabian
>
>
> --
> Fabian Lange | Performance Expert
> mobil: +49 (0) 160.3673393
>
> codecentric AG | Merscheider Straße 1 | 42699 Solingen | Deutschland
>
> Sitz der Gesellschaft: Solingen | HRB 25917| Amtsgericht Wuppertal
> Vorstand: Michael Hochgürtel . Mirko Novakovic . Rainer Vehns
> Aufsichtsrat: Patric Fedlmeier (Vorsitzender) . Klaus Jäger . Jürgen Schütz
>



-- 
Karl Pauls
karlpauls@gmail.com