My server goes crazy with the CPU when I reload fail2ban
and sometimes mid day as well the CPU goes very high.
I remember a while ago I was told to switch to systemd
, any idea on how to do it?
My server goes crazy with the CPU when I reload fail2ban
and sometimes mid day as well the CPU goes very high.
I remember a while ago I was told to switch to systemd
, any idea on how to do it?
Most likely it is because of amount of data written to Freeswitch log. If you have lot of voip traffic, there will be lot of data written to log at high rate. Fail2ban has to scan all of that. Adjusting Freeswitch logging level to write less might help to reduce CPU usage. It will also improve IO performance. When you restart fail2ban it rescans its database to load and block previously saved IP addresses. Most likely it is huge in your case. You can stop fail2ban and remove that database to speedup fail2ban startup. Use
fail2ban-client get dbfile
to find fail2ban database location.