+1

Thanks
Yubiao

On Thu, Dec 22, 2022 at 9:04 AM PengHui Li <peng...@apache.org> wrote:

> > I notice that if changing the default value of conf `ioThreads` of pulsar
> > client, it does not just affect the num of io threads, and it also
> affects
> > these thread pools:
> > - internal executor of the client
> > - scheduled executor of the client
> > - HTTP client io thread pool of pulsar admin client
>
> I think it's ok. Users can change the IO threads, it will also change the
> above thread pools.
> It could be different issues. We can support changing the scheduled
> executor threads
> and
> HTTP client IO threads independently once we need it.
>
> From the performance test experience before. I don't see any obvious
> negative impact from
> the scheduled executor and HTTP client IO threads after changing the IO
> threads configuration.
> One salient point is if you don't change the IO threads, you will not be
> able to get an expected
> message producing and consuming throughput.
>
> Thanks,
> Penghui
>
> On Thu, Dec 22, 2022 at 12:35 AM Yubiao Feng
> <yubiao.f...@streamnative.io.invalid> wrote:
>
> > Hi PengHui
> >
> > I notice that if changing the default value of conf `ioThreads` of pulsar
> > client, it does not just affect the num of io threads, and it also
> affects
> > these thread pools:
> > - internal executor of the client
> > - scheduled executor of the client
> > - HTTP client io thread pool of pulsar admin client
> >
> > see: https://github.com/apache/pulsar/pull/19020
> >
> >  Should we provide other APIs to configure these three thread pools?
> >
> > Thanks
> > Yubiao
> >
> > On Tue, Dec 20, 2022 at 11:17 AM PengHui Li <peng...@apache.org> wrote:
> >
> > > Hi all,
> > >
> > > I noticed the Java Client (I haven't checked other clients) uses 1 IO
> > > thread and 1 listener
> > > thread by default. It will require users to update the thread
> > configuration
> > > if they have
> > > multiple cores and desired high throughput.
> > >
> > > Here is the example that we change to 16 IO threads in
> > > openmessaging benchmark
> > >
> > >
> >
> https://github.com/openmessaging/benchmark/blob/master/driver-pulsar/pulsar.yaml#L22
> > >
> > > We can apply the configuration of the threads based on the CPU cores.
> So
> > > that for the
> > > most common cases, users don't need to touch the thread configuration.
> > >
> > > ```
> > > private int numIoThreads = Runtime.getRuntime().availableProcessors();
> > > private int numListenerThreads =
> > > Runtime.getRuntime().availableProcessors();
> > > ```
> > >
> > > WDYT?
> > >
> > > Thanks,
> > > Penghui
> > >
> >
>

Reply via email to