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 2020/06/29 03:46:07 UTC

[GitHub] [incubator-brpc] dangding opened a new issue #1149: OnNewMessages中last_msg处理机制,是否会影响请求延时?

dangding opened a new issue #1149:
URL: https://github.com/apache/incubator-brpc/issues/1149


   在OnNewMessage中,针对last_msg的处理,会延后到下一轮DoRead中,进行处理。
   请问,当单个socket中,qps较大,且每次DoRead到消息量较多时,是否会增加last_msg的响应时间?


----------------------------------------------------------------
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.

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] heyuyi0906 edited a comment on issue #1149: OnNewMessages中last_msg处理机制,是否会影响请求延时?

Posted by GitBox <gi...@apache.org>.
heyuyi0906 edited a comment on issue #1149:
URL: https://github.com/apache/incubator-brpc/issues/1149#issuecomment-652739006


   说下我对这个问题的理解哈,这里说的延时应该是指从CutInputMessage得到一个新的msg,到建立的bthread flush之间的延时。
   延时来源于两方面:
   1) 一次DoRead得到的所有msg会通过一次bthread_flush被调度执行。
   2) last_msg的处理时机会被延后。当次DoRead的last_msg会在下一次DoRead后被QueueMessage,伴随下一次DoRead产生的msg被flush;若当次DoRead后读不到新的数据,last_msg会在析构时在当前bthread执行ProcessInputMessage。
   
   理论上来说last_msg的延时和一次DoRead的第一个msg是相当的,因此,OnNewMessages中延时主要是上述1)带来的。为什么要这么做,OnNewMessages下面的注释也给出了解释——“To minimize the overhead, scheduling is batched”。


----------------------------------------------------------------
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.

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] dangding commented on issue #1149: OnNewMessages中last_msg处理机制,是否会影响请求延时?

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


   > 说下我对这个问题的理解哈,这里说的延时应该是指从CutInputMessage得到一个新的msg,到建立的bthread flush之间的延时。
   > 延时来源于两方面:
   > 
   > 1. 一次DoRead得到的所有msg会通过一次bthread_flush被调度执行。
   > 2. last_msg的处理时机会被延后。当次DoRead的last_msg会在下一次DoRead后被QueueMessage,伴随下一次DoRead产生的msg被flush;若当次DoRead后读不到新的数据,last_msg会在析构时在当前bthread执行ProcessInputMessage。
   > 
   > 理论上来说last_msg的延时和一次DoRead的第一个msg是相当的,因此,OnNewMessages中延时主要是上述1)带来的。为什么要这么做,OnNewMessages下面的注释也给出了解释——“To minimize the overhead, scheduling is batched”。
   
   如果单个socket上qps很高,一次DoRead的数据量比较大呢?延时会不会明显?
   
   PS:用echo_server起了一个服务,在另一台机器上通过rpc_press发请求,当qps较大时,通过brpc的监控页面,可以看到,运行时间越长,延时会越来越大。


----------------------------------------------------------------
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.

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] dangding closed issue #1149: OnNewMessages中last_msg为什么选择在当前bthread中执行?

Posted by GitBox <gi...@apache.org>.
dangding closed issue #1149:
URL: https://github.com/apache/incubator-brpc/issues/1149


   


----------------------------------------------------------------
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.

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] heyuyi0906 commented on issue #1149: OnNewMessages中last_msg处理机制,是否会影响请求延时?

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


   说下我对这个问题的理解哈,这里说的延时应该是指从CutInputMessage得到一个新的msg,到建立的bthread flush之间的延时。
   延时来源于两方面:
   1) 一次DoRead得到的所有msg会通过一次bthread_flush被调度执行。
   2) last_msg的处理时机会被延后。当次DoRead的last_msg会在下一次DoRead后被QueueMessage,伴随下一次DoRead产生的msg被flush;若当次DoRead后读不到新的数据,last_msg会在析构时在当前bthread执行ProcessInputMessage。
   理论上来说last_msg的延时和一次DoRead的第一个msg是相当的,因此,OnNewMessages中延时主要是上述1)带来的。为什么要这么做,OnNewMessages下面的注释也给出了解释——“To minimize the overhead, scheduling is batched”。


----------------------------------------------------------------
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.

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