chenBright commented on PR #2907: URL: https://github.com/apache/brpc/pull/2907#issuecomment-3067011947
使用 #2907 和 #2916 后,futex 自旋锁竞争变更激烈了,CPU开销涨了17%左右。 <img width="824" height="205" alt="image" src="https://github.com/user-attachments/assets/c6e42539-1b48-4620-9163-3a58c5711a18" /> <br> <img width="340" height="267" alt="image" src="https://github.com/user-attachments/assets/9a190d64-8ae1-4805-8de7-460bdf4605c4" /> <img width="579" height="22" alt="image" src="https://github.com/user-attachments/assets/e1e3c6a9-97ed-4377-8020-02e40874a83d" /> <br> <img width="274" height="168" alt="image" src="https://github.com/user-attachments/assets/a7f6984f-5fa0-41dd-ac95-9cdf6bd42705" /> <br> 我们的场景是worker数多(200),worker usage比较小,rpc qps 10W+,会主动起一些bthread。 原因估计是_waiter_num并不能可靠地获取到当前有waiter,提起返回继续去signal下一个ParkingLot,使得_pending_signal递增更频繁,导致futex_wait_private失败的概率变大,futex_wait_private的次数也变多了。 @JimChengLin CC -- 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-unsubscr...@brpc.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org For additional commands, e-mail: dev-h...@brpc.apache.org