Project

General

Profile

Actions

Bug #10680

closed

Improve interface caching when we have many interfaces

Added by Jonas Christoffersen almost 2 years ago. Updated over 1 year ago.

Status:
Resolved
Priority:
Normal
Category:
Interfaces
Target version:
Start date:
06/19/2020
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
2.4.5-p1
Affected Architecture:
All

Description

In interfaces.inc there's a caching system to avoid too many calls to pfSense_interface_listget().
This cache is invalidated a lot, also many times where we don't need to. It is for example invalidated several times for each VLAN during boot, which leads to slow boot times when we have more than a few hundred VLANs.

The list of interfaces can only change when we create or destroy interfaces. Therefore a rewrite of the cache-system to only invalidate on create/destroy, along with deferring invalidation to outside of loops (eg. we loop through each VLAN twice during boot), will drastically reduce boot times.

I will send a pull request soon to implement the changes.
Along with issue #10589, this change will improve boot times from timing out (max PHP execution time) to booting in a few minutes for 1000 or 1500 VLANs.

This is the case for 2.4.5 and 2.4.5-p1. I believe its also the case for 2.5.0.


Related issues

Related to Regression #12999: Duplicate wireless interfaces are created at bootFeedbackViktor Gurov

Actions
Actions #2

Updated by Jim Pingle almost 2 years ago

  • Status changed from New to Pull Request Review
Actions #3

Updated by Renato Botelho over 1 year ago

  • Assignee set to Renato Botelho
  • Target version set to 2.5.0
Actions #4

Updated by Jonas Christoffersen over 1 year ago

  • Status changed from Pull Request Review to Feedback
  • % Done changed from 0 to 100
Actions #5

Updated by Anonymous over 1 year ago

  • Assignee changed from Renato Botelho to Jonas Christoffersen

Please confirm

Actions #6

Updated by Max Leighton over 1 year ago

  • Status changed from Feedback to Resolved

I was able to test this in 2.4.5p1 and 2.5. Boot time and GUI navigation speeds with 400 VLANs are significantly increased after this change. I'll mark the ticket resolved.

Actions #7

Updated by Viktor Gurov about 2 months ago

  • Related to Regression #12999: Duplicate wireless interfaces are created at boot added
Actions

Also available in: Atom PDF