OPNsense Forum

Archive => 23.1 Legacy Series => Topic started by: tophattwaffle on March 01, 2023, 06:34:06 AM

Title: Shaper works at low bandwidth, but breaks at higher bandwidth
Post by: tophattwaffle on March 01, 2023, 06:34:06 AM
I'm trying to setup upload traffic shaping in OPNsense, but am hitting a strange issue. The goal is to de-prioritize a network compared to another. I've setup the pipe, queues, and rules. I've setup an iperf3 server on a 3rd network to act as a test upload target.

When I have the pipe bandwidth at 50mbps, shaping works as expected. The low priority network gets ~8mbps and the high priority network gets ~40mbps as determined by the 2 queues I have with a weight of 1 for low, and 5 for high. When I set the bandwidth to 100mbps, my actual upload speed, the shaping dies and each host gets ~50mbps.

Bandwidth of 100mbps results in each host getting ~50mbps
(https://imgur.com/ggTMXRI.jpg)

Changing the bandwidth from 100 -> 50mbps and hitting apply, the rules start working immediately.
(https://imgur.com/o5cOMuM.jpg)


Pipe
(https://imgur.com/hCskYYT.jpg)

Queues
(https://imgur.com/iJbooyB.jpg)
(https://imgur.com/khAYNVu.jpg)

Rules
(https://imgur.com/e7fUoet.jpg)
(https://imgur.com/Huz18X3.jpg)
Title: Re: Shaper works at low bandwidth, but breaks at higher bandwidth
Post by: franco on March 01, 2023, 08:32:43 AM
The shaper code in the OS was built in a time where 100 mbit was fast and for all speeds past 100 mbit the timekeeping will be off and increasingly unreliable. You can't even shape over 5 gbps because the variable being held is not able to store this value anymore because it doesn't have enough bits.

I haven't heard that someone wanted to change that.


Cheers,
Franco
Title: Re: Shaper works at low bandwidth, but breaks at higher bandwidth
Post by: tophattwaffle on March 01, 2023, 08:56:35 AM
Quote from: franco on March 01, 2023, 08:32:43 AM
The shaper code in the OS was built in a time where 100 mbit was fast and for all speeds past 100 mbit the timekeeping will be off and increasingly unreliable. You can't even shape over 5 gbps because the variable being held is not able to store this value anymore because it doesn't have enough bits.

I haven't heard that someone wanted to change that.


Cheers,
Franco

If I understand you correctly, this feature is basically not usable for faster links?
Title: Re: Shaper works at low bandwidth, but breaks at higher bandwidth
Post by: franco on March 01, 2023, 08:58:55 AM
Yes, and shaping becomes less of a concern in these scenarios as well. At least that is what we are seeing with customers.


Cheers,
Franco
Title: Re: Shaper works at low bandwidth, but breaks at higher bandwidth
Post by: tophattwaffle on March 01, 2023, 09:34:27 AM
Alright, thanks for the information. I'll have to just give up on this in my situation.