Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.Original topic: HashAgg 导致TiDB内存占用过高
【TiDB Usage Environment】Production Environment or Test Environment or POC
Production
【TiDB Version】
v5.1.0
【Encountered Problem】
TiDB memory usage is too high, and it seems to be caused by HashAgg, as shown in the picture below:
PS: Checking the process found that this instance occupies 70% of the memory (the physical machine has a total of 128G memory). Is there any good solution for this situation?
The server-memory-quota configuration does not seem recommended for production use.
The tidb_mem_quota_query configuration is somewhat inappropriate; I need to limit memory but do not want query OOM errors.
【Reproduction Path】What operations were performed to encounter the problem
【Problem Phenomenon and Impact】
【Attachments】
Please provide the version information of each component, such as cdc/tikv, which can be obtained by executing cdc version/tikv-server --version.