You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by GitBox <gi...@apache.org> on 2022/07/28 02:50:10 UTC

[GitHub] [incubator-brpc] expleeve opened a new issue, #1861: Responses spent a lot of time(响应花费了很长时间)

expleeve opened a new issue, #1861:
URL: https://github.com/apache/incubator-brpc/issues/1861

   **Describe the bug (描述bug)**
   When I test a brpc client and a brpc server, about 50k QPS,  the Avg latency is over 44ms.
   I found the most of the time spent between finish write and start read,about 37ms,I don't know why
   
   **To Reproduce (复现方法)**
   client:20*pthread,async call,sofa-pbrpc,single connection, no retry
   server:  default config
   add two bvar::LatencyRecorder:
   
   **Expected behavior (期望行为)**
   
   
   **Versions (各种版本)**
   OS:
   Compiler:
   brpc:
   protobuf:
   
   **Additional context/screenshots (更多上下文/截图)**
   
   


-- 
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-unsubscribe@brpc.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] wwbmmm commented on issue #1861: Responses spent a lot of time(响应花费了很长时间)

Posted by GitBox <gi...@apache.org>.
wwbmmm commented on issue #1861:
URL: https://github.com/apache/incubator-brpc/issues/1861#issuecomment-1198829238

   看起来是某个地方遇到瓶颈了,有以下可能:
   1. pthread worker数量不足,导致bthread堆积:可增加pthread worker数量(调大gflag bthread_concurrency)
   2. 单连接上的网络传输速率瓶颈:可切换成连接池试试
   3. cpu负载过高,导致执行变慢:可为服务分配更多cpu
   4. event dispatcher任务过多达到瓶颈:可增加event dispatcher数量(调大gflag event_dispatcher_num)


-- 
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-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] expleeve commented on issue #1861: Responses spent a lot of time(响应花费了很长时间)

Posted by GitBox <gi...@apache.org>.
expleeve commented on issue #1861:
URL: https://github.com/apache/incubator-brpc/issues/1861#issuecomment-1198084495

   > 这个时间就是在等待server端处理请求返回结果吧,看看server端的处理时间是多少?
   
   不好意思,没说清楚,server端在brpc的status面板上看耗时平均是10ms左右,剩下的大概27ms,不确定是花在哪了我直接用example里的echo的client和server测试的话,这部分的平均耗时(去除server端耗时后)大概在250us左右,QPS在20w以上


-- 
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-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] expleeve commented on issue #1861: Responses spent a lot of time(响应花费了很长时间)

Posted by GitBox <gi...@apache.org>.
expleeve commented on issue #1861:
URL: https://github.com/apache/incubator-brpc/issues/1861#issuecomment-1198986327

   > 看起来是某个地方遇到瓶颈了,有以下可能:
   > 
   > 1. pthread worker数量不足,导致bthread堆积:可增加pthread worker数量(调大gflag bthread_concurrency)
   > 2. 单连接上的网络传输速率瓶颈:可切换成连接池试试
   > 3. cpu负载过高,导致执行变慢:可为服务分配更多cpu
   > 4. event dispatcher任务过多达到瓶颈:可增加event dispatcher数量(调大gflag event_dispatcher_num)
   
   好的,非常感谢


-- 
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-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] wwbmmm closed issue #1861: Responses spent a lot of time(响应花费了很长时间)

Posted by GitBox <gi...@apache.org>.
wwbmmm closed issue #1861: Responses spent a lot of time(响应花费了很长时间)
URL: https://github.com/apache/incubator-brpc/issues/1861


-- 
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-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] expleeve commented on issue #1861: Responses spent a lot of time(响应花费了很长时间)

Posted by GitBox <gi...@apache.org>.
expleeve commented on issue #1861:
URL: https://github.com/apache/incubator-brpc/issues/1861#issuecomment-1198809829

   > 当qps很低的时候,也会增加27ms的延时吗?还是只有在高qps的时候出现
   
   只有高的时候,2w以下的时候也和echo的demo表现类似的


-- 
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-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] wwbmmm commented on issue #1861: Responses spent a lot of time(响应花费了很长时间)

Posted by GitBox <gi...@apache.org>.
wwbmmm commented on issue #1861:
URL: https://github.com/apache/incubator-brpc/issues/1861#issuecomment-1197850633

   这个时间就是在等待server端处理请求返回结果吧,看看server端的处理时间是多少?


-- 
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-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] wwbmmm commented on issue #1861: Responses spent a lot of time(响应花费了很长时间)

Posted by GitBox <gi...@apache.org>.
wwbmmm commented on issue #1861:
URL: https://github.com/apache/incubator-brpc/issues/1861#issuecomment-1198806380

   当qps很低的时候,也会增加27ms的延时吗?还是只有在高qps的时候出现


-- 
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-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] expleeve commented on issue #1861: Responses spent a lot of time(响应花费了很长时间)

Posted by GitBox <gi...@apache.org>.
expleeve commented on issue #1861:
URL: https://github.com/apache/incubator-brpc/issues/1861#issuecomment-1198985655

   好的,非常感谢


-- 
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-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org