google translation for yiji's reply:

Dubbo default value will be reused to establish a tcp connection,
nettyServerBootstrapAcceptor will listen, will use one of the childgroup
and this channel to do the binding, other eventloop will only empty
training, the bound channel thread will read and write data, no
understanding where has a problem.

> Finally each consumer is N * n, for each provider it is N * m

I am here to provide suggestions for his problems, let him increase the
connection number verification, netty receives multiple channel connections
of the same client will be balanced binding eventloop (default policy).

On Fri, Nov 9, 2018 at 10:47 AM Zonghai Shang <y...@apache.org> wrote:

> Hi,
>
>
> dubbo默认值会复用建立的1个tcp连接,nettyServerBootstrapAcceptor会监听到,会用其中一个childgroup和这个channel做绑定,其他eventloop只会空轮训,绑定的channel线程会读写数据,没有理解哪里有问题。
>
> > 最终每个consumer是N * n,对于每个provider则是N * m
>
> 我这里针对他的问题,提供建议,让他增大连接数验证,netty收到同一个client多个channel连接一定会均衡绑定eventloop(默认策略)。
>
> -yiji
>
> Ian Luo <ian....@gmail.com> 于2018年11月9日周五 上午10:37写道:
>
> > +1, total agree with Jason's suggestion.
> >
> > On Fri, Nov 9, 2018 at 5:16 AM Jason Joo <hblz...@163.com> wrote:
> >
> > > Hi,
> > >
> > >
> >
> 设置connection属性要慎重,建议从1起,因为对于connection=N,每个设置了该属性的项目会在连provider时每个provider除已连接的共用连接外均新建N个连接,也就是最终每个consumer是N
> > > * n,对于每个provider则是N * m
> > >
> > > 其中,
> > > n - provider数
> > > m - 消费数
> > >
> > > 另外由于method/service均可设置该属性,多个属性会叠加这个问题
> > >
> > > best regards,
> > >
> > > Jason
> > >
> > > > On Nov 8, 2018, at 11:54, Zonghai Shang <y...@apache.org> wrote:
> > > >
> > > > Hi,
> > > >
> > > > 麻烦图片重新发下,这边看不到图片。
> > > >
> > > > 1. dubbo默认多个请求会复用同一个tcp连接,所以只有一个NettyServerWork去处理client
> > > > io事件,netty模型会把chanel绑定到eventloop,一旦绑定永远不会改变。
> > > >
> > > > 2. 你可以增加client端连接数,比如connections=3 或者4,5,然后再观察。
> > > >
> > > > 备注: netty服务端默认会把tcp连接公平分发给children eventloop。
> > > >
> > > > -yiji
> > > >
> > > > 噬音 <402264...@qq.com> 于2018年11月7日周三 下午7:29写道:
> > > >
> > > >> 你们好
> > > >>   我在使用过程中有个疑问,请在百忙中抽空解答一下:
> > > >>
> > >
> >
> 官网说明iothreads默认是cpu个数+1,从线程栈中看到有1个NettyClientWoker、3个NettyServerWork和1个NettyServerBoss线程;在服务运行过程中,看到NettyClientWoker和其中一个NettyServerWork线程是有CPU负载的,按照Netty框架,通过Boss线程去select
> > > >>
> > >
> >
> work线程,然后work去run,应该三个NettyServerWork线程cpu使用率应该是相近的;为什么只有一个NettyServerWork
> > > >> cpu负载高,其它的两个线程NettyServerWork几乎看不到cpu负载(线程状态都是RUNNABLE的)?
> > > >>
> > > >> PS:使用的是4核cpu的服务器,dubbo版本号2.6.2,dubbo使用默认配置
> > > >>
> > > >>
> > > >>
> > > >>
> > >
> > >
> >
>

Reply via email to