zhengJade commented on PR #2819: URL: https://github.com/apache/brpc/pull/2819#issuecomment-2526733718
> > * epoll 线程和其他 bthread 具有相同优先级,导致 epoll 线程可能被一小段时间在队列中无响应,引起 worker queue 任务数量分布不均匀,多对一的 steal。 > > * 网络事件无差别 signal,增加了系统调用。 > > 能否分别测一下这两个优化各自提升多少性能呢? 我觉得第二个可能更重要一些,而且也更通用,可以把第二个优化单独提一个PR,这样更容易合入 较少 signal 这个我单独优化过,基本没什么提升,然后分析了原因才发现是因为压力大的时候,Q 其实是不平均的,直接的一个原因就是 epoll 的 tid 有时候会很难被 steal 到,这导致所有的 worker 呈现出,要做完当前所有的任务才可以进行 epoll,在某一瞬间导致有些 worker 进入了 wait 状态,然后整体就看起来,worker 没有 wait 状态的时间很少很少,所以就是没啥作用,于是才想着更改 epoll 的优先级 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org For additional commands, e-mail: dev-h...@brpc.apache.org