Poor response time with thousands of vlan interfaces
-
Try sprinkling some calls to flush(); and ob_flush(); in the loops, see if it helps.
-
Sorry, the script time I record previously is not acculately - I missed to recored files required in.
After adding time record code snips recursively in every file required in, I found globals.inc called get_nics_with_capabilities() to get vlan capable interface, which caused the delay!code from globals.inc:
43 function get_nics_with_capabilities($CAPABILITIES) { 44 $ifs = `/sbin/ifconfig -l`; 45 $if_list = split(" ", $ifs); 46 $vlan_native_supp = array(); 47 foreach($if_list as $if => $iface) { 48 $iface = trim($iface); 49 $capable = pfSense_get_interface_addresses($iface); 50 if(isset($capable['caps'][$CAPABILITIES])) { 51 $interfacenonum = remove_numbers($iface); 52 if(!in_array($interfacenonum, $vlan_native_supp)) 53 $vlan_native_supp[] = $interfacenonum; 54 } 55 } 56 return $vlan_native_supp; 57 } ...... some line omitted .... 114 $vlan_native_supp = get_nics_with_capabilities("vlanmtu");
After comment out line 114 in globals.inc, the script page shows immediately. But the side effect I found currently is that interfaces_bridges_edit.php can't see vlan interfaces any more.
-
From what i recall that function is a leftover.
You can safely disable the call to it to speedup your test.Iirc it was non-existant when we tested the 4000 vlans cmb refers too.
-
Actually try this out https://github.com/bsdperimeter/pfsense/commit/121dc11eac00c2244547bf942f3e4416c8b6cf3b
That should fix you issues with other places.
-
Surely it performed much better after applyling commit: 121dc11.
But all vlan interfaces are missing in interfaces_assign.php & interfaces_bridges_edit.php list box, resulting we cannot use or configure any vlan interface we created at all. For example: we can't assign vlan interface to LAN nor bridge several vlans together. -
I am not following you.
Since there is nothing related with that commit and those pages!Can you show me real examples or even screenshots of this?
-
The version of pfsense I'm testing is the official 2.0.1-RELEASE amd64.
I have applied commit 121dc11.As you can see in vlan.png, I have configured many vlans ( actually from vlan 999 to 3999).
But in assign.png, these vlan interfaces does not show in assign list.
Aslo in bridge.png, these vlan interfaces doest not show in select list.
-
ifconfig command output does show anything?
Can you show me the config.xml?It should be there is you have configured since displaying of vlans is taken from the config file.
BTW, bridge will not show any interface that is not assigned.
This is the limitation in 2.0.x of that interface. -
Actually with that commit when I go to create a vlan, the parent interface drop-down is empty.
-
ifconfig -l have the configured interfaces.
em0 em1 em2 plip0 pflog0 pfsync0 enc0 lo0 em1_vlan999 em1_vlan1000 em1_vlan1001 em1_vlan1002 em1_vlan1003 em1_vlan1004 em1_vlan1005 em1_vlan1006 em1_vlan1007 em1_vlan1008 em1_vlan1009 em1_vlan1010 em1_vlan1011 em1_vlan1012 em1_vlan1013 em1_vlan1014 ......(omited....)
config.xml is attatched, please strip .txt suffix before unzip it, since it's over 250KB.
I meet the same situation jimp meets, no parent interface in drop-down list. But the vlan interfaces are created before apply that commit.
-
Heh jimp good catch :)
This is the correction https://github.com/bsdperimeter/pfsense/commit/aad163a9338995609363cdac0e97c606eeb58e9c
-
Works for me after that commit. :-)
-
Works for me after that commit. :-)
Me too.
Still cannot see vlan interfaces in assigning or bridging page. -
They show up for me in the assignment drop-down list. And if I assign and enable one, then it shows up to bridge (the list in bridge only shows assigned and enabled interfaces)
-
I double checked, assigning interface page drop-down list do have vlan interfaces now.
But my question is: since interfaces_bridge_edit.php get only configured interface as bridge member capable ones,48 $ifacelist = get_configured_interface_with_descr();
Is there any need to assign them before we can add to bridge?
-
In 2.0 that is enforced to make sure the interface part of the bridge is always properly configured.
Generally, its not a requirement, but there needs to be some bookkeeping for bridge members and that is why it was not done for 2.0.
-
I understand that and thanks for your help!
-
Could this be purged to the official release pls :)
-
Ermal already committed that to RELENG_2_0, but it's not like we'd make a 2.0.2 just for that… so it will be an official release eventually, just not yet. If you want it in the meantime, feel free to sync your code to the current RELENG_2_0 code using gitsync.
-
Any updates on this matter??
Is it in the snapshots of 2.1??