baidu / sofa-pbrpc

A light-weight RPC implement of google protobuf RPC framework.
Other
2.13k stars 655 forks source link

Too many threads in sofa ,how use epoll to overlap large number of socket events #231

Open Cooliodtryl opened 6 years ago

Cooliodtryl commented 6 years ago

Too many threads in sofa ,how use epoll to overlap large number of socket events?thank you

Cooliodtryl commented 6 years ago

In my programe,I found 2794 threads in running, the load balance is too high,this bug is because of too many threads in sofa network,eg,in rpcclientImpl.h/cc,I can find 2 maintain_thread_group which use 2 threads,callback_thread_group which use 4 threads by default,and work_thread_group which use 4 threads by default,but my system is a distributed system,one programe needs to keep communications with many other programe,so when i want to keep 40,the leaset threads in one programe can reach upto 240,acutulay, I can find 2794 threads in my programe,why?can I use IO overlap techniques to solve this probrom?thank you

Ye-Tian-Zero commented 5 years ago

..Don't understand your problem, sofa-pbrpc has a limited thread count.