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。单链接下最明显。 所以,我奇怪的是,ProcessEvent在redis协议下处理很简单,主要是系统调用read和write。而且ProcessEvent在bthread里调度时,自身并没有切线程,只是线程将函数调用栈从Socket::StartInputEvent切换到ProcessEvent函数,为何会影响系统调用read和write的开销呢? -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
