Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: tidb-service cpu无缘无故飙升99%
【TiDB Usage Environment】Production Environment
【TiDB Version】6.5.0
【Reproduction Path】None
【Encountered Problem: Phenomenon and Impact】
【Resource Configuration】Navigate to TiDB Dashboard - Cluster Info - Hosts and take a screenshot of this page
【Attachments: Screenshots/Logs/Monitoring】
goroutine_pd_172.16.215.211_2379_2724836510.txt (92.9 KB)
goroutine_tidb_172.16.215.211_4000_2957135535.txt (99.1 KB)
Is the CPU usage really that high even without any queries?
Let’s see if there are any queries.
Check the spike time point and see what that machine is doing.
This kind of single-node memory and CPU spike is most likely caused by slow queries. You can check topsql on the dashboard to troubleshoot.
The latency at this time seems a bit high. Check if it’s caused by IO, look at the slow logs from that time, and the IO load.
It’s highly likely that several large SQL queries were run at the corresponding time. Check TopSQL.
Checked and found no slow SQL, no business concurrency.
Only the tidb-service is high, no other processes.
Checked, there is no problematic SQL.
There are several modules in TiDB, you can take a look at them separately, and also check the slow logs from that time.
Try restarting to see if it can be reduced. Are the CPU models of each TiDB server the same? Check it out.
Restarting works, but the issue will reoccur. The CPU models are the same.
Checked everything, couldn’t find any problematic SQL.
Are all three nodes experiencing high CPU usage, or is it just one node?
Is it used by the tidb-server process? 
Is there anything else deployed on this node?
Your deployment environment is a hybrid deployment mode. It is recommended to first identify which specific component has a high CPU usage.
- Check traffic issues
- Slow SQL
- Use the manual analysis function of advanced debugging to analyze the specific reasons for the continuous CPU issue.
For this kind of single-node anomaly, it is recommended to directly go to the topsql page to see what this TiDB is running.