OPNsense Forum

Archive => 21.7 Legacy Series => Topic started by: Leviathan on August 20, 2021, 04:19:51 pm

Title: 21.7.1 and high swap usage
Post by: Leviathan on August 20, 2021, 04:19:51 pm
Hi guys, after the upgrade to 21.7.1 I've noticed a very high consumption of ram and swap: ram over 50% and swap, after a couple of days of activity, at 99%  :o.
Clearly this problem is solved by restarting, but in all these years of use it had never happened to me. It is absolutely not a machine problem, as it mounts an i5-9400F with 16 Gb of ram. Reading on the net someone suggestedd to disable the ipv6, but I currently, on this infrastructure, don't use it.
Has it happened to others? Thanks for the answers.
Title: Re: 21.7.1 and high swap usage
Post by: pyrodex on August 20, 2021, 06:05:38 pm
Hi guys, after the upgrade to 21.7.1 I've noticed a very high consumption of ram and swap: ram over 50% and swap, after a couple of days of activity, at 99%  :o.
Clearly this problem is solved by restarting, but in all these years of use it had never happened to me. It is absolutely not a machine problem, as it mounts an i5-9400F with 16 Gb of ram. Reading on the net someone suggestedd to disable the ipv6, but I currently, on this infrastructure, don't use it.
Has it happened to others? Thanks for the answers.

I've also noticed this but for me this is tied to the Maltrail application's sensor python script. The moment I restart the sensor the memory is back to around 7% which is my average. I didn't have this problem prior to 21.7.1 and have put in a daily job to restart maltrail to get it back to normal.
Title: Re: 21.7.1 and high swap usage
Post by: cookiemonster on August 20, 2021, 10:59:56 pm
Yes it would be helpful to know which services are running.
Title: Re: 21.7.1 and high swap usage
Post by: Leviathan on August 21, 2021, 01:05:27 am
This is the list of services now running:
Title: Re: 21.7.1 and high swap usage
Post by: ad1m on August 21, 2021, 10:00:25 am
You are not alone in this situation  :D
Check this https://forum.opnsense.org/index.php?topic=24345.0 (https://forum.opnsense.org/index.php?topic=24345.0)
Title: Re: 21.7.1 and high swap usage
Post by: Leviathan on September 03, 2021, 11:52:30 pm
Good evening guys. To date, I still do not think there is an official solution to the problem, nor can I understand what actually is the service that is causing the exhaustion of swap memory. Currently I can solve the problem every 5-6 days with a restart of the firewall... which turns out to be really annoying  :'(...
Title: Re: 21.7.1 and high swap usage
Post by: opn_nwo on September 04, 2021, 03:58:27 am
Same here. Mine arrive 99% swap usage and even if everything was still working I rebooted to clear it up.
As mentioned by others it's Maltrail. My workaround is to restart the service at least once a day. Hopefully it will be patched eventually.
Title: Re: 21.7.1 and high swap usage
Post by: jimjohn on September 04, 2021, 11:13:21 am
Good evening guys. To date, I still do not think there is an official solution to the problem, nor can I understand what actually is the service that is causing the exhaustion of swap memory. Currently I can solve the problem every 5-6 days with a restart of the firewall... which turns out to be really annoying  :'(...

You could make it less annoying by using a cron script.