Queues - Trying fq-codel and cake

Hi,
I have just started to try out the queuing options on RoS 7.5b11 on an RB5009, which is currently my uplink to a DL300/UL20 Mbps cable connection over the e3inet interface.
This is my current config (not the full config, just the relevant parts, I can post it if needed):

/queue type
add cake-diffserv=besteffort cake-nat=yes kind=cake name=cake-default
add cake-ack-filter=filter cake-bandwidth=300.0Mbps cake-diffserv=besteffort cake-nat=yes kind=cake \
    name=cake-up
add cake-bandwidth=20.0Mbps cake-diffserv=besteffort cake-nat=yes cake-wash=yes kind=cake name=\
    cake-down
add kind=fq-codel name=fq_codel
/queue simple
# CAKE type with bandwidth setting detected, configure traffic limits within queue itself
add bucket-size=0.001/0.001 name=cake@e3inet queue=cake-up/cake-down target=e3inet total-queue=\
    cake-default
add bucket-size=0.001/0.001 disabled=yes max-limit=300/20 name=fqcod@e3inet queue=fq_codel/fq_codel \
    target=e3inet total-queue=fq_codel

The cake queue is working and doing a great job in getting low latency/jitter (according to waveform.com I go from grade B to A+ if enabling it).
Some points I wasn’t able to figure out from searching&reading:

  1. If I disable cake and enable fq-codel, nothing works anymore, I can´t access the Internet. So I’m not sure, is it my wrong configuration? Is this a bug in the beta?
  2. I have read that fasttrack is incompatible with queuing, but I have just tried to limit the scope of fasttrack so that my Internet uplink is not included
/ip firewall filter add action=fasttrack-connection chain=forward comment="defconf: fasttrack" connection-state=established,related disabled=yes hw-offload=yes out-interface-list=lan

This does not work, I had to completely disable the fasttrack rule, to have cake working. Again, am I doing something wrong? Is this by “design”?
3. I had to configure the upload and download bandwidths in reverse, to have a working cake. Well, the question stays the same: am I doing something wrong? Is this by “design”?
Maybe it is just the Winbox showing the “queue=cake-up/cake-down” in reverse ?
4. I don´t get the concept of the interface queue. If I have “only-hardware-queue” for e3inet configured and the simple queues for cake. Is this OK? Should I change the queue type to something else for a clean cake config?
5. Without fasttrack the CPU get’s as high as 30% with peaks of 40% while testing the full bandwidth. The CPU speed also jums to a maximum, 1,4GHz. If I just disable cake, but leave fasttrack off, CPU stays below 20% and at 350MHz. That’s more than I hoped for from a router this powerful. This device would also serve as the firewall between my VLANs, so it could happen, that while having some video call, someone from the family downloads something from a NAS, so we could reach 1,5Gbps in sum. Is there something I can optimize in the queuing or is there some other way to partly enable fasttrack?

That’s a lot of questions, I know, but the documentation (for me at least) is not easy to grasp on this topic.

Thanks!

W

It seems that you setup 300/20 bps instead of Mbps :wink:

Hi,
thanks a lot ultratoto14 ! Ooops, yes you are right. :open_mouth: Now with the correct values fq_codel works.
It gives me somewhat more jitter, than cake. Cake however seems to have significantly higher CPU usage.
I am still not very sure, what else should I configure or if my settings are correct.
I admire the postings of dtaht and others in this topic, but I don’t really understand them all…

Regards
W

Hi,
I think I have found something interesting here, a QoS script compatibel w Fasttrack:
http://forum.mikrotik.com/t/fasttrack-friendly-qos-script/102401/1
I tried it, by adding a new dedicated Internet bridge, but failed… Time is over for my experiments, but I will try again next time.
Edit: I tried adding a somewhat modified fq_codel from the example above, with great results :

/queue type
add fq-codel-limit=1000 fq-codel-quantum=300 fq-codel-target=12ms kind=fq-codel name=fq-codel_short
/queue simple
add bucket-size=0.001/0.001 max-limit=300M/20M name=fqcod@e3inet queue=fq-codel_short/fq-codel_short target=br-inet total-queue=fq-codel_short
/queue tree
add bucket-size=0.01 disabled=yes max-limit=300M name=download packet-mark=no-mark parent=br-inet queue=fq-codel_short
add bucket-size=0.01 disabled=yes max-limit=20M name=upload packet-mark=no-mark parent=e3inet queue=fq-codel_short

The Upload is attached now to the bidge which has the public IP on it. Still the fasttrack needs to be enabled, but I get a straight A+ on the Waveform bufferbloat test. And CPU does not go higher than 20%. I am not sure if it has to do anything with the dedicated bridge, but whatever: it works OK.

!!!Warning!!!: Queues (except Queue Trees parented to interfaces), firewall filter and mangle rules will not be applied for FastTracked traffic.
https://wiki.mikrotik.com/wiki/Manual:IP/Fasttrack
If you want to keep using “Fasttrack with queue tree”, the only way is specifying parent=interface (e.g. ether1 for uploading and bridge for downloading.)
Then using “fq_codel” as queue type.

Thanks @shaw627 !
Unfortunately I don´t have currently acces to that device, but in a few weeeks I will try and consider your input.
Interestingly as I remeber, I have fasttrack enabled and still have great (measured, it´s not just the gut feeling) results with the config above. Anyway I don´t have much experience with the whole topic, so as soon as I can I will try to experiment again and I will also report on my results.

Regards

W

“cake type with bandwidth setting detected configure traffic limits within queue itself” ?

  1. can you team explaine to me what is the meaning of this?
  2. how to prevent it ? or is my config is right?
  3. what is the best setting for cake?
  4. if I have 600 MB up dan down, with 300 client what is best setting with fq codel and cake ?

I appreciated who help me to solve this for my busines.