Cluster expansion of TiFlash with NUMA binding failed, but the same configuration works for TiKV. Why?

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

Original topic: 集群扩容tiflash,numa绑核不成功,同样的配置tikv是可以的why?

| username: jaybing926

[TiDB Usage Environment] Production Environment / Testing / Poc
[TiDB Version]
[Reproduction Path] What operations were performed when the issue occurred
[Encountered Issue: Problem Phenomenon and Impact]
Just expanded (added) 2 TiFlash nodes. Found that NUMA node binding was not successful. The same configuration on the same batch of machines, the TiKV nodes were successful. The logs did not filter out useful information, not sure how to troubleshoot the issue. Experts, please help take a look~~
[Resource Configuration]
[Attachments: Screenshots / Logs / Monitoring]


$ tiup cluster show-config tidb-xxxxxxx
tiup is checking updates for component cluster ...
Starting component `cluster`: /home/tidb/.tiup/components/cluster/v1.12.1/tiup-cluster show-config tidb-xxxxxxx
global:
  user: tidb
  ssh_port: 17717
  ssh_type: builtin
  deploy_dir: /home/tidb/deploy
  data_dir: /disk2
  os: linux
monitored:
  node_exporter_port: 9100
  blackbox_exporter_port: 9115
  deploy_dir: /home/tidb/deploy/monitor-9100
  data_dir: /disk2/monitor-9100
  log_dir: /home/tidb/deploy/monitor-9100/log
server_configs:
  tidb:
    binlog.enable: false
    binlog.ignore-error: false
    log.slow-threshold: 3000
    mem-quota-query: 3221225472
    proxy-protocol.networks: 192.168.241.54,192.168.241.55,192.168.241.101,192.168.241.100
  tikv:
    readpool.coprocessor.use-unified-pool: true
    readpool.storage.use-unified-pool: false
    rocksdb.defaultcf.block-cache-size: 32GB
    rocksdb.lockcf.block-cache-size: 2.56GB
    rocksdb.writecf.block-cache-size: 19.2GB
  pd:
    replication.enable-placement-rules: true
    schedule.leader-schedule-limit: 4
    schedule.region-schedule-limit: 2048
    schedule.replica-schedule-limit: 64
  tidb_dashboard: {}
  tiflash: {}
  tiflash-learner: {}
  pump: {}
  drainer: {}
  cdc: {}
  kvcdc: {}
  grafana: {}

tikv_servers:
- host: 192.168.241.73
  ssh_port: 17717
  port: 20160
  status_port: 20180
  deploy_dir: /home/tidb/deploy/tikv-20160
  data_dir: /disk2/tikv-20160
  log_dir: /home/tidb/deploy/tikv-20160/log
  numa_node: "1"
  arch: amd64
  os: linux
- host: 192.168.241.74
  ssh_port: 17717
  port: 20160
  status_port: 20180
  deploy_dir: /home/tidb/deploy/tikv-20160
  data_dir: /disk2/tikv-20160
  log_dir: /home/tidb/deploy/tikv-20160/log
  numa_node: "1"
  arch: amd64
  os: linux
- host: 192.168.241.75
  ssh_port: 17717
  port: 20160
  status_port: 20180
  deploy_dir: /home/tidb/deploy/tikv-20160
  data_dir: /disk2/tikv-20160
  log_dir: /home/tidb/deploy/tikv-20160/log
  numa_node: "1"
  arch: amd64
  os: linux
- host: 192.168.241.76
  ssh_port: 17717
  port: 20160
  status_port: 20180
  deploy_dir: /home/tidb/deploy/tikv-20160
  data_dir: /disk2/tikv-20160
  log_dir: /home/tidb/deploy/tikv-20160/log
  numa_node: "1"
  arch: amd64
  os: linux
tiflash_servers:
- host: 192.168.241.71
  ssh_port: 17717
  tcp_port: 9000
  http_port: 8123
  flash_service_port: 3930
  flash_proxy_port: 20170
  flash_proxy_status_port: 20292
  metrics_port: 8234
  deploy_dir: /home/tidb/deploy/tiflash-9000
  data_dir: /disk2/tiflash-9000
  log_dir: /home/tidb/deploy/tiflash-9000/log
  numa_node: "1"
  arch: amd64
  os: linux
