suricata
suricata copied to clipboard
draft: improve CPU cores affinity to NUMA nodes
Redmine ticket: https://redmine.openinfosecfoundation.org/issues/7036
This is a draft to discuss the user and implementation details of the ticket.
Proposal for modes of assignment:
// threading.cpu-assignment:
// - legacy - assign as usual
// - auto - use hwloc to determine NUMA locality of the NIC and try to assign a core from this NUMA node.
// If it fails then use the other NUMA node.
// Using this approach e.g. on bonded devices/aliased and any other will not work
// Warn/Notify a user when device's NUMA node cannot be determined.
// Mention in the docs that NUMA locatity supports PCIe addresses and Kernel interfaces
// - manual - in workers CPU set either:
// - Specify in one line ([ "eth0@1,2,3,4,7-9", "eth1@10,11" ])
// - Specify threading in a list:
// - worker-cpu-set:
// - interface: eth0
// cpu: [ 1,2,3,4 ]
// mode: "exclusive"
// prio:
// high: [ 3 ]
// default: "medium"
The current code draft works in somewhat auto mode - it tries to pick CPU core from the NUMA node from where the interface is.
Added doc update label to not trigger QA.