[Oisf-devel] [PATCH 1/6] yaml: add config for cpu_affinity

Eric Leblond eleblond at edenwall.com
Fri Nov 12 11:05:02 UTC 2010


This patch introduces the configuration part of cpu_affinity
evolution. The idea is to have thread families (receive, stream, ...)
and to be able to specify for each of them:
 - The cpus to use
 - The mode of balancing between the cpus
 - The thread priority to use (value of nice)

Signed-off-by: Eric Leblond <eleblond at edenwall.com>
---
 suricata.yaml |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/suricata.yaml b/suricata.yaml
index f805e55..1c5d129 100644
--- a/suricata.yaml
+++ b/suricata.yaml
@@ -133,6 +133,23 @@ threading:
   # On Intel Core2 and Nehalem CPU's enabling this will degrade performance.
   #
   set_cpu_affinity: no
+  # Tune cpu affinity of suricata threads. Each family of threads can be bound
+  # on specific CPUs.
+  cpu_affinity:
+    - receive_cpu_set:
+        cpu: [ 0 ]  # include only these cpus in affinity settings
+    - decode_cpu_set:
+        cpu: [ 0, 1 ]
+        mode: "balanced"
+    - stream_cpu_set:
+        cpu: [ "0-1" ]
+    - detect_cpu_set:
+        cpu: [ "all" ]
+        mode: "exclusive" # run detect threads in these cpus
+    - verdict_cpu_set:
+        cpu: [ 0 ]
+    - output_cpu_set:
+        cpu: [ "all" ]
   #
   # By default Suricata creates one "detect" thread per available CPU/CPU core.
   # This setting allows controlling this behaviour. A ratio setting of 2 will
-- 
1.7.2.3




More information about the Oisf-devel mailing list