libai245 opened a new issue #2502:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2502


   我们对后端服务进行了http2.0改造,但是性能出下降情况,而且下降的很大,使用http1.0时TPS为1.8W,使用http2.0时TPS仅为6K
   查看性能日志cse_metrics.log后发现在过滤阶段性能差别很大
   
![image](https://user-images.githubusercontent.com/13653371/129316565-c474cdcc-5bbd-4b4a-b539-65d536f54df1.png)
   
   查看线程信息后发现很多线程进入了阻塞状态
   
![image](https://user-images.githubusercontent.com/13653371/129317116-546c3de1-f089-43c8-8ebe-51396c5afc40.png)
   
   
![image](https://user-images.githubusercontent.com/13653371/129317134-d83e5522-9787-4b89-950c-f963d916da24.png)
   
   查看截图中方法发现Http2ServerRequestImpl中很多方法都对同一个connection加了锁
   
![image](https://user-images.githubusercontent.com/13653371/129317303-d952cbdc-7436-4699-bea0-2e9fd2cccb95.png)
   
![image](https://user-images.githubusercontent.com/13653371/129317326-5f3df1c8-d307-4452-8665-7e9fbdff61f9.png)
   
   而HttpServerRequestImpl中没有加锁
   
![image](https://user-images.githubusercontent.com/13653371/129317402-829aedf6-a3f5-48ab-b4e3-0667484546d3.png)
   
![image](https://user-images.githubusercontent.com/13653371/129317418-645bcbd8-1bfb-459d-a740-1a3efe937bb0.png)
   问题应该是在过滤阶段,很多过滤器调用了锁方法,导致锁竞争激烈,所以HTTP2.0性能下降了
   
   
   想问下出现这种问题应该优化
   


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


Reply via email to