High CPU Usage of gRPC Poll

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: gRPC poll CPU使用率很高

| username: TiDBer_freGslX6

[TiDB Usage Environment] Production Environment
[TiDB Version]
[Encountered Problem: Problem Phenomenon and Impact] How can I check which SQL statements are causing the gRPC poll CPU usage to increase?
[Resource Configuration]
[Attachment: Screenshot/Log/Monitoring]

| username: TiDBer_freGslX6 | Original post link

It seems that in slow SQL, you can only see the completed SQL.

| username: 小龙虾爱大龙虾 | Original post link

This isn’t very high, it only used 2 CPUs :joy_cat:

| username: TiDBer_freGslX6 | Original post link

The information says that the value here should not exceed 80%.

| username: TiDBer_freGslX6 | Original post link

Now that the gRPC poll CPU has come down, I can see which SQL is slow in the slow SQL log. Is there a way to see the currently executing slow SQL?

| username: 小龙虾爱大龙虾 | Original post link

It refers to 80% of the entire thread pool.

| username: 小龙虾爱大龙虾 | Original post link

In Top SQL, you can see the SQL that is currently being executed. However, your version is too low and doesn’t have this feature. You can only use cluster_processlist to see the SQL that is currently being executed.

| username: TiDBer_freGslX6 | Original post link

Okay, thank you. I will go study it.

| username: tidb菜鸟一只 | Original post link

If you have several CPUs, if you have 16, having 1200% here is considered normal…

| username: dba远航 | Original post link

Query slow SQL and large transactions