Performance Overhead of Deploying TiDB in a K8S Environment

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

Original topic: TIDB部署在K8S环境中性能损耗

| username: TiDBer_G64jJ9u8

[TiDB Usage Environment] POC
[TiDB Version] 4.0
[Encountered Issue] Deployed in a K8S environment, 1.5K SAS disk, 32 cores, 64GB memory, poor performance.
[Reproduction Path] Slow query (>10 seconds) when selecting count(*) from 1 million records.
[Issue Phenomenon and Impact] Occurs once in every 10 consecutive queries, TiDB pressure is not considered high.
[TiDB Operator Version]:
[K8s Version]:
[Attachments]:

| username: Lucien-卢西恩 | Original post link

Hello, specific problems need specific analysis. You can start analyzing the issue from the perspective of SQL optimization. The current problem is that select (*) > 10 seconds. Have you compared this with the OP deployment? Additionally, can you use explain analyze to check whether the actual resource consumption and execution time of the SQL are as expected or unexpected? You can refer to the official website’s SQL optimization methods for analysis.