Config.xml too big -> php eats the CPU

  • I have pfs 2.1 64bit with ~1000 site to site IPsec tunnels configured on machine with Intel Pentium E5300, which is not the fastest CPU in the world but it's not enough to parse the 1.5MB config.xml configuration in reasonable time…
    Loading the dashboard if I have IPsec status on takes ~2-3mins, and in that time php is pressuring the CPU at 100%. The same when I go to Status>IPsec

    Is there any good practices in such case or is there anything I can do (maybe some php optimization) besides upgrading the CPU? Someone else with similar issue?

  • Rebel Alliance Developer Netgate

    There isn't much you could do for that short of tossing more CPU at it.

    The IPsec status code might need some optimization, it does have to go over and over the entire status output a few times to build things up, so as the number of tunnels increases, the GUI status will be slower. I'm not sure if there is a more efficient way to build the status output though, it's been a few years since I looked at that code.

Log in to reply