Dashboard very slow to load - 6100
-
This problem is not specific to the 6100, but it's noticable there so I am posting it here.
I have a fairly standard dashboard layout (System Info, Traffic Graph, Interfaces, Gateways, Services status, Firewall blocked conns)
It takes about 4.5 seconds between clicking the pfSense logo to the page being fully loaded. In comparison, a 1537 I set up this past weekend loads a similar layout in about 0.75 seconds. I know these are vastly different in terms of CPU power but in general, is there anything I can do to debug what specific PHP code is taking so long?
If I delete ALL of my widgets except for System Info, the page load drops to <1s. I know that Interfaces is one of the culprits, as well as Firewall Logs. I'm guessing there is some work that could be done to tighten those up. I haven't looked but it seems like Firewall Logs might be loading the entire logfile (which on my system is 10MB) instead of just
tail
'ing out the last XX lines? And not sure what Interfaces is doing but it adds ~2s just on its own. There are some threads about that here, here and here from 2019-2020.What about using Xdebug etc to do some profiling of the PHP execution? Is that still possible with the latest snapshots? I played around in 2018 hooking it up via VSCode extension, but not recently.
-
The 7100 is a special case because the interfaces widget gas to poll the switch port status and that is slow.
4.5s seems pretty slow for the 6100 though. I have a load of widgets up on one here and it takes ~3s, maybe slightly less. Unless you're counting the CPU usage and update check etc which can take quite a but longer.Steve
-
@stephenw10 Forgot to mention, I disabled the update check specifically for that reason. So that's ~4s even without the update check. What about the profiling part -- do you think that's possible at all? I remember there was a way to load the xdebug php module, seems https://docs.netgate.com/pfsense/en/latest/development/additional-php-modules.html mentions it.
-
It's not something I've ever tried. Might be better to ask in Development.
-
-
@stephenw10 gotcha. I just posted over there.