- host: 192.168.241.72
  ssh_port: 17717
  tcp_port: 9000
  http_port: 8123
  flash_service_port: 3930
  flash_proxy_port: 20170
  flash_proxy_status_port: 20292
  metrics_port: 8234
  deploy_dir: /home/tidb/deploy/tiflash-9000
  data_dir: /disk2/tiflash-9000
  log_dir: /home/tidb/deploy/tiflash-9000/log
  numa_node: "1"
  arch: amd64
  os: linux
| username: xingzhenxiang | Original post link

Use lscpu to check node information.

| username: jaybing926 | Original post link

It is the same batch of machines with identical hardware, and the binding of cores to TiKV nodes was successful.

# lscpu 
Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                48
On-line CPU(s) list:   0-47
Thread(s) per core:    2
Core(s) per socket:    12
Socket(s):             2
NUMA node(s):          2
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 106
Model name:            Intel(R) Xeon(R) Silver 4310 CPU @ 2.10GHz
Stepping:              6
CPU MHz:               3300.476
CPU max MHz:           3300.0000
CPU min MHz:           800.0000
BogoMIPS:              4200.00
Virtualization:        VT-x
L1d cache:             48K
L1i cache:             32K
L2 cache:              1280K
L3 cache:              18432K
NUMA node0 CPU(s):     0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46
NUMA node1 CPU(s):     1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47
Flags:                 fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch epb cat_l3 invpcid_single intel_pt ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dtherm ida arat pln pts hwp hwp_act_window hwp_epp hwp_pkg_req avx512vbmi umip pku ospke avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq md_clear pconfig spec_ctrl intel_stibp flush_l1d arch_capabilities
| username: tidb菜鸟一只 | Original post link

Just use tiup cluster edit-config clustername to modify the configuration and change numa_node: "1" to numa_node: "0" for tiflash_servers with IP 192.168.241.71. I see that your TiKV is also bound to 1.

| username: jaybing926 | Original post link

Why do you need to bind to 0? I have 6 different machines, 4 TiKV, and 2 TiFlash, without any occupation.

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

I didn’t look closely, but if you don’t have a mixed deployment, why do you need to bind cores? Aren’t you binding to 1 now?

| username: xingzhenxiang | Original post link

You can set the binding of TiFlash to: numa_node: “0”, then reload TiFlash and see if it works. There are no error logs, so you can only try switching the parameters to see if there are any changes.

| username: jaybing926 | Original post link

It needs to be bound to 1 and mixed with other services…

| username: jaybing926 | Original post link

Okay, I’ll give it a try~

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

If you want to bind 1, haven’t you already done it?

| username: jaybing926 | Original post link

No, look at screenshot 1, the binding was not successful, but tikv was successful.

| username: jaybing926 | Original post link

I tried it, but it didn’t work. The logs don’t seem to print the relevant information either, right? I filtered the keyword ‘numa’ and there was no content at all.
find log/ -type f | xargs grep -i ‘numa’

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

But I see that you have already bound it in the show config, right?

| username: jaybing926 | Original post link

This is just the configuration, it hasn’t actually taken effect. See the screenshot.

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

Have you reloaded the cluster?

| username: 大鱼海棠 | Original post link

It looks like the configuration hasn’t been applied. Try reloading TiFlash.

| username: jaybing926 | Original post link

Restarted TiFlash,
also modified numa_node: 0/1, reloaded, but it didn’t work.

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

It shouldn’t be. There’s no difference between binding cores for TiFlash and TiKV.

| username: jaybing926 | Original post link

Yes, the configuration is the same, and the servers are all from the same batch with identical hardware systems.

| username: jaybing926 | Original post link

I just scaled down these two nodes and then scaled up TIFLASH again, but the result is still the same. How should I troubleshoot this? I’m out of ideas.