What could be wrong here as I am at a loss.
Biggest issue is that suricata is always being killed at midnight due to CPU usage.
Thanks in advance for the insight.
Hi, I have some initial questions.
How much traffic are you processing?
Does the traffic peak around the time Suricata gets killed?
Out of curiosity, what kills Suricata due to CPU usage?
Hyperscan will give a huge lift on performance - this may not solve your immediate issues, but will help.
Rule profiling increases the CPU load – not significantly, but there is an impact.
AF-PACKET is configured to use 12 threads
You’re using workers mode – you don’t need to configure receive-cpu-set worker-cpu-set has more cores allocated than threads from the af-packet configuration.
There’s only 2 managers – yet 9 cores reserved for the management-cpu-set. There is one flow manager and one flow recycler.
It would be better if you upload those files here, so everyone can help. Feel free to remove sensitive parts.
I can also encourage to run a test with hyperscan, it looks like a more recent CentOS so should be doable.
Especially from the perf top output it seems to be an issue with the mpm ac-ks
Thank you all for your feedback. This was helpful till a certain extend. Based on Suricata 6 with Hyperscan on CentOS 7 I have been able to install Hyperscan.
Mem begins low but CPU is at 100% and climbs up to a 1000+!
Keep in mind that htop by default starts the count with 1 instead of 0 while the system and also Suricata use the cpu starting with 0. So I would argue that the worker threads are the busy ones.
Can you enable “show custom thread names” in htop and post the output?
Decided to go back to scratch and reinstall Suricata.
When running it stopped recognizing “Hyperscan” which I thought was odd.
Did a test on my hyperscan which came back without errors (based on hyperscan.io documentation).
Reinstalled Suricata again but added:
–with-libhs-includes=/usr/local/include/hs/ --with-libhs-libraries=/usr/local/lib
to:
sudo ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --enable-nfqueue --enable-lua
than did: sudo make && make install-full
AND sudo ldconfig.
Finger crossed but by now it seems to be working.
What needs to be done with hyperscan (besides running Suricata without rules to see the difference) is reinstalling Suricata to ensure all the connections are properly made.