CPU Memory Settings

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

Original topic: CPU内存设置

| username: TiDBer_TVKpabeM

[TiDB Usage Environment] Production Environment / Testing / PoC
[TiDB Version]
[Reproduction Path] What operations were performed when the issue occurred
The server has 32GB of memory and 16 CPUs
But only 16GB of memory and 4 CPUs are being used
Why is this inconsistent, and how can I set the size myself?
[Encountered Issue: Problem Phenomenon and Impact]

[Resource Configuration] Go to TiDB Dashboard - Cluster Info - Hosts and take a screenshot of this page
[Attachments: Screenshots/Logs/Monitoring]

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

Did you bind the NUMA node?

| username: TiDBer_TVKpabeM | Original post link

What does it mean? I’ve never seen this node before.

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

Did you bind NUMA nodes in your configuration file?

| username: TiDBer_TVKpabeM | Original post link

Not bound

| username: zhanggame1 | Original post link

Log in to the machine where TiDB is located and verify by entering the command.

| username: 我是咖啡哥 | Original post link

lscpu  
free -g 

Post the results :joy:

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

Execute the following commands on the host:

To check the number of physical CPUs:

cat /proc/cpuinfo | grep "physical id" | sort | uniq | wc -l

To check the number of cores per physical CPU:

cat /proc/cpuinfo | grep "cpu cores" | uniq

To check the number of logical CPUs:

cat /proc/cpuinfo | grep "processor" | wc -l

To check the memory, use:

free -g