1
23.7 Legacy Series / Re: CPU Performance after 23.7 upgrade
« on: August 23, 2023, 10:58:36 pm »
I tracked this majority of the extra CPU usage to the new gateway_watcher.php script on my firewall. I made a temporary fix by editing that script (it is at "/usr/local/opnsense/scripts/routes/gateway_watcher.php") and changed the line near the beginning from "$poll = 1; /* live poll interval */" to "$poll = 5; /* live poll interval */" to go from 1 second polling to 5 second polling and it dropped the usage down to around 4% 5 minute average from the 12% average I was seeing at the default polling.
It looks like that script forces a refresh of the configuration and parses it every second by default and if you have a large configuration it can impact the CPU significantly.
It looks like that script forces a refresh of the configuration and parses it every second by default and if you have a large configuration it can impact the CPU significantly.