bumingchun opened a new pull request, #1763: URL: https://github.com/apache/incubator-brpc/pull/1763
项目中利用rpc_press进行压测,出现服务衰减问题,即压测过程中服务性能越变越差。后来通过分析发现rpc_press压测工具的实现存在问题,网络或者CPU抖动造成的发送请求不均匀会一直保存在窗口中,并影响后续请求,随程序运行时间变长,抖动出现的次数越来越多,发送地请求会越来越不均匀。具体分析如下: 举例说明:假设 QPS: 100,异步发送请求平均耗时 1ms,为方便画图,假设队列最大长度为10。 图(1) 中发送编号为4的请求时CPU或者网络抖动,造成本应在t+31发出的请求滞后了15ms,按照代码逻辑,编号为5/6的请求分别在t + 47 和 t + 51发出 图(2) 我们假设队列最大长度为10,按照图上的计算过程可以得到,发送完请求14后会sleep 24ms,这样就导致发送请求4时的抖动,对请求15发送时间造成了影响,抖动会在队列中一直存在。QPS越高,请求间隔越短,这个问题越容易出现。  本pull request利用一种更简单的方式来计算请求间隔,来解决上述问题。 -- 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]
