fq_codel or cake in v7

Hi, just wanted to start another topic for this now that beta is out.

Will there be core or extra packages for modern queuing libraries like fq_codel or cake now that the kernel has been updated?

I’ve used both the above on an edgerouter x as a soho user with a highly asymmetrical line and they work flawlessly, simply set and forget.

The only way I could get a stable qos set up on routeros with queue trees and sfq was to tune my uploads to well below 50%. With fq_codel / cake close to 95% works no worries.

+1 for cake. It is more advanced than fq_codel + htb. But it will require more work, to convert the queues from htb to the cake internal shaper.

+1000 fq_codel/cake/fq_codel_fast needs less reserved bandwidth to deal with bufferbloat

I agree with this too, but first I want to see their current feature set stabilized. The sooner that happens, the sooner that they can release v7 and people can start using it in production. New features like this can be added easily later. If they try and add all new features that have been requested in the last several years into the first release of v7 it will take forever until it is released. I would rather see v7 stable release in 4 months than wait 7-8 months for v7 stable release with fq_codel or cake.

+1

CoDel etc. are badly needed.

https://en.wikipedia.org/wiki/CoDel

These features are already present in the kernel they chose to use for v7. What needs to be done is to “plumb” it into RouterOS and Winbox. Actually, there’s MANY features in newer kernels that overlap with old v6 features that Mikrotik had to implement themselves. Depending on whether they want to keep their custom implementation or not, I imagine much of the work in v7 is removing Mikrotik implementations and using native kernel features. I expect it cake and fq_codel will become available in time. =) Be patient! At least they have STARTED on v7.

+1 for FQ_Codel I really want this feature in RouterOS. It is probably one of the only reasons why I look outside of the MikroTik product range.

Fq_codel implementation would be a great improvement. Of course we cannot promise anything about new features, but your requests are noted!

:crossed_fingers:

Well, if you use PCQ you have some knobs to twiddle. I have improved ADSL2+ responsiveness with PCQ in simple queues by making the buffers smaller than the default (which otherwise seem to work well with 50+MBit speeds). For example on an ADSL2 annex m line with max-limit=1400k/16500k these queues keep web browsing snappy enough even when the upload (especially) and downloads are busy.

/queue type
add kind=pcq name=pcq-upload-adsl pcq-classifier=src-address,src-port
pcq-limit=2KiB pcq-total-limit=1000KiB
add kind=pcq name=pcq-download-adsl pcq-classifier=dst-address,dst-port
pcq-limit=20KiB

From what I can tell fq-codel has some insight (because it’s in the kernel) into how quickly data is moving through each tracked connection and can adjust the buffers accordingly to mimimise the time they hang around. With PCQ you can adjust the buffer sizes but I can’t think of a way you could even use a script to adjust them dynamically.

The adhoc way to set this up is:

  • Set the queue max-limits to 90-95% of your measured saturated bit rate (using speed test for instance and use the peak values you see in the traffic plots in Winbox not what Speedtest says).


  • Adjust your pcq-limits downwards incrementally until you notice the responsiveness or pings get acceptable when the upload and downloads are saturated.

Sounds good, doesnt work.

+1 for fq_codel and/or CAKE in ROS v7, as soon as reasonably possible. Thank you for listening!

Sounds good, doesnt work.

Did you even try it? It the modified PCQ improved my ADSL2 connection when I had it, I am using it still to good effect one some sites stuck with ADSL2 and someone on IRC has just used it with success on a 3M/512K connection.

+1 for fq_codel/cake

plus 1000 for all of that stuff that will make our life better. Mikrotik plz stop all other and focus on that… only.

I would love to see:
CoDel
FQ_CoDel
Cake
Pie
FQ_Pie
and every other complete implementation of queues.
Those will not take much space but will help a lot with keeping buffers low.

I use a PCQ queue tree to keep my bufferbloat under load between 20-100ms compared to 300-1000ms without it. In the past I used a DD-WRT router with CAKE and it kept the bufferbloat at 30ms losing only 3mbps compared to 8mbps using PCQ.

PD 1: I use queue tree instead of simple queues because I have multiple bridge interfaces for guests and IOT.
PD 2: I have 97/72mbps fiber but my ISP think bufferbloat is an imaginary problem that only exists in my mind and everything is fine on their side :laughing: .

I do also keep hoping for fq_codel or cake in miktrotik. However, it’s not an “or” choice so much, but an informed one.

