[Oisf-devel] [PATCH 04/10] yaml: add config for cpu_affinity
Eric Leblond
eleblond at edenwall.com
Sun Nov 21 13:30:47 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 | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/suricata.yaml b/suricata.yaml
index 7390b2e..84a8906 100644
--- a/suricata.yaml
+++ b/suricata.yaml
@@ -138,6 +138,25 @@ 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:
+ - management_cpu_set:
+ cpu: [ 0 ] # include only these cpus in affinity settings
+ - 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