chenBright commented on PR #2207:
URL: https://github.com/apache/brpc/pull/2207#issuecomment-1506280140

   
UT中起了一些pthread线程调用同一个DoublyBufferedData实例的Read函数,发现随着线程数的增加,Read的性能会下降了很多。下面是ci上跑的结果:
   ```shell
   [ RUN      ] LoadBalancerTest.performance
   PROFILE: interrupts/evictions/bytes = 99/41/3072
   I0413 03:14:47.417500 12655 brpc_load_balancer_unittest.cpp:1193]  
thread_num=1 count=23258285 average_time=43.1315 qps=2.31849e+07
   PROFILE: interrupts/evictions/bytes = 194/120/7376
   I0413 03:14:48.421880 12655 brpc_load_balancer_unittest.cpp:1193]  
thread_num=4 count=46279857 average_time=86.4463 qps=1.15679e+07
   PROFILE: interrupts/evictions/bytes = 172/92/5928
   I0413 03:14:49.426188 12655 brpc_load_balancer_unittest.cpp:1193]  
thread_num=8 count=46356535 average_time=171.534 qps=5.82974e+06
   PROFILE: interrupts/evictions/bytes = 196/108/6856
   I0413 03:14:50.430695 12655 brpc_load_balancer_unittest.cpp:1193]  
thread_num=12 count=46243444 average_time=256.458 qps=3.89927e+06
   ```
   
   
DoublyBufferedData中,不同线程之间的thread-local锁是没有竞争的,应该不会相互影响,导致性能下降才对。请问性能下降的原因是什么?


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

Reply via email to