Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Too many DubboClientHandler threads in consumer-消费者中建立了太多DubboClientHandler 线程 #1896

Closed
Jaskey opened this issue Jun 7, 2018 · 1 comment

Comments

@Jaskey
Copy link

Jaskey commented Jun 7, 2018

Dubbo Version: 2.5.3

I have a large provider cluster with more than 30 instances. And I found that in client side, the consumer uses a stand alone thread pools for each instances, so there are 30 thread pool to consume the service, which I can find out from the jstack that I have many diffrent thread groups named like DubboClientHandler-IP1-XXX.

Question1:
I guess the consumer uses stand alone cached thread pool for each provider instances but with the max pool size of "default.actives", am I right?

Question2:
But the problem is that, I hope to maximize the tps , so I provide a very large cluster, but now the consumer will suffer from high cpu consumption due to large thread counts.

Can I change the thread model in consumer side? Like I use a shared thread pool so that I can control the maximum thread size.


我有一个非常大的provider 集群(30个实例)。然后我们发现在客户端,为每一个实例,都准备了一个独立线程池,所以我们看到有30个线程池以去发起消费请求,这个从jstack堆栈上可以证明,因为里面很多线程组的名字是类似DubboClientHandler-IP1-XXX,其中ip都是不一样的。

问题1:

按照我的猜测,每个实例是应该会有一个cached的线程池(可回收),然后其中的最大线程数是default.actives,是否如此?

问题2:

之所以我们提供如此大的服务集群,是因为我们希望最大化TPS,但现在集群是大了,但是消费者又因此导致巨大的线程消耗(高CPU)。我们能否通过配置改变这个线程的模型,例如用一个共享的线程池去处理所有的服务实例,这样最大的线程数便可控了。

@chickenlj
Copy link
Contributor

Duplicate of #2013

@chickenlj chickenlj marked this as a duplicate of #2013 Jul 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants