Dynamic speed limiting, based on total usage?

  • Is there some way to have pfSense do dynamic speed adjustment of limiters, to adjust the limits up and down depending on current total bandwidth usage?

    Let's say we have a 100 megabit Internet connection.

    There will be four levels of management:

    • Rapid-change high limit (RCHL): 95 megabit
    • Rapid-change low limit (RCLL): 45 megabit
    • Slow-change high limit (SCHL): 90 megabit
    • Slow-change low limit (SCLL): 50 megabit

    Rate of change settings:

    • Rapid-change in speed (RCS): 5 megabit
    • Slow-change in speed (SCS): 0.5 megabit

    Limiter hard limits:

    • Limiter Minimum speed (LMIN): 0.5 megabit
    • Limiter Maximum speed (LMAX): 50 megabit

    Limiter-Speed is initialized set to LMAX.

    Every 2 seconds, adjust the limiters:

    • Get total interface utilization (TIU) of WAN interface

    Rapid changes to limiter:

    • If TIU => RCHL, decrease Limiter-Speed by RCS (5 megabit)
    • If TIU =< RCLL, increase Limiter-Speed by RCS (5 megabit)

    Slow changes to limiter:

    • If TIU < RCHL and TIU > SCHL, decrease Limiter-Speed by SCS (0.5 megabit)
    • If TIU < SCLL and TIU > RCLL, increase Limiter-Speed by SCS (0.5 megabit)

    Correct too high or too low speed changes:

    • If Limiter-Speed < LMIN, set Limiter-Speed to LMIN
    • If Limiter-Speed > LMAX, set Limiter-Speed to LMAX


    The result of doing this, is that this allows overall device speeds to increase when the Internet usage is low, and pfSense would only impose a speed restriction on the devices as the Internet usage rises.

    The rapid-change section allows the limiter to aggressively respond to sudden spikes or drops in demand.

  • This would be great am searching for something like this myself you can do it with schedulers though but its not dynamic.
    my service has exact times when congestion occurs or the isp starts their throttling so its quite easy to do it this way.

Log in to reply