Community discussions

MikroTik App
 
Simonej
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 56
Joined: Sun Aug 22, 2021 3:34 am

QoS for SOHO

Tue Jun 21, 2022 8:57 pm

Hello, trying to learn more about QoS on Mikrotik, the goal is to avoid any VoIP issue and have greater browsing experience.
Starting from the presentation by Penny Tone https://mum.mikrotik.com/presentations/ ... 512668.pdf, the awesome pcunite's guide viewtopic.php?t=73214, and CAKE documentation https://www.bufferbloat.net/projects/codel/wiki/Cake/ + dtaht's post viewtopic.php?p=885000
few questions for you:

for home or small business use, are still necessary all the marks for connections/packets with mangle rules or CAKE algorithm is smart enough?
In case just "enabling" CAKE is ok, Fasttrack seems to be vital for a low-power device like hAP ac2/3, what is the best way to do it?

1) Interface Queues -> WAN -> Queue Type -> CAKE = Error. This should be similar to the OpenWrt implementation, will be fixed for MikroTik?
2) Mangle rule -> (Prerouting / Postrouting) Mark WAN packets -> Queue Tree
3) This solution viewtopic.php?t=113308#p562213 + Firewall filter rule before Fasttrack -> Simple Queue
4) None of this

Extra, is a good choice use for wireless FQ_Codel as default?

Thanks!
 
anserk
Frequent Visitor
Frequent Visitor
Posts: 51
Joined: Wed Mar 02, 2022 5:08 pm

Re: QoS for SOHO

Thu Jun 23, 2022 12:16 am

If you want to start with something simple, take a look at viewtopic.php?p=934606#p934606. This is for fq_codel. I've been using that configuration with very good results for some time now. My connection is 120/12, so I'm not losing too much by going 118/11.

If you want to try CAKE, I posted a few examples here: viewtopic.php?p=939421#p939048. But in all my tests on hAP ac2 and a cable Internet connection fq_codel gave better results than CAKE. Perhaps for a per-host isolation CAKE would be better, especially if you have a lot of client devices, since fq_codel works on flows (1024 by default) regardless of what host they belong to.

The approach above is not using packet marks, so it's very easy to configure. It also allows to have fasttrack enabled. Depending on your Internet bandwidth you might not need fasttrack at all, but why not have it when there is such an option? If you use wireless on hAP ac2 (I don't), then you will likely want fasttrack as wireless takes plenty of CPU.
 
Simonej
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 56
Joined: Sun Aug 22, 2021 3:34 am

Re: QoS for SOHO

Fri Jun 24, 2022 1:52 am

Thanks @anserk, was reading all topic, your post viewtopic.php?p=939421#p939048 is very intresting.
Following your suggestions I ran some non-professional tests;

INTERNET QUEUE | QUEUE TREE | CAKE | BRDIGE -> WAN | 500M | 7,5% CPU queue
/queue type add cake-ack-filter=filter cake-bandwidth=300M cake-diffserv=diffserv8 cake-flowmode=dual-srchost cake-nat=yes kind=cake name="Egress"
/queue type add cake-bandwidth=500M cake-diffserv=diffserv8 cake-flowmode=dual-dsthost cake-nat=yes kind=cake name="Ingress"


VLAN QUEUE | SIMPLE QUEUE (FastTrack disabled) | CAKE | GUEST -> WAN | 50M | 4,8% CPU queue
/queue type add cake-bandwidth=10M cake-diffserv=besteffort cake-flowmode=dual-srchost kind=cake name="UP" RTT=1
/queue type add cake-bandwidth=50M cake-diffserv=besteffort cake-flowmode=dual-dsthost kind=cake name="DOWN" RTT=1


VLAN QUEUE | SIMPLE QUEUE (FastTrack disabled) | FQ-CODEL | GUEST -> WAN | 50M | 3,1% CPU queue
/queue type add fq-codel-limit=1024 fq-codel-quantum=300 kind=fq-codel name=fq-codel

/queue simple add dst="WAN" max-limit=10M/50M name="VLAN to WAN" queue=fq-codel/fq-codeltarget=VLAN total-queue=fq-codel


INTERFACE QUEUE | CAKE | WiFi | 50M | 2,5% CPU queue (ingress only)

- FQ-CODEL is be the best choice for VLAN traffic shape?
- Is FQ-CODEL a good choice to use in every interface queue like change sfq for wireless and only-hardware-queue for etherX?
 
anserk
Frequent Visitor
Frequent Visitor
Posts: 51
Joined: Wed Mar 02, 2022 5:08 pm

Re: QoS for SOHO

Fri Jun 24, 2022 4:39 am

You can't use cake-bandwidth parameter, it won't work properly. You need to set the limits in the queue tree (or simple queue). Also, it's difficult to understand the meaning of the text you put in bold. I would rather see the actual config line for queue tree or simple queue to know what it means. I would also focus more on the outcome and worry about CPU later. It doesn't matter how much CPU is used if the queue configuration doesn't get you what you want.

I haven't tested limiting bandwidth on VLANs, my goals was to reduce bufferbloat for everyone on the network and not impose any limits.

When you use queue tree and use an interface as the parent (instead of global), the router will automatically change the interface queue, see "active queue type". So there is no need to change it again under Interface Queues tab.

I'm not the expert in this, but the way I understand traffic shaping is you want to do it in one place in the packet flow path. Usually where the bottleneck is, where higher bandwidth meets lower bandwidth, e.g. WAN to LAN and vice versa. So you either use global HTB or interface HTB, not both (see https://help.mikrotik.com/docs/display/ ... n+RouterOS for the diagram).

I don't do anything wireless on MikroTik, so can't comment on that. In my situation Internet bandwidth is way lower than Wi-Fi bandwidth, so the bottleneck is not with Wi-Fi.

There is no simply "best" queue type, each has its own purpose, that's why RouterOS has plenty to choose from. You would need to test various types in your scenario and see which one works better for you.

Who is online

Users browsing this forum: AtisE, CGGXANNX, GoogleOther [Bot] and 84 guests