I hope this message finds you well. I’m reaching out to seek assistance regarding a significant performance issue I’ve been experiencing with Suricata version 7.0.7 RELEASE running in IDS mode on my system. Specifically, I’m encountering a high packet drop rate (~45%) when operating in DPDK run mode, whereas the performance with AF_PACKET is notably better.
System Overview
- Suricata Version: 7.0.7 installed from source
- Operating Mode: IDS
- Hardware Specifications:
- CPU: 20 cores (cores 0-19)
$ lscpu -e
CPU NODE SOCKET CORE L1d:L1i:L2:L3 ONLINE MAXMHZ MINMHZ MHZ
0 0 0 0 0:0:0:0 si 4900,0000 800,0000 800.000
1 0 0 0 0:0:0:0 si 4900,0000 800,0000 800.000
2 0 0 1 4:4:1:0 si 4900,0000 800,0000 800.000
3 0 0 1 4:4:1:0 si 4900,0000 800,0000 800.000
4 0 0 2 8:8:2:0 si 4900,0000 800,0000 800.000
5 0 0 2 8:8:2:0 si 4900,0000 800,0000 800.000
6 0 0 3 12:12:3:0 si 4900,0000 800,0000 800.000
7 0 0 3 12:12:3:0 si 4900,0000 800,0000 800.000
8 0 0 4 16:16:4:0 si 5000,0000 800,0000 800.000
9 0 0 4 16:16:4:0 si 5000,0000 800,0000 800.574
10 0 0 5 20:20:5:0 si 5000,0000 800,0000 800.000
11 0 0 5 20:20:5:0 si 5000,0000 800,0000 800.000
12 0 0 6 24:24:6:0 si 4900,0000 800,0000 848.286
13 0 0 6 24:24:6:0 si 4900,0000 800,0000 800.000
14 0 0 7 28:28:7:0 si 4900,0000 800,0000 800.000
15 0 0 7 28:28:7:0 si 4900,0000 800,0000 800.000
16 0 0 8 36:36:9:0 si 3800,0000 800,0000 800.000
17 0 0 9 37:37:9:0 si 3800,0000 800,0000 800.000
18 0 0 10 38:38:9:0 si 3800,0000 800,0000 800.000
19 0 0 11 39:39:9:0 si 3800,0000 800,0000 800.001
- Network Interface: Intel X540-T2 with
vfio-pci
driver. - PCI Address: 0000:05:00.0 (Cause of the
vfio-pci
, it has no IP address) - OS: ubuntu 22.04
- Memory: 64 GB
- HugePages: 4096 GB
$ grep Huge /proc/meminfo
AnonHugePages: 0 kB
ShmemHugePages: 8192 kB
FileHugePages: 0 kB
HugePages_Total: 4096
HugePages_Free: 4095
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
Hugetlb: 8388608 kB
- Files:
- suricata.yaml: Attached
- suricata.log: Attached
Suricata Configuration Highlights
Below are the key configurations from my suricata.yaml
that pertain to this issue:
dpdk:
eal-params:
proc-type: primary
allow: ["0000:05:00.0"]
interfaces:
- interface: 0000:05:00.0
threads: 8
promisc: true
multicast: false
checksum-checks: false
checksum-checks-offload: false
mtu: 1500
mempool-size: 262144
mempool-cache-size: 512
rx-descriptors: 4096
tx-descriptors: 4096
copy-mode: none
copy-iface: none
rss-hash-functions: auto
threading:
set-cpu-affinity: yes
cpu-affinity:
- management-cpu-set:
cpu: [16,17]
- receive-cpu-set:
cpu: [18]
- verdict-cpu-set:
cpu: [19]
- worker-cpu-set:
cpu: [0,2,4,6,8,10,12,14]
mode: exclusive
prio:
default: high
detect-thread-ratio: 1.0
stack-size: 8mb
Additional Notable Configurations:
- Mempool Configuration:
mempool-size
: 262144mempool-cache-size
: 512
- RX and TX Descriptors:
- Both set to 4,096 per queue
- Threading:
- 8 worker threads assigned to cores
0,2,4,6,8,10,12,14
- Management, receive, and verdict threads assigned to cores 16, 17, 18, and 19 respectively
- 8 worker threads assigned to cores
- App-Layer Protocols:
- Multiple protocols enabled (HTTP, TLS, SSH, etc.) with specific detection ports
- Runmode: Workers
Observed Performance Issues
When running Suricata in DPDK mode, the following metrics were observed from the logs:
- Total Packets Received: ~17,559,078
- Packets Dropped (
rx_missed_errors
): ~7,943,058 - Packet Drop Percentage: Approximately 45.24%
Comparison with AF_PACKET Mode:
- In AF_PACKET mode, the packet drop rate is significantly lower, and overall performance is more stable and efficient.
- Total packets: 17,796,504
- Drops: 3,787,138
- Percentage: 21.28%
Requests for Assistance
Given the complexity of the issue and the critical nature of maintaining low packet drop rates for effective intrusion detection, I kindly request the community’s assistance with the following:
-
Configuration Review:
- Please review the attached
suricata.yaml
andsuricata.log
files to identify any misconfigurations or areas for optimization that I might have overlooked.
- Please review the attached
-
Additional Optimization Tips:
- Any other settings or optimizations that could help reduce the packet drop rate and enhance Suricata’s performance in DPDK mode.
Attached Files
For your reference and detailed analysis, I have attached the following files:
- suricata.yaml: Comprehensive configuration file outlining all current settings.
- suricata.log: Log output capturing the initialization, configuration, and performance metrics during a run in DPDK mode.
Best regards,
Álvaro