Wifi: fq_codel for 3 wifi chipsets (mt76, ath9k, and ath10k) have existed now for a couple years ( https://lwn.net/Articles/705884/ ) however a key feature for the ath10k (and hopefully a few other chipsets we know of) (“airtime queue limits”) only just landed in mainline after baking in google’s wifi and chromebooks for a few years ( http://flent-newark.bufferbloat.net/~d/Airtime%20based%20queue%20limit%20for%20FQ_CoDel%20in%20wireless%20interface.pdf ). This implementation lives in the mac80211 layer of the kernel,
and is not a qdisc, per se. It was our hope that the techniques we created and documented for this implementation would make it into vastly more wifi, 5g, and ethernet over powerline designs.

elsewhere:

fq_codel is lightweight and runs well at “line rate” on ethernet, wifi, - pretty much everything - , and there are few manufacturers that have offloaded it into the ethernet or wifi firmware itself at this point. fq_codel (rfc8290) is pretty much the default on most linuxes now, and also is on all of apples products. Some form of restricting the buffering the lowest level firmware (as per linux’s BQL or now, AQL) is also needed, and more than a few manufacturers and users have turned fq_codel on with hundreds of ms of buffering still stuck in the driver itself, expecting a better result. BQL is bog-standard in linux now, supporting - I’ve lost track - 50+? ethernet drivers - but not necessarily the ones mikrotik uses. Adding BQL to an ethernet driver is about 6 lines of code…

as for fq_pie, pie, codel, etc. In general we don’t recommend codel be run standalone. If you want to construct a sfq + codel thing, ok… but seriously, use fq_codel even with that.

I’m not a one trick pony - I’d like there to be a low latency high speed and bufferbloat-free internet for everyone - I’ve long supported development of pie, also. It is arguably (so long as ecn is disabled) a better single queue AQM than codel is. pie is lighter weight than fq_codel is, also, but doesn’t achieve anywhere near the same queue depth (16ms) that codel can (5ms). Pie keeps improving, with lots of new stuff landing in more recent kernels, including fq_pie, which just landed in linux 5.5. Some manufacturers (cough, cablemodems) have found it difficult to implement fq_codel in their devices, and hopefully fq_pie will prove a viable alternative. I’d really like some independent benchmarking of fq_pie vs cake and fq_codel, not just at line rate but in shaped modes. Cake in particular has docsis framing support, which the cable industry has thus far tried to ignore…

as for cake… well, after 5 years of user driven development, it was mainlined into linux 4.19, and the out of tree build for it goes back as far as 3.10. By default cake is about 2.5x more cpu intensive than fq_codel is, but it does a lot more - host + flow fairness, even through nat, ack-filtering, a better codel-like algorithm, etc. I like to think it’s currently the gold standard for sqm-software shaping, but again, independent benchmarks would be just great. cake is also our research vehicle for even more improvements in sqm designs. Try it at line rate as a shaper if you can spare the cpu, but be prepared to fall back to a simpler htb + fq_codel shaper if you can’t. Cake’s biggest objective was to be easy to configure, and only takes one line of tc code to enable on egress, 3 on ingress, unlike the sqm-scripts or more complicated things… and some more details can be had at the paper, here: https://arxiv.org/pdf/1804.07617.pdf

I think all these algorithms would be of value to mikrotik’s customer base and the bufferbloat.net folk and mailing lists are always willing to help. Let me leave you with a laugh though, in my recent talk at linux.conf.au I used people, as packets, to try and explain tcp’s behaviors better and the value of these algorthms.

https://blog.apnic.net/2020/01/22/bufferbloat-may-be-solved-but-its-not-over-yet/

somewhere on these threads fq_codel_fast was mentioned… that’s an experimental version, with experimental “SCE” ( https://tools.ietf.org/html/draft-morton-tsvwg-sce-01 )support, and I would not be in favor of mikrotik shipping that. There is a competing standards attempt, called L4S, that works differently, and I really don’t know where that’s going to go at this point. fq_codel_fast without that feature does benchmark out at about 5% faster than fq_codel presently does, but that’s pretty trivial in the scheme of things.

In summary - ship fq_codel for wifi, make sure you have BQL and AQL support underneath, ship fq_codel and cake, and feel free to play with fq_pie and pie. I look forward verymuch to playing with mikrotik’s implementations one day soon.

This is the way.

Indeed :laughing:

It would be nice to be able to run either fq_codel or cake in RouterOS for better shaping options. Please consider adding this MikroTik.