xiaoyuge opened a new issue, #32062:
URL: https://github.com/apache/shardingsphere/issues/32062

   ## Question
   
   Today I encountered a CPU idle alarm issue caused by shardingshpere-proxy. I 
suddenly received a CPU monitoring alarm in the production environment, and the 
CPU usage rate exceeded the threshold. So, I logged into the production 
environment machine and used the top command to view the results, which are as 
follows:
   
   <img width="1431" alt="CPU Idle-2" 
src="https://github.com/apache/shardingsphere/assets/2179042/f9c77db8-6d40-4c80-9676-24546606f43e";>
   
   From the graph, it can be seen that the CPU utilization rate of 
shardingshper proxy has reached 790.7%.
   So, I further examined which threads had higher CPU usage, as shown in the 
following figure:
   
   <img width="836" alt="cpu-thread-2" 
src="https://github.com/apache/shardingsphere/assets/2179042/15babdd9-158d-4357-87d3-0750660f9c67";>
   
   Then, based on this information, I further examined the thread stack 
information of these high CPU occupied threads, as follows:
   
   <img width="922" alt="thread-stack" 
src="https://github.com/apache/shardingsphere/assets/2179042/8ce5a30b-d9f5-499c-ae74-a76e91a7c2f6";>
   <img width="891" alt="thread-stack-2" 
src="https://github.com/apache/shardingsphere/assets/2179042/b35e1dea-54b7-464b-8d73-408de1577da0";>
   <img width="914" alt="thread-stack-3" 
src="https://github.com/apache/shardingsphere/assets/2179042/300836e4-0e94-47d8-9688-695e7809ea58";>
   
   From the thread stack information, it seems that some kind of SQL 
optimization is being done. May I ask, what are these threads specifically 
doing? How to avoid high CPU usage caused by this type of thread?
   
   ShardingShpere-proxy version is 5.3.2
   Mysql version is 5.7.37
   


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