I have the following NUMA laytout:
root# lscpu | grep NUMA
NUMA node(s): 2
NUMA node0 CPU(s): 0,2,4,6,8,10,12,14,16,18
NUMA node1 CPU(s): 1,3,5,7,9,11,13,15,17,19
In the documentation I see the following CPU sets defined:
threading:
cpu-affinity:
- management-cpu-set:
cpu: [ "1-10" ] # include only these CPUs in affinity settings
- receive-cpu-set:
cpu: [ "0-10" ] # include only these CPUs in affinity settings
- worker-cpu-set:
cpu: [ "18-35", "54-71" ]
mode: "exclusive"
prio:
low: [ 0 ]
medium: [ "1" ]
high: [ "18-35","54-71" ]
default: "high"
So I configured my affinity setup like this, because my layout is pretty different.
cpu-affinity:
- management-cpu-set:
cpu: [ 18,19 ] # include only these CPUs in affinity settings
- receive-cpu-set:
cpu: [ 1,2 ] # include only these CPUs in affinity settings
- worker-cpu-set:
cpu: [ "0,2,4,6,8,10,12,14,16", "1,3,5,7,9,11,13,15,17" ]
mode: "exclusive"
# Use explicitly 3 threads and don't compute number by using
# detect-thread-ratio variable:
# threads: 3
prio:
low: [ 0 ]
medium: [ "1-10" ]
high: [ "0,2,4,6,8,10,12,14,16", "1,3,5,7,9,11,13,15,17" ]
default: "high"
That config is not parsed correctly. It only works when it’s a consecutive incremental range, such as “18-35”. But not e.g. “0,2,4,6”.
Error: affinity: worker-cpu-set: invalid cpu range (not an integer): "0,2,4,6,8,10,12,14,16"
How exactly should I read this? Obviously, when I remove the quotes, it’s not a string anymore. Then it is able to read the line. But then the NUMA layout is not correct. Then it’s just actually “0-17”, but then just “0,1,2,3,4,etc.” For best tuning, 2 NUMA nodes should be defined so that locality is used and it becomes more efficient.