Currently I use dpdk for packet capturing. But I’m experiencing very high packet loss and I don’t know why.
This is the situation:
I use tcpreplay to replay a pcap file with 50 million packets at top speed with following command:
sudo tcpreplay -i eno4 -t test.pcap
on another machine I use suricata+dpdk to process all the packet. The two servers are connected with fiber.
my server looks like:
Suricata version: 7.0.2-release (compiled from source with dpdk support)
Linux version: Ubuntu 22.04 jammy
Kernel version: x86_64 Linux 5.15.0-91-generic
RAM: 128 GB
CPU: Intel Xeon E5-2630 v4 @ 40x 3.1GHz
NIC:
04:00.0 Ethernet controller: Intel Corporation Ethernet Controller X710 for 10GbE SFP+ (rev 02)
04:00.1 Ethernet controller: Intel Corporation Ethernet Controller X710 for 10GbE SFP+ (rev 02)
DPDK: 21.11.4-0ubuntu0.22.04.1 amd64 (install from apt, precompiled)
NIC Driver: vfio without iommu
system load without running suricata: 0.11 0.29 1.80
lscpu output looks like:
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Address sizes: 46 bits physical, 48 bits virtual
Byte Order: Little Endian
CPU(s): 40
On-line CPU(s) list: 0-39
Vendor ID: GenuineIntel
Model name: Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz
CPU family: 6
Model: 79
Thread(s) per core: 2
Core(s) per socket: 10
Socket(s): 2
Stepping: 1
CPU max MHz: 3100.0000
CPU min MHz: 1200.0000
BogoMIPS: 4400.02
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts re p_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx sm x est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadli ne_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cdp_l3 in vpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase t sc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cqm rdt_a rdseed adx smap intel_pt xsaveop t cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dtherm ida arat pln pts md_clear flush_l1 d
Virtualization features:
Virtualization: VT-x
Caches (sum of all):
L1d: 640 KiB (20 instances)
L1i: 640 KiB (20 instances)
L2: 5 MiB (20 instances)
L3: 50 MiB (2 instances)
NUMA:
NUMA node(s): 2
NUMA node0 CPU(s): 0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38
NUMA node1 CPU(s): 1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39
Vulnerabilities:
Gather data sampling: Not affected
Itlb multihit: KVM: Mitigation: VMX disabled
L1tf: Mitigation; PTE Inversion; VMX conditional cache flushes, SMT vulnerable
Mds: Mitigation; Clear CPU buffers; SMT vulnerable
Meltdown: Mitigation; PTI
Mmio stale data: Mitigation; Clear CPU buffers; SMT vulnerable
Retbleed: Not affected
Spec rstack overflow: Not affected
Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp
Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Spectre v2: Mitigation; Retpolines, IBPB conditional, IBRS_FW, STIBP conditional, RSB filling, PBRSB-eIBR S Not affected
Srbds: Not affected
Tsx async abort: Mitigation; Clear CPU buffers; SMT vulnerable
my suricata.yml:
suricata.yaml (83.3 KB)
Suricata console output:
EAL: No available 2048 kB hugepages reported
TELEMETRY: No legacy callbacks, legacy socket not created
i: conf: unable to find interface default in DPDK config
i: log-pcap: Ring buffer initialized with 3 files.
i: log-pcap: Ring buffer initialized with 2 files.
i: log-pcap: Ring buffer initialized with 2 files.
i: log-pcap: Ring buffer initialized with 2 files.
i: log-pcap: Ring buffer initialized with 2 files.
i: log-pcap: Ring buffer initialized with 3 files.
i: log-pcap: Ring buffer initialized with 2 files.
i: log-pcap: Ring buffer initialized with 2 files.
i: log-pcap: Ring buffer initialized with 2 files.
i: log-pcap: Ring buffer initialized with 4 files.
i: log-pcap: Ring buffer initialized with 2 files.
i: log-pcap: Ring buffer initialized with 3 files.
i: log-pcap: Ring buffer initialized with 2 files.
i: log-pcap: Ring buffer initialized with 2 files.
i: log-pcap: Ring buffer initialized with 3 files.
i: log-pcap: Ring buffer initialized with 31 files.
i: log-pcap: Ring buffer initialized with 2 files.
i: log-pcap: Ring buffer initialized with 2 files.
i: log-pcap: Ring buffer initialized with 2 files.
i: threads: Threads created → W: 19 FM: 1 FR: 1 Engine started.
^Ci: suricata: Signal Received. Stopping engine.
i: device: 0000:04:00.1: packets: 52680614, drops: 11729350 (22.27%), invalid chksum: 106
stats.log:
capture.packets | Total | 52680614
capture.rx_errors | Total | 11729350
capture.dpdk.imissed | Total | 11729350
decoder.pkts | Total | 40951264
decoder.bytes | Total | 5645069841
decoder.invalid | Total | 121
decoder.ipv4 | Total | 40563972
decoder.ipv6 | Total | 323342
decoder.ethernet | Total | 40951591
I’ve tried many differet settings but I still experienced 20% packet loss, can anyone help me?