https://github.com/apache/servicecomb-java-chassis/pull/1077

wjm wjm <zzz...@gmail.com> 于2019年1月25日周五 上午9:05写道:

> @yaohai...@huawei.com <yaohai...@huawei.com>
>   think about a business, normally 30 threads are enough, but when
> business is busy, maybe need 300 threads
>   if use fixed thread pool, then after process boot, Whether the business
> is busy or not, must create 300 threads
>   but if use thread pool with core/max/keepAlive configuration, thread
> pool will create thread when business is busy, and destroy thread when
> business is not so busy.
>
> @willem.jiang <willem.ji...@gmail.com>
>   yes, the thread pool is for sync business logic, it's for worker thread
>   but we change from old CPU count thread to tomcat default setting.
>
> Willem Jiang <willem.ji...@gmail.com> 于2019年1月24日周四 下午10:58写道:
>
>> If the thread pool with the cpu core is for the netty boss thread, I
>> think it should be fine.
>> But if the thread pool is for the worker thread, it could be a problem
>> if there are lots of requests need to be processed.
>>
>> Willem Jiang
>>
>> Twitter: willemjiang
>> Weibo: 姜宁willem
>>
>> On Thu, Jan 24, 2019 at 2:48 PM yhs0092 <yhs0...@163.com> wrote:
>> >
>> > I agree that current default value of thread pool size is too small,
>> but I'm not sure about the disadvantages of the current fixed thread pool.
>> > Do you mean if multiple service instances is deployed on the same
>> machine, a fixed thread pool is not so flexible since the instances cannot
>> clean up some idle business thread?
>> >
>> >
>> > Yours sincerely
>> >
>> >
>> > Yao Haishi
>> > yhs0...@163.com
>> >
>> >
>> > On 1/24/2019 10:49,wjm wjm<zzz...@gmail.com> wrote:
>> > or default integrate only one ThreadPoolExecutor?
>> > because most customers TPS is not so high, no need to do this optimize
>> >
>> > wjm wjm <zzz...@gmail.com> 于2019年1月24日周四 上午10:35写道:
>> >
>> > currently we provide a default sync invocation executor:
>> >
>> > - default integrate two fixed thread pool
>> > - thread count for one pool is equals cpu count
>> >
>> > for most customers, thread count of one pool is too small, and fixed
>> > thread pool is not so good, so will change to:
>> >
>> > - default integrate two ThreadPoolExecutor
>> > - support to configure core/max thread count, keepAlive time and max
>> > queue size for one pool
>> > - default core thread: 25, same to tomcat
>> > - default max thread: 100, tomcat is 200, because we have 2 pool, so
>> > change to 100
>> > - default keepAlive: 1 minute, same to tomcat
>> > - default max queue size: Integer.MAX_VALUE, same to tomcat
>> >
>> >
>>
>

Reply via email to