-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
服务端latency统计时间可能有误 #2437
Comments
可以贴点数据出来么? |
客户端耗时(cntl->latency_us()): 服务端耗时: 可以看到server端的rt要明显比client侧要长 |
问下 有对应的0.97版本的耗时数据么 |
看了一下升级前0.9.7的指标: 升级后1.0.5的指标是: 由于一些外部依赖可能导致时延的绝对值有波动,但是大小关系还是明确发生改变了 |
This comment was marked as outdated.
This comment was marked as outdated.
所以是不是bvar这里的上报逻辑需要优化一下。 |
刚刚加了个打点看了下析构应该不是很耗时,问题不大。之所以有这么大差异的原因是业务引入了这个变更:https://github.com/apache/brpc/pull/2328/files#diff-1c912dfbdb9b39d5f50ed77e1a415829bf908666ee98226bf60d138f507242e6 |
Describe the bug (描述bug)
写一个简单的client去压测单机server,获取如下两个指标:
client耗时:通过brpc::Controller::latency_us()获取
server耗时:通过bvar中的对应latency bvar获取
之前我们使用的版本是0.9.7,client侧耗时会明显大于server耗时,符合预期
最近升级到了1.5.0版本,client侧耗时基本不变,但是server侧耗时明显高于之前,甚至大于client侧耗时。
因此怀疑server端的耗时在新版本内有问题。
看了下用于计时的ConcurrencyRemover的逻辑并没有明显修改,
这块还有什么别的排查思路吗?Appreciate any help
To Reproduce (复现方法)
补充细节:
client就是简单的client,请求来自rpc dump采集,单线程使用同步接口去重复发请求。
server是我们的生产代码,特点是:会使用bthread做一些并行计算;使用了brpc的session_local_data。
client和server压测,正常负载下均可以复现
Expected behavior (期望行为)
在新版本中,client侧耗时不应该小于server耗时,预期会有明显的gap
Versions (各种版本)
OS:
Compiler:
brpc:
protobuf:
Additional context/screenshots (更多上下文/截图)
这里看的bvar统计就是取前几分钟的值,基本可以排除指标抖动影响
The text was updated successfully, but these errors were encountered: