OPNsense Forum

English Forums => General Discussion => Topic started by: tn881023 on October 20, 2025, 09:18:02 PM

Title: Traffic Shaping
Post by: tn881023 on October 20, 2025, 09:18:02 PM
Hi all,

So I have some questions around traffic shaping and I'm hoping that the wealth of knowledge in this forum will help me:

1) When using FQ_codel, and setting a pipe bandwidth value, the actual speed gained through speed testing is often lower than the value set - why is that, and is there a way of knowing how much speed you're likely to get?

2) Does traffic shaping have any effect if you are not saturating your connection, either up or down?

3) Is there a recommended shaper to use that will 'use' less bandwidth overhead?

My wan connection is 900/110 fibre PPPoE.

I have a relatively busy home network, but don't do too much in terms of gaming - one Xbox series X and a Nintendo switch. We mainly stream video/ movies and WFH.

I have set up shaping, and can get an A+ bufferbloat result, although I'm not sure what this realistically means to me in real life usage.

All the guides I have seen don't seem to address the questions I raise above.
Title: Re: Traffic Shaping
Post by: tn881023 on October 22, 2025, 03:52:46 PM
Hi, anyone got any ideas? Cheers :)
Title: Re: Traffic Shaping
Post by: OzziGoblin on October 27, 2025, 08:37:54 PM
Have a look at this: https://www.waveform.com/tools/bufferbloat

hope it helps
Title: Re: Traffic Shaping
Post by: meyergru on October 28, 2025, 10:09:27 AM
Or at this, #26 (https://forum.opnsense.org/index.php?topic=42985.0).
Title: Re: Traffic Shaping
Post by: Seimus on October 28, 2025, 11:46:39 AM
Quote from: meyergru on October 28, 2025, 10:09:27 AMOr at this, #26 (https://forum.opnsense.org/index.php?topic=42985.0).

This is a very nice explanation. I will just add more details for the OPs questions. Maybe you can consider adding them to the topic if you would assume they are worth it.

P.S. @meyergru at certain point maybe you should consider to push this into the docs as a "Freshman's handy-book"


-------------------

Quote from: tn881023 on October 20, 2025, 09:18:02 PM1) When using FQ_codel, and setting a pipe bandwidth value, the actual speed gained through speed testing is often lower than the value set - why is that, and is there a way of knowing how much speed you're likely to get?

This is normal.
The reason is the way how are the mechanisms/algorithms implemented. Its more visible for the AQM based schedulers, look at it as a pre-allocation of BW needed for the scheduler itself which is usually around 3-5% (value based on my testing and calculations and oh boy I did lot of them...)

Quote from: tn881023 on October 20, 2025, 09:18:02 PM2) Does traffic shaping have any effect if you are not saturating your connection, either up or down?

Yes. That's why we called them AQM e.g Active Queue Management.
The CoDel in the FQ_CoDel, is a queue management discipline that measures the sojourn time of a packet in a flow queue. So if such packet didn't moved for a set time, the FQ_C will take actions. The reason why we need this/want this, is because Saturation of the BW, on the Last Mile (users end) is not the sole cause of BufferBloat. Its the most common one, but not the only one.

Quote from: tn881023 on October 20, 2025, 09:18:02 PM3) Is there a recommended shaper to use that will 'use' less bandwidth overhead?

This is a wrong question and wrong mindset.
If you want to shape/QoS for the sole reason to have as much possible BW as you can get, than you are doing it wrong.
We use Shaping/QoS to control, to limit, to enforce and to guarantee operability.




Quote from: tn881023 on October 20, 2025, 09:18:02 PMI have a relatively busy home network, but don't do too much in terms of gaming - one Xbox series X and a Nintendo switch. We mainly stream video/ movies and WFH.

I have set up shaping, and can get an A+ bufferbloat result, although I'm not sure what this realistically means to me in real life usage.

All the guides I have seen don't seem to address the questions I raise above.

FQ_C handles very well anything related to RTP based traffic.
It does not need to address the questions (which are anyway asked a lot of times on the forum). Because the main premise of the Prevention against BufferBloat is to trade BW for stability/lower latency.

Whats the point to reach your full BW when you have latency ~ 2s.

P.S. I really do not like QoS, its my arch-nemesis.

Regards,
S.
Title: Re: Traffic Shaping
Post by: meyergru on October 28, 2025, 09:39:50 PM
Quote from: Seimus on October 28, 2025, 11:46:39 AMP.S. @meyergru at certain point maybe you should consider to push this into the docs as a "Freshman's handy-book"

I sure would like to - then again, the "READ ME FIRST" is already much too long. It cannot be more than a guide on what point to think of (or avoid) and sometimes, to link to interesting threads that explain or discuss the specific aspect in more detail. For the traffic-shaping part, I have done that by linking to our epic thread concerning that topic (https://forum.opnsense.org/index.php?topic=46990).

You are way more into the details of this, so maybe you should write a subsuming tutorial on traffic shaping (I surely will link to that in "READ ME FIRST", if you do).
Title: Re: Traffic Shaping
Post by: Seimus on October 30, 2025, 06:55:46 PM
Quote from: meyergru on October 28, 2025, 09:39:50 PMI sure would like to - then again, the "READ ME FIRST" is already much too long I cannot be more than a guide on what point to think of (or avoid) and sometimes, to link to interesting threads that explain or discuss the specific aspect in more detail.

Well the idea was to have it as guidelines, not a definition. But fair point, keeping it as is, gives it far better adjust-ability.

Quote from: meyergru on October 28, 2025, 09:39:50 PMFor the traffic-shaping part, I have done that by linking to our epic thread concerning that topic (https://forum.opnsense.org/index.php?topic=46990).

Awesome!
I must say this colab was great, mostly because I myself dont use IPv6, from all of you giving feedback, testing, confirming and dis-proofing the theories worked very well :).
Was a lot of fun.



Quote from: meyergru on October 28, 2025, 09:39:50 PMYou are way more into the details of this, so maybe you should write a subsuming tutorial on traffic shaping (I surely will link to that in "READ ME FIRST", if you do).

Well being more into the details was an unfortunate consequence, QoS as such stalks me in work as well personal time.
Plus its one of the topics thats hard to understand (At least I think seeing it in professional as well homelab discussions).

Honestly this is not such a bad idea, I was playing with that idea myself, to maybe create a forum-based article. Which main point would be to discuss about QoS/Shaping, why, where, how and to educate if that would be the interest. I will think about it, how the concept should look like and should be presented, and we'll see.

Regards,
S.