Floating bandwidth value for shaper (bufferbloat checker)
-
For my connection the WAN bandwidth avaioable to me varies a lot depending on the time.
Just like the OP if I limit the value enough then bufferbloat isn't a problem, but I don't want to limit myself to 60% of my connection all the time just because it dips there occasionally.
For me at least, a script that would temporarily adjust bandwidth to a definable floor value based on a ping (or maybe pings to several different places? Would be a LOT better than nothing.
If someone writes that script for pfSense, please share on this thread!
-
Thanks Harvy66 and Nullity!
I will look at Gargoyle and it's "Active Congestion Controller". -
https://github.com/ericpaulbishop/gargoyle/blob/master/package/qos-gargoyle/src/qosmon.c
https://dev.openwrt.org/attachment/ticket/8536/qosmon.patch (openwrt implementation)I do think it's possible to use the same or similar logic on FreeBSD/pfSense, but we really need some help from professionals. Should I create a bounty for it or there are other plans at Netgate already?
-
@w0w:
https://github.com/ericpaulbishop/gargoyle/blob/master/package/qos-gargoyle/src/qosmon.c
https://dev.openwrt.org/attachment/ticket/8536/qosmon.patch (openwrt implementation)I do think it's possible to use the same or similar logic on FreeBSD/pfSense, but we really need some help from professionals. Should I create a bounty for it or there are other plans at Netgate already?
I highly doubt that the Linux-centric code (I see references to iproute2 & tc) is useful to FreeBSD.
I think I saw someone on these forums say they were working on a pfSense script (python, sh, etc?) that accomplishes practically what qosmon does. I dunno if they ever released anything… the post was also a few years old IIRC.
Really, it should not be too hard to script something that monitors a ping command and/or bandwidth.
I'll try to remember where I put another Linux-based QoS (shell) script that dynamically adjusted bandwidth based on bandwidth/ping, since it's likely more portable and it would also be useful to see their approach. I got it from some GPL request.
-
Yep, I did not mention that we need to port some linux code, but at least we have working piece of code that can be used as logic sample in a new bash script or better PHP code… Just dreaming 8)
Thanks Nullity, I hope you'll find something good enough! -
Feature request added:
https://redmine.pfsense.org/issues/7904
-
The feature request was accepted but needs your input!
@Jim:
It's possible in some specific circumstances, but I don't see one of those being a way that would work properly with dummynet (limiters). It also still requires you to probe an external source at a specific destination (which would always have to respond as fast as your circuit allows), gets more difficult at higher bandwidth amounts (Takes ~16 minutes to probe minimum on a high speed link), and assumes all latency is from throughput saturation, which isn't necessarily true.
If someone comes up with a viable implementation, I'd love it see it work, because it would be useful. But like many ideas, it's simple to think of but difficult to implement.
So please provide your input on how to implement at the redmine feature request:
https://redmine.pfsense.org/issues/7904 -
This just sounds like it will be never coded by Netgate until they have ALREADY working source for FreeBSD. Thats sounds bad, but there is no way to affect this, only invest money or doing it by yourself and bring them working solution to implement.
Some interesting thing is TEACUP experiments — http://caia.swin.edu.au/tools/teacup/
http://caia.swin.edu.au/reports/161107A/CAIA-TR-161107A.pdf
Personally I am ready to invest some money into QoS monitor for FreeBSD (or anything with the same function) and also I am ready to pay for GUI version of dummynet FQ-Codel, the question remains, that Netgate just do not have resources for low priority tasks and new features, that are not needed by most of their customers. -
OK… Another one speculation. We are using shaper and no matter what, when it really works on full load you will see packet drops and when your bandwidth limit is wrong (above the real limit), you have no drops, but your latency is growing.
SO may be we need both monitor queue drops on full load, ping RRT, and depending on it , change the bandwidth limit more quickly and/or accurately. -
Yeah it sounds like it will either be completely user built, or possibly given a higher priority if it is better defined.
If someone can chime in on redmine with a specific technical outline of how it would work in freebsd reliably then it might be assigned a higher priority.
Even if it is assigned a higher priority at netgate it will likely be months to years before it is implemented in a Release version.
This won't happen fast unless someone(s) with the know how does this and shares it with the community.
-
The simplest way would be to allow the end user to supply a high and low mark for ping and possibly loss. When above the high marks, reduce the assigned bandwidth by some rate, probably N% every X seconds. When below the low mark, increase the bandwidth. You would also want some sort of sampling window size and sample rate. An example would to ping a target N times per second, and recalculate every X seconds.
I could see a default of something like 2 pings per second averaged over 10 seconds with a high mark of 120ms and a low of 40ms. When the high mark is hit, it will lower the assigned bandwidth by 10% and when the low mark is hit, raise it by 5%.
My guess is this would be an 80/20 rule that would be easy to implement.
edit: Probably have an absolute minimum assigned bandwidth, probably defaulted to 50%.
-
Please pass that along on redmine to try to get it Escalated!
-
I would also be willing to chip in on a bounty for this and the GUI for fq_codel dummy net.
These features have a lot of traction for home and SMB connections that do not have the budget for dedicated fiber.
While not a security issue features such as these just make pfSense a more well-rounded product.
-
I would also be willing to chip in on a bounty for this and the GUI for fq_codel dummy net.
These features have a lot of traction for home and SMB connections that do not have the budget for dedicated fiber.
While not a security issue features such as these just make pfSense a more well-rounded product.
@w0w:
https://github.com/ericpaulbishop/gargoyle/blob/master/package/qos-gargoyle/src/qosmon.c
https://dev.openwrt.org/attachment/ticket/8536/qosmon.patch (openwrt implementation)I do think it's possible to use the same or similar logic on FreeBSD/pfSense, but we really need some help from professionals. Should I create a bounty for it or there are other plans at Netgate already?
Bounty created.
https://forum.pfsense.org/index.php?topic=137469.0
Anyone willing to contribute or who wants to take on the project, please chime in at the bounty.
-
Bounty suspended as belt9 has been circumventing a ban. Those interested may submit a new bounty. Considering his attitude we cannot take the responsibility if he will deliver the funds to the solution.