How to Bind NUMA on a Physical Machine with Multiple NUMA Nodes

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

Original topic: 一台物理机有多个numa,该怎么绑定numa

| username: Raymond

The domestic physical machine from Haiguang has 8 NUMA nodes, and 2 TiDB servers are deployed on the physical machine. If you want each TiDB server to bind to NUMA, what should the NUMA binding strategy be? Should each TiDB server bind to 4 NUMA nodes?

| username: h5n1 | Original post link

  1. Determine the number of servers to deploy based on resources and production needs, each node has a memory size limit.
  2. Use numactl -H to deploy across nodes, selecting nodes with close distance.
| username: hey-hoho | Original post link

Here is a best practice you can refer to: 专栏 - 单机 8 个 NUMA node 如何玩转 TiDB - AMD EPYC 服务器上的 TiDB 集群最优部署拓扑探索 | TiDB 社区
According to the conclusion of the article, binding each TiDB server to a NUMA node provides the best performance. You can test it yourself in your actual situation.

If you want to deploy only 2 TiDB servers on a single physical machine, you can allocate 4 NUMA nodes to each TiDB server, for example:

tidb_servers:
  - host: 10.0.1.1
    port: 4000
    numa_node: "0,1,2,3"
  - host: 10.0.1.1
    port: 4001
    numa_node: "4,5,6,7"
| username: TiDBer_jYQINSnf | Original post link

It’s best to leave one node for system calls. You can check the CPU usage during stress testing to see the specific situation.

| username: 履霜知冰 | Original post link

It is more appropriate to allocate 4 NUMA nodes for each of the two TiDB servers on one machine. During use, attention should be paid to hardware resource utilization to avoid abnormal issues caused by exceeding usage limits.

| username: system | Original post link

This topic will be automatically closed 60 days after the last reply. No new replies are allowed.