Project

General

Profile

Actions

Bug #7137

open

"invalid cpu range" when trying to use CPU affinity

Added by UPPER KEES 6 months ago. Updated 6 months ago.

Status:
New
Priority:
Normal
Assignee:
Target version:
Affected Versions:
Effort:
Difficulty:
Label:

Description

More info: https://forum.suricata.io/t/cpu-affinity-with/4615

In a nutshell, I have this NUMA layout:


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

The documentation (https://docs.suricata.io/en/latest/performance/high-performance-config.html) shows the following:

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" 

When I apply this line high: [ "0,2,4,6,8,10,12,14,16", "1,3,5,7,9,11,13,15,17" ], Suricata fails to start with the error:

Error: affinity: worker-cpu-set: invalid cpu range (not an integer): "0,2,4,6,8,10,12,14,16" 

How can I define these NUMA nodes? The documentation shows a way, but the software does not accept it in the configuration. Only consequtive CPU ranges work, e.g. "0-5", "10-15", but that's not how my NUMA looks like.

I'm using Debian 12 with Suricata 7.0.6-1~bpo12+1.


Related issues 2 (2 open0 closed)

Related to Suricata - Feature #6805: cpu-affinity: enhance CPU affinity logic with per-interface NUMA preferencesIn ProgressLukas SismisActions
Related to Suricata - Feature #7036: DPDK NUMA setup: choose correct CPUs from worker-cpu-setIn ProgressLukas SismisActions
Actions

Also available in: Atom PDF