OPNsense Forum

Archive => 24.1, 24.4 Legacy Series => Topic started by: AJSNet on March 05, 2024, 05:38:39 PM

Title: OPNSense periodically hangs/stalls/100% CPU (VM/Unraid/Ryzen/e1000)
Post by: AJSNet on March 05, 2024, 05:38:39 PM
I spun up an Opnsense VM on Unraid and have noticed approximately every 30-60 seconds the WebUI hangs for about 5-10 seconds and then resumes. When configuring the firewall and I started to notice occasionally the page would not be responsive after clicking "save". I was able to confirm the strangeness on the Dashboard where the traffic graph would have an anomalous drop/blank area and then once it recovered the CPU would spike to 100% before returning to <5%. See attachment.

Here are some of the observations and steps I have tried to resolve:
-There is no load on FW, no traffic is being sent through it
-Threw more CPU and RAM which had no effect (AMD CPU)
-I have dedicated CPU cores to this VM and no others
-Unraid host does not see CPU spikes
-Configured hypervisor to use e1000 as the card is an HP/Intel chipset
-Unchecked disable hardware... options and enabled VLAN Hardware Filtering

My Google-fu has not found anything similar and I am hoping the community can help.

Opnsense 24.1.2_1
Title: Re: OPNSense periodically hangs/stalls/100% CPU (VM/Unraid/Ryzen/e1000)
Post by: johndchch on March 05, 2024, 08:01:12 PM
try PCIe passthru for the NIC - my guess is you've got issues somewhere in the unraid emulated NIC implementation
Title: Re: OPNSense periodically hangs/stalls/100% CPU (VM/Unraid/Ryzen/e1000)
Post by: AJSNet on March 07, 2024, 12:51:41 AM
Thank you for the reply. I have gone ahead and created a similar forum post on the Unraid side. Passthrough likely would work, however the Virtual firewall is to protect containers/VMs on the Unraid server, so I need to bridge via the unraid/KVM layer.
Title: Re: OPNSense periodically hangs/stalls/100% CPU (VM/Unraid/Ryzen/e1000)
Post by: AJSNet on March 07, 2024, 10:54:24 PM
Ive been doing some more digging as I'm still struggling to understand root cause.

Here are a few other observations I've had that hopefully sparks a solution.

Python3.9
Within OPNSense CLI, when I run TOP and watch for the GUI hanging and then CPU going to 100%, I notice in top python3.9 spikes from <1% to 65%. What is python doing under the hood?

Cron/Root User
Leveraging Netdata agent, I can see that the CPU spikes once a minute from Cron with either user: root or wheel. In the GUI there is no cronjobs but I do see at the OS level a few that run at that frequency, but don't seem like they are doing anything to cause the hanging.

Any other suggestions of where I can look to determine root cause?
Title: Re: OPNSense periodically hangs/stalls/100% CPU (VM/Unraid/Ryzen/e1000)
Post by: bestboy on March 08, 2024, 07:29:21 AM
Lots of stuff uses python

top -CHiPSaz