Project

General

Profile

Actions

Support #3119

closed

help optimizing suricata in af-packet mode for 30gbps+ traffic

Added by Srijan Nandi over 4 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Normal
Affected Versions:
Label:

Description

Hello Everyone,

I am trying to setup suricata for a high speed network. I am using T-Rex to test traffic on suricata, but am not able to get the desired throughput and incurring heavy packet drops and tcp.reassembly-gaps.

My setup - Suricata version 5.0.0-dev (3a912446a 2019-07-22) using Mellanox ConnectX®-5 100GbE Single/Dual-Port Adapters.
Debian Version 9.9
Kernel Version 4.9.0-9-amd64

My questions are:

1. What should be the ideal ring-size? Should I increase ring-size on af-packet and keep Ring parameters on NIC to 1024 or small. It can go up to 8196 on the Mellanox cards.

Current ring size - ring-size: 500000

2. CPU affinity is set as per NUM Node.

NUMA node0 CPU: 0-19,40-59
NUMA node1 CPU: 20-39,60-79

cat /sys/class/net/ens2f0/device/numa_node
0
cat /sys/class/net/ens2f1/device/numa_node
0

CPU affinity on suricata:
set-cpu-affinity: yes #
cpu-affinity:
- management-cpu-set:
cpu: [ 0,1,2,20 ] # include only these CPUs in affinity settings
mode: "exclusive"
prio:
default: "high"
- worker-cpu-set:
cpu: [ "3-19","40-59" ]
mode: "exclusive"
prio:
default: "high" #
detect-thread-ratio: 1.0

3. Tried compiling with XDP filter, but not much changed, therefore changed cluster-type to cluster_flow. Currently running on 4.9.0-9-amd64, so had to recompile suricata on kernel 4.19, to get XDP working. But as nothing changed, revert back to 4.9.

My suricata.yaml file is attached.


Files

