Issues with TiDB Memory Parameter Units

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

Original topic: tidb内存参数单位问题

| username: zhanggame1

[TiDB Usage Environment] Production Environment / Testing / PoC
[TiDB Version] 7.6.0
[Reproduction Path] What operations were performed to cause the issue
Modified parameters through tiup cluster edit-config tidb-test
Added the following content:
tidb:
performance.server-memory-quota: 20G
tikv:
storage.block-cache.capacity: 20G
Then saved normally and reloaded the cluster. Upon reload, tidb-server failed to start, and there were no logs written by tidb-server.
Upon checking the manual, I found that the unit for performance.server-memory-quota is bytes. Although I wrote 20G and it passed the check, and later tested putting it in topology.yaml which also allowed the cluster to deploy, tidb still failed to start.

Suggestion: When checking parameters, tidb should not pass the check for performance.server-memory-quota: 20G. Otherwise, it is very troublesome to troubleshoot issues caused by incorrect parameter settings.

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

Hasn’t this parameter been deprecated in version 7.6? Use tidb_server_memory_limit instead: TiDB 配置文件描述 | PingCAP 文档中心

| username: zhanggame1 | Original post link

Indeed, I misread it. It should be abolished.