yanglimingcn opened a new issue #1006: auto concurrency limiter
URL: https://github.com/apache/incubator-brpc/issues/1006
 
 
   **Describe the bug (描述bug)**
   
   
目前对auto_concurrency_limiter这块的实现遇到些问题,想在这里问一下。现象就是我的服务的latency大概是25us,qps是10000/s,
   计算出来的concurrency小于1,导致服务请求都不成功。
   自适应算法的公式为:next_max_concurrency = _min_latency_us * _ema_max_qps / 1000000 *  
(1 + XXX_ratio)
   (这里先忽略_explore_ratio 或者 reduce_ratio)
   我举个例子说明问题:
   1、qps = 10000/s latency = 2500us concurrency = 25
   2、qps = 10000/s latency = 25us   concurrency = 0.25
   直观上看这个latency小的concurrency也小,这个很难理解。
   换个角度说一下就是,上面两组数据使用这个公式计算的concurrency 
1)代表在2500us时间段内处理25个请求,2)代表在25us时间段内处理0.25个请求。
   
其实在2500us时间段内2)也能处理25个请求,并且它的qps探索空间应该能更大。但是现在的值是0.25,导致max_concurrency的值一直是0(concurrency是整形),并且恢复不了(因为所有请求都被拒绝了)。
   目前的实现有一定的局限性。
   **To Reproduce (复现方法)**
   auto_concurrency_limiter例子里面的echo处理每个请求的延时修改为25us
   
   **Expected behavior (期望行为)**
   能适用到各种数据范围,产生正确的结果。
   
   **Versions (各种版本)**
   OS: debian
   Compiler:
   g++ (Debian 4.9.2-10+deb8u1) 4.9.2
   Copyright (C) 2014 Free Software Foundation, Inc.
   This is free software; see the source for copying conditions.  There is NO
   warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
   brpc: master
   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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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

Reply via email to