pfSense Support Subscription

Author Topic: Slow Web GUI with many VLAN Interfaces - 300$  (Read 680 times)

0 Members and 1 Guest are viewing this topic.

Offline chiel

  • Newbie
  • *
  • Posts: 13
  • Karma: +2/-0
    • View Profile
Re: Slow Web GUI with many VLAN Interfaces - 300$
« Reply #15 on: November 06, 2017, 07:17:01 am »
I did some testing with multiple vlan interfaces using standard pfSense 2.4.1 to get a better view of the problem.

Boot time with 001 vlans: 0 min, 45 seconds
Boot time with 050 vlans: 0 min, 49 seconds
Boot time with 100 vlans: 0 min, 59 seconds
Boot time with 200 vlans: 1 min, 52 seconds
Boot time with 300 vlans: 4 min, 19 seconds
Boot time with 400 vlans: 9 min, 16 seconds
Boot time with 500 vlans: 13 min, 19 seconds

As you can see the boot time is not linear. Maybe this helps with finding and implementing a fix. Because a fix needs to address this non-linear groth as well. When pfSense is finshed with booting with 500 interfaces the web GUI just gives a 504 after some time. Using 400 vlan interfaces and less the web GUI is slow. Then I tried with loonylion patch which he posted October 19 in this tread using 300 vlans.

Boot time with 300 vlans, loonylion path: 3 min, 51 seconds

To GUI is slow with 300 interfaces. Even with the patch from loonylion. I didn't notice a difference.

Test where done using a Intel(R) Xeon(R) CPU E3-1585 v5 @ 3.50GHz, 16GB of memory.

Hope this helps.

Offline loonylion

  • Newbie
  • *
  • Posts: 24
  • Karma: +3/-0
    • View Profile
Re: Slow Web GUI with many VLAN Interfaces - 300$
« Reply #16 on: November 11, 2017, 04:40:19 am »
my patch will not affect boot time in the slightest, it's a GUI modification only. There must be something else at play to get those results.

Offline loonylion

  • Newbie
  • *
  • Posts: 24
  • Karma: +3/-0
    • View Profile
Re: Slow Web GUI with many VLAN Interfaces - 300$
« Reply #17 on: November 11, 2017, 04:46:15 am »
Has this been fixed in 2.4.1?

not officially, my fixes should work.

Can you please submit a Pull Request on https://github.com/pfsense/pfsense so we can review and merge the fixes?

I'll tidy up the code and try to figure out how to do this; I've never used git before.

Offline mikeisfly

  • Sr. Member
  • ****
  • Posts: 465
  • Karma: +6/-0
    • View Profile
Re: Slow Web GUI with many VLAN Interfaces - 300$
« Reply #18 on: November 11, 2017, 07:55:16 am »
I know this doesn't really solve the issue but isn't having 300+ interfaces off a firewall kind of crazy? I probably would virtualize your PfSense and have several PfSense vm's running in the same box and try to get the job done like that. Are there switches out there that can handle 300 vlans? Again I know this doesn't solve the root issue just seems like a engineering issue.

Offline loonylion

  • Newbie
  • *
  • Posts: 24
  • Karma: +3/-0
    • View Profile
Re: Slow Web GUI with many VLAN Interfaces - 300$
« Reply #19 on: November 11, 2017, 12:55:41 pm »
I'm in the process of tidying the code up and making sure it adheres to the pfSense coding guidelines. I also decided to do a bit more profiling of it, and I came up with the attached graph. At 500 VLANs the page load time with my patches is 43 seconds as measured by FireFox. The original code times out as mentioned above. Also noted above, the time doesn't increase linearly with the original code, and my graph shows that.

The graph shows page generation time, actual load time as experienced by the user will be a bit longer. These times are for viewing the interface_assign.php page; for adding an interface add ~3 seconds to page generation and for deleting add ~2 seconds.
« Last Edit: November 11, 2017, 01:01:18 pm by loonylion »

Offline loonylion

  • Newbie
  • *
  • Posts: 24
  • Karma: +3/-0
    • View Profile
Re: Slow Web GUI with many VLAN Interfaces - 300$
« Reply #20 on: November 12, 2017, 06:57:34 am »
cleaned up and seems to follow coding guidelines as far as I can see, hopefully final version attached.

I think I managed to work the pull request stuff out, would be nice if someone with the relevant knowledge/access could confirm I've got it right, because as I said, I've never used git before.

it says 2.4 but I can confirm it works on 2.4.1

EDIT: further improvements, mainly on page load time.
EDIT2: bugfix
« Last Edit: November 15, 2017, 10:51:32 am by loonylion »

Online heper

  • Hero Member
  • *****
  • Posts: 2688
  • Karma: +253/-11
    • View Profile
Re: Slow Web GUI with many VLAN Interfaces - 300$
« Reply #21 on: November 13, 2017, 04:23:44 am »
cleaned up and seems to follow coding guidelines as far as I can see, hopefully final version attached.

I think I managed to work the pull request stuff out, would be nice if someone with the relevant knowledge/access could confirm I've got it right, because as I said, I've never used git before.

it says 2.4 but I can confirm it works on 2.4.1
if you've never used git before, i'd suggest you use the github webgui editor todo the work for you

1)basically you go to the pfsense github page & select the master branch.
2)then you find the file you wish to *edit*. You make your changes & click 'propose change' (fill topic/comments to explain your commit)
3)github will now fork the repo & you will have your own version of the pfsense code.
4)adjust other files in the same way, but this time be sure to edit them in your forked version (for example goto: github.com/loonylion/tree/patch-1)
5)adjust adjust adjust
6)click the 'new pull request' button & if you are certain, send it
7)you probably need to sign a CLA before they can accept your code (unless that changed recently)







Offline loonylion

  • Newbie
  • *
  • Posts: 24
  • Karma: +3/-0
    • View Profile
Re: Slow Web GUI with many VLAN Interfaces - 300$
« Reply #22 on: November 15, 2017, 08:51:42 am »
updated archive with further improvements, it's now under 30 seconds from request to complete page load with 500 VLANs. Also added to pull request.
just tested with 1001 VLANs, takes about 1 minute for the page to load fully.
« Last Edit: November 15, 2017, 09:08:57 am by loonylion »

Offline chiel

  • Newbie
  • *
  • Posts: 13
  • Karma: +2/-0
    • View Profile
Re: Slow Web GUI with many VLAN Interfaces - 300$
« Reply #23 on: Today at 02:57:43 am »
Thanks loonylion for your work and the pull request. Hopefully it will be reviewed and added by pfSense.
Any idea on how to lower the boottime with this amount of interfaces? Having to wait for about halve a hour after a reboot is a bit stressful :)

Offline loonylion

  • Newbie
  • *
  • Posts: 24
  • Karma: +3/-0
    • View Profile
Re: Slow Web GUI with many VLAN Interfaces - 300$
« Reply #24 on: Today at 05:43:33 am »
I haven't looked at the boot process but I dont think mine takes anywhere near that long even with 300-500 vlans.