zhouyanghere commented on issue #2000:
URL:
https://github.com/apache/incubator-brpc/issues/2000#issuecomment-1327196831
补充开销统计:
1个worker ProcessEvent:9us, Write:5us
2个worker ProcessEvent:12us, Write:7us
4个worker ProcessEvent:29us, Write:16us
8个worker ProcessEvent:28us,
zhouyanghere commented on issue #2000:
URL:
https://github.com/apache/incubator-brpc/issues/2000#issuecomment-1327159647
> 独立的io线程性能不一定会好,因为存在io线程和process线程之间同步的开销 你这里减小pthread
worker的数量(最小是4),应该会好一些
我测试了一下,确实worker少的时候,write的开销也较小。深层原因是什么呢?线程数越少?write落在同一个CPU核上的概率越高,cpu
zhouyanghere commented on issue #2000:
URL:
https://github.com/apache/incubator-brpc/issues/2000#issuecomment-1326336262
>
那感觉是不是还是像其他网络框架那样,io线程和socket是绑定的,只是rpc
process那里用bthread去做负载均衡要好一点呢?这样也可以避免长尾请求的阻塞效应。
--
This is an automated message from the Apache Git Service.
To
zhouyanghere commented on issue #2000:
URL:
https://github.com/apache/incubator-brpc/issues/2000#issuecomment-1326254330
还有一个原因可能是因为同1个socket的write调用一直在不同的线程里切换导致开销变高?因为看其他的网络框架,一般socket会绑到一个固定io线程处理。
--
This is an automated message from the Apache Git Service.
To respond to the
zhouyanghere commented on issue #2000:
URL:
https://github.com/apache/incubator-brpc/issues/2000#issuecomment-1326116094
>
它处理过程是这样的。Pthread
A上运行bthreadA(epoll_wait),然后处理epoll事件,即ProcessEvent过程,其为bthread
B,PthreadA会去执行bthread B,而将bthread
zhouyanghere commented on issue #2000:
URL:
https://github.com/apache/incubator-brpc/issues/2000#issuecomment-1325952578
不不,我的重点不是当前bthread挂起并signal其它的worker来继续执行这个bthread带来的性能损耗,我的重点是经过bthread的ProcessEvent并没有切换pthread,为何系统调用函数write和read的开销高于直接调用ProcessEvent时的系统调用函数write和read的开销。
--
zhouyanghere commented on issue #2000:
URL:
https://github.com/apache/incubator-brpc/issues/2000#issuecomment-1325919196
如果将进程用taskset绑定到固定的CPU上,也没有此差异。是不是brpc
jumpstack的过程导致线程pthread切换了CPU,导致了cache miss,从而影响系统调用的开销。
--
This is an automated message from the Apache Git Service.
To
zhouyanghere commented on issue #2000:
URL:
https://github.com/apache/incubator-brpc/issues/2000#issuecomment-1325914657
Socket::StartInputEvent 里如果直接调用ProcessEvent函数,也是函数调用过程和栈切换,为何brpc
jumpstack就能影响系统调用。是否和jumpstack的处理有关系?jumpstack是汇编代码,能力有限,看不大懂。
--
This is an automated message from
zhouyanghere commented on issue #2000:
URL:
https://github.com/apache/incubator-brpc/issues/2000#issuecomment-1325909263
可能我描述的不是很清楚,和多线程应该没有直接关系。其他的类redis数据库,比如DragonFly DB,延时也很低。
我对ProcessEvent加了bvar统计,如果ProcessEvent走bthread,则ProcessEvent函数的处理平均耗时为26us。如果不走,则ProcessEvent只有6us。单链接下最明显。
zhouyanghere commented on issue #2000:
URL:
https://github.com/apache/incubator-brpc/issues/2000#issuecomment-1318310432
有没有办法在低压力下提供低延时又在高压力下高吞吐。
--
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
10 matches
Mail list logo