suricata.yaml (34.1 KB) suricata.yaml suricata.yaml Srijan Nandi, 08/19/2019 04:26 PM
suricata.yaml (34 KB) suricata.yaml suricata.yaml Srijan Nandi, 08/20/2019 12:16 AM
suricata.yaml (34 KB) suricata.yaml suricata.yaml Srijan Nandi, 08/23/2019 01:41 PM
suricata.txt (33.6 KB) suricata.txt suricata.yaml Srijan Nandi, 08/27/2019 01:51 PM
sysctl.conf (1.69 KB) sysctl.conf sysctl.conf Srijan Nandi, 08/27/2019 02:11 PM
suricata.yaml (8.44 KB) suricata.yaml suricata.yaml Srijan Nandi, 08/31/2019 06:17 AM
sysctl.txt (1.74 KB) sysctl.txt sysctl.conf Srijan Nandi, 08/31/2019 06:18 AM
nic_settings.txt (1.63 KB) nic_settings.txt nic settings Srijan Nandi, 08/31/2019 06:19 AM
Screenshot 2019-08-30 at 8.46.30 pm.png (278 KB) Screenshot 2019-08-30 at 8.46.30 pm.png CPU Graph Srijan Nandi, 08/31/2019 06:20 AM
suricata.yaml (9.54 KB) suricata.yaml Latest suricata.yaml Srijan Nandi, 09/06/2019 06:38 AM
suricata.yaml(40).txt (9.49 KB) suricata.yaml(40).txt suricata.yaml with 40 threads Srijan Nandi, 09/15/2019 08:27 AM
suricata.log(40).txt (5.17 KB) suricata.log(40).txt suricat.log with 40 threads Srijan Nandi, 09/15/2019 08:27 AM
stats.log(40).txt (215 KB) stats.log(40).txt stats.log with 40 threads Srijan Nandi, 09/15/2019 08:28 AM
suricata.yaml(60).txt (9.5 KB) suricata.yaml(60).txt suricata.yaml with 60 threads Srijan Nandi, 09/15/2019 08:28 AM
suricata.log(60).txt (6.54 KB) suricata.log(60).txt suricata.log with 60 threads Srijan Nandi, 09/15/2019 08:28 AM
stats.log(60).txt (193 KB) stats.log(60).txt stats.log with 60 threads Srijan Nandi, 09/15/2019 08:28 AM
suricata.yaml.txt (8.87 KB) suricata.yaml.txt Latest suricata.yaml with stream.memcap:4gb and reassembly.memcap:10gb Srijan Nandi, 09/20/2019 08:01 AM
stats-1.txt (7.86 KB) stats-1.txt stats.log Srijan Nandi, 09/20/2019 08:02 AM
Screenshot 2019-09-22 at 12.12.57 am.png (572 KB) Screenshot 2019-09-22 at 12.12.57 am.png htop - 1 Srijan Nandi, 09/21/2019 06:58 PM
Screenshot 2019-09-22 at 12.14.07 am.png (610 KB) Screenshot 2019-09-22 at 12.14.07 am.png htop - 2 Srijan Nandi, 09/21/2019 06:58 PM
ethtool -i.txt (549 Bytes) ethtool -i.txt ethtool -i Srijan Nandi, 09/21/2019 06:58 PM
ethtool -k.txt (3.11 KB) ethtool -k.txt ethtool -k Srijan Nandi, 09/21/2019 06:58 PM
ethtool -l.txt (350 Bytes) ethtool -l.txt ethtool -l Srijan Nandi, 09/21/2019 06:58 PM
ethtool -S.txt (195 KB) ethtool -S.txt ethtool -S Srijan Nandi, 09/21/2019 06:58 PM
Screenshot 2019-09-22 at 12.13.34 am.png (465 KB) Screenshot 2019-09-22 at 12.13.34 am.png top Srijan Nandi, 09/21/2019 06:58 PM
nic_settings.txt (1.57 KB) nic_settings.txt NIC settings script Srijan Nandi, 09/21/2019 07:03 PM
stats.xlsx (40.2 KB) stats.xlsx Test Results Srijan Nandi, 09/22/2019 10:50 AM
htop and top screenshots-1.docx (1.43 MB) htop and top screenshots-1.docx cluster_qm Srijan Nandi, 09/22/2019 10:59 AM
htop and top screenshots-2.docx (6.31 MB) htop and top screenshots-2.docx cluster_qm Srijan Nandi, 09/22/2019 11:00 AM
htop and top screenshots-3.docx (6.5 MB) htop and top screenshots-3.docx cluster_qm Srijan Nandi, 09/22/2019 11:00 AM
htop and top screenshots-5.docx (6.56 MB) htop and top screenshots-5.docx cluster_flow Srijan Nandi, 09/22/2019 11:00 AM
htop and top screenshots-4.docx (6.51 MB) htop and top screenshots-4.docx cluster_flow Srijan Nandi, 09/22/2019 11:01 AM
stats-1.xlsx (38.7 KB) stats-1.xlsx Statistics Srijan Nandi, 09/23/2019 01:41 PM
htop and top screenshots (18.6 MB) htop and top screenshots htop and top screenshots Srijan Nandi, 09/23/2019 01:41 PM
stats-1.xlsx (45 KB) stats-1.xlsx Statistics Srijan Nandi, 09/26/2019 09:36 AM
htop and top screenshots_compressed.pdf (2.06 MB) htop and top screenshots_compressed.pdf htop and top screenshots Srijan Nandi, 09/26/2019 09:39 AM
stats-1.xlsx (47.6 KB) stats-1.xlsx Statistics with 307 rules enabled Srijan Nandi, 09/29/2019 09:13 AM
stats-1.xlsx (48.4 KB) stats-1.xlsx Statistics Srijan Nandi, 10/03/2019 04:29 PM
stats.log (187 KB) stats.log stats file with zero rules Srijan Nandi, 10/04/2019 03:40 PM
Actions

Also available in: Atom PDF