Hi all,
I am following GitHub - pevma/SEPTun-Mark-II: Suricata Extreme Performance Tuning guide - Mark II to build a Suricata NSM.
I expect performance can be 10Gbps, but currently my setup can only handle about 6Gbps with 0% kernel drops. When I try increase network traffic to 7Gbps, the kernel drops start to increase and i could see 50%. Any help or general optimization tips appreciated!
Here is my setup:
- Suricata 6.0.2 build from source
- OS: Debian 9.5
- Intel(R) Xeon(R) Silver 4214R CPU @ 2.40GHz
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 48
On-line CPU(s) list: 0-47
Thread(s) per core: 2
Core(s) per socket: 12
Socket(s): 2
NUMA node(s): 2
Vendor ID: GenuineIntel
CPU family: 6
Model: 85
Model name: Intel(R) Xeon(R) Silver 4214R CPU @ 2.40GHz
Stepping: 7
CPU MHz: 2400.000
BogoMIPS: 4800.00
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 1024K
L3 cache: 16896K
NUMA node0 CPU(s): 0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46
NUMA node1 CPU(s): 1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47
- 64GB RAM
- HPE Ethenet 10Gb 2-port 557SFP+. Card installed into NUMA node 1. I am only using 1 port now. NIC configures as below:
ifconfig enp175s0f1 down
ethtool -L enp175s0f1 combined 16
ethtool -K enp175s0f1 rxhash on
ethtool -K enp175s0f1 ntuple on
ifconfig enp175s0f1 up
./set_irq_affinity 17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47 enp175s0f1
ethtool -X enp175s0f1 hkey 6D:5A:6D:5A:6D:5A:6D:5A:6D:5A:6D:5A:6D:5A:6D:5A:6D:5A:6D:5A:6D:5A:6D:5A:6D:5A:6D:5A:6D:5A:6D:5A:6D:5A:6D:5A:6D:5A:6D:5A equal 16
ethtool -A enp175s0f1 rx off tx off
ethtool -C enp175s0f1 adaptive-rx off adaptive-tx off
ethtool -G enp175s0f1 rx 1024
for proto in tcp4 udp4 tcp6 udp6; do
echo “ethtool -N enp175s0f1 rx-flow-hash $proto sdfn”
ethtool -N enp175s0f1 rx-flow-hash $proto sdfn
done
- I am using DPDK-Pktgen tool to replay pcap files to mirror port of NSM.
- AF-packet configuration in suricata.yaml
af-packet:
- interface: enp175s0f1
threads: 16
cluster-id: 99
cluster-type: cluster_qm
defrag: yes
use-mmap: yes
mmap-locked: yes
tpacket-v3: yes
ring-size: 600000
block-size: 1048576
- CPU affinity in suricata.yaml
cpu-affinity:
- management-cpu-set:
cpu: [ "1,3,5,7,9,11,13,15" ] # include only these CPUs in affinity settings
- receive-cpu-set:
cpu: [ "0-10" ] # include only these CPUs in affinity settings
- worker-cpu-set:
cpu: [ "17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47" ]
mode: "exclusive"
# Use explicitly 3 threads and don't compute number by using
# detect-thread-ratio variable:
#threads: 12
prio:
#low: [ 0 ]
medium: [ "0-3" ]
high: [ "17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47" ]
default: "high"
suricata_tuning_1card.yaml (72.7 KB)