How to solve the issue of high pd-server usage in a single-node TiDB cluster?

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

Original topic: 单机部署的TIDB集群,pd-server占用很高,如何解决这类问题呢

| username: 每天当牛马

Deploying a TiDB cluster on a single machine, the pd-server process is occupying a very high amount of resources.
Usage scenario: Database with multiple tables (about 10,000 tables)



| username: 每天当牛马 | Original post link

Is there an expert who can take a look?

| username: ShawnYan | Original post link

Local test machine? How many CPU cores?

| username: 像风一样的男子 | Original post link

Your cluster is too stingy, it doesn’t even have monitoring installed, which increases the difficulty of troubleshooting. I also have a single-node cluster with 4 cores and 8GB, and it works quite normally.

| username: 每天当牛马 | Original post link

Yes, on the test device with 24 cores and 48 threads, even without any data, the CPU usage of the pd-server service reaches 50-60.

| username: 每天当牛马 | Original post link

Did you adjust any parameters? How many tables are there?

| username: 像风一样的男子 | Original post link

First, install the monitoring components, then log in to the dashboard and Grafana to analyze what your system is doing and where the issues are. Optimization should be based on targeted analysis.

| username: Jellybean | Original post link

This deployment is a bit excessive; it doesn’t even include Prometheus and Grafana, making troubleshooting very difficult.

For now, you can check the logs of the corresponding components to see if there is any abnormal information.

I strongly recommend installing all the monitoring components.

| username: wangccsy | Original post link

Try restarting.

| username: 江湖故人 | Original post link

There might be too many scheduling tasks. Let’s set up the monitoring environment first and take a look.

| username: 每天当牛马 | Original post link

How can this be confirmed?

| username: 每天当牛马 | Original post link

What specific content should we focus on?

| username: 哈喽沃德 | Original post link

The configuration of the single machine is a bit low.

| username: 江湖故人 | Original post link

In Grafana, there is an Operator under the PD directory.

| username: Kongdom | Original post link

Check if there are any meaningful logs under PD.

| username: Jellybean | Original post link

First, deploy the monitoring components; otherwise, with constant blind guessing, no one will be able to effectively help you solve the problem.

| username: FutureDB | Original post link

Indeed, TiDB has integrated Grafana so well that it would be a waste not to take advantage of the various detailed metrics monitoring.

| username: zhanggame1 | Original post link

The PD load is related to the number of regions. Check how many there are.

| username: dba远航 | Original post link

The TiDB server is experiencing high load. You need to check if the SQL is using pushdown.

| username: 烂番薯0 | Original post link

Can’t it be deployed separately?