Actions
Bug #3771
open
AT
OD
Extreme performance degradation when doing IP-only rules with flow-keyword
Bug #3771:
Extreme performance degradation when doing IP-only rules with flow-keyword
Affected Versions:
Effort:
Difficulty:
Label:
Description
I did a brief test and found out an issue when doing large sets of IP-only rules.
Following IP-only rules seem to cause a problem while same rules without flow-keyword are fine.
alert ip any any -> 10.0.0.0 any (msg: "test 1"; flow: stateless; sid: 1;) alert ip any any -> 10.0.0.1 any (msg: "test 2"; flow: stateless; sid: 2;) alert ip any any -> 10.0.0.2 any (msg: "test 3"; flow: stateless; sid: 3;)
Below is a test run with attached pcap and rules files. I'd expect the flow.rules would perform a bit worse than plain.rules but it turns out flow.rules takes a magnitude longer.
root@telakka:/usr/local/etc/suricata/prof# time suricata -r flowtest.pcap --runmode single -S flow.rules 15/6/2020 -- 15:15:13 - <Notice> - This is Suricata version 5.0.3 RELEASE running in USER mode 15/6/2020 -- 15:15:15 - <Notice> - all 1 packet processing threads, 2 management threads initialized, engine started. 15/6/2020 -- 15:15:26 - <Notice> - Signal Received. Stopping engine. 15/6/2020 -- 15:15:26 - <Notice> - Pcap-file module read 1 files, 2000 packets, 1709602 bytes real 0m13.543s user 0m13.493s sys 0m0.075s root@telakka:/usr/local/etc/suricata/prof# time suricata -r flowtest.pcap --runmode single -S plain.rules 15/6/2020 -- 15:15:34 - <Notice> - This is Suricata version 5.0.3 RELEASE running in USER mode 15/6/2020 -- 15:15:36 - <Notice> - all 1 packet processing threads, 2 management threads initialized, engine started. 15/6/2020 -- 15:15:36 - <Notice> - Signal Received. Stopping engine. 15/6/2020 -- 15:15:36 - <Notice> - Pcap-file module read 1 files, 2000 packets, 1709602 bytes real 0m1.581s user 0m1.301s sys 0m0.277s
I have attached relevant pcap and rule files. Extract the rules and pcap into any directory and run:
Files
Actions