Re: [DISCUSS] Change the default IO threads and listener threads of Java Client

2022-12-27 Thread PengHui Li
I have created a proposal for sharing the thread pool across client instances. Here is the PIP discussion thread https://lists.apache.org/thread/5jw06hqlmwnrgvbn9lfom1vkwhwqwwd4 Thanks for all your suggestions -- Penghui On Mon, Dec 26, 2022 at 9:39 PM PengHui Li wrote: > > I think that we ca

Re: [DISCUSS] Change the default IO threads and listener threads of Java Client

2022-12-26 Thread PengHui Li
> I think that we can change this default but we should provide an official API to share the threadpools between the clients. That sounds good to me. Since it will introduce a new API to the client side. I will create a new proposal for the API changes. Thanks, Penghui On Mon, Dec 26, 2022 at 8:

Re: [DISCUSS] Change the default IO threads and listener threads of Java Client

2022-12-26 Thread Enrico Olivelli
I am sorry, I am late on this train. Unfortunately if you have to connect using different authentication parameters you need to open many PulsarClients. I think that we can change this default but we should provide an official API to share the threadpools between the clients. There is no need to

Re: [DISCUSS] Change the default IO threads and listener threads of Java Client

2022-12-26 Thread Ran Gao
It seems this change will not affect the consumer, because the default executor is a single-thread executor service, increasing the listener threads number will allocate different single-thread executor services to different consumers. On 2022/12/21 09:01:39 Yunze Xu wrote: > I have a concern ab

Re: [DISCUSS] Change the default IO threads and listener threads of Java Client

2022-12-22 Thread Lari Hotari
> My concern is whether this change will affect some users who are creating > many clients. This is a good point. There's an internal API to share the thread pools across clients. There's a code example in the Pulsar code base, https://github.com/apache/pulsar/blob/f029757ecb9653a97710f2bac563

Re: [DISCUSS] Change the default IO threads and listener threads of Java Client

2022-12-22 Thread Yubiao Feng
+1 Thanks Yubiao On Thu, Dec 22, 2022 at 9:04 AM PengHui Li 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 > > - s

Re: [DISCUSS] Change the default IO threads and listener threads of Java Client

2022-12-21 Thread PengHui Li
> 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 clie

Re: [DISCUSS] Change the default IO threads and listener threads of Java Client

2022-12-21 Thread Yubiao Feng
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 clie

Re: [DISCUSS] Change the default IO threads and listener threads of Java Client

2022-12-21 Thread Yunze Xu
I have a concern about the message ordering. If we have more than 1 listener thread by default, could messages from the same topic be passed to different listener threads? Thanks, Yunze On Wed, Dec 21, 2022 at 11:12 AM 丛搏 wrote: > > +1 > Our default configuration is best for most users. Multiple

Re: [DISCUSS] Change the default IO threads and listener threads of Java Client

2022-12-20 Thread 丛搏
+1 Our default configuration is best for most users. Multiple clients are a few cases. Thanks, Bo houxiaoyu 于2022年12月20日周二 16:02写道: > > +1 > > This change might bring thread number increment in case users create many > clients, but too many pulsar clients run in one machine is not a good use > c

Re: [DISCUSS] Change the default IO threads and listener threads of Java Client

2022-12-20 Thread houxiaoyu
+1 This change might bring thread number increment in case users create many clients, but too many pulsar clients run in one machine is not a good use case I think, so this change looks good to me. Thanks, Xiaoyu Hou 于2022年12月20日周二 12:25写道: > +1 > > My concern is whether this change will affe

Re: [DISCUSS] Change the default IO threads and listener threads of Java Client

2022-12-19 Thread mattisonchao
+1 My concern is whether this change will affect some users who are creating many clients. I think we can wait for other users to confirm it. (If this will be affected, maybe we can give it a max_io_thread_num and then expand the size from 1 to max_io_thread_num when adding a new consumer or pr

[DISCUSS] Change the default IO threads and listener threads of Java Client

2022-12-19 Thread PengHui Li
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 openmessa