Community discussions

MikroTik App
 
jollyrogr
just joined
Topic Author
Posts: 13
Joined: Sun Apr 21, 2024 10:31 pm

QOS help

Sun Apr 21, 2024 10:56 pm

RB5009 here. I am having an issue where a single download saturates my connection and prevents other internet activity on my computer. I've been trying to implement some kind of QOS to fix this. I disabled the firewall fasttrack rule, and then implemented following:
/ip firewall mangle
add action=mark-packet chain=prerouting comment=upload in-interface=bridge \
    new-packet-mark=client_upload passthrough=yes
add action=mark-packet chain=prerouting comment=download in-interface=ether1 \
    new-packet-mark=client_download passthrough=yes
/queue type
add kind=pcq name=PCQ_download pcq-classifier=dst-address pcq-rate=100M
add kind=pcq name=PCQ_upload pcq-classifier=src-address pcq-rate=10M
/queue tree
add name=queue1 packet-mark=client_download parent=global queue=PCQ_download
add name=queue2 packet-mark=client_upload parent=global queue=PCQ_upload
This somewhat works if I set the pcq-rate low enough, but I'd like to be able to use all of my 100M connection. Is there some config I can try to allow bandwidth sharing without restricting the speed of any one connection?

Thanks
 
neki
newbie
Posts: 48
Joined: Thu Sep 07, 2023 10:20 am

Re: QOS help

Mon Apr 22, 2024 3:02 pm

You can try this tutorial for PCQ: PCQ Queue Type on MikroTik RouterOS v7 or look for CAKE (Queue types)
 
jollyrogr
just joined
Topic Author
Posts: 13
Joined: Sun Apr 21, 2024 10:31 pm

Re: QOS help

Tue Apr 23, 2024 5:36 am

Thanks. I've played around with fq-codel and cake and have decent results with both but think fq-codel wins. With cake it seems to limit my download speed some.
/queue type
add kind=fq-codel name=fq-codel
/queue simple
add max-limit=100M/10M name=fq-codel queue=fq-codel/fq-codel target=ether1 \
    total-queue=fq-codel
The 5009 has enough processor that cpu loading is minimal even with fasttrack disabled. I can download on my PC without interrupting my son's gaming.
 
jollyrogr
just joined
Topic Author
Posts: 13
Joined: Sun Apr 21, 2024 10:31 pm

Re: QOS help

Wed Apr 24, 2024 5:09 pm

After playing around with various implementations of simple queues and queue trees with and without fasttrack enabled, I just can't get the same download throughput with cake as I can with fq-codel. Cake seems to give slightly better latency on a bufferbloat test, but I'm not giving up throughput for a few millisecond improvement in latency. Is the reduced throughput an attribute of cake or is there some setting I should look at adjusting? Maybe by not specifying the speed in the queue type, cake is estimating a lower speed?
 
UkRainUa
newbie
Posts: 27
Joined: Sun Mar 10, 2024 3:10 am

Re: QOS help

Thu Apr 25, 2024 7:12 pm

The best results in the bufferbloat test (in terms of latency) if you set the limit to 90% of the actual bandwidth, for example:
/queue type
add cake-flowmode=dual-srchost cake-nat=yes kind=cake name=cake-upload
add cake-flowmode=dual-dsthost cake-nat=yes kind=cake name=cake-download
/queue tree
add bucket-size=0.01 max-limit=90M name=download_bridge packet-mark=no-mark parent=bridge queue=cake-download
add bucket-size=0.01 max-limit=90M name=upload packet-mark=no-mark parent=ether1 queue=cake-upload
If you use the queue tree on the interface, you can enable fasttrack.
Cake better separates different types of traffic.
 
jollyrogr
just joined
Topic Author
Posts: 13
Joined: Sun Apr 21, 2024 10:31 pm

Re: QOS help

Sat Apr 27, 2024 4:01 am

Thanks. You're right about reducing the max-limit to achieve best latency results.
Running this right now and seems to perform pretty well all around.
/queue type
add cake-diffserv=diffserv4 cake-nat=yes cake-rtt=20ms kind=cake name=cake-upload
add cake-diffserv=diffserv4 cake-nat=yes cake-rtt=20ms kind=cake name=cake-download
/queue tree
add bucket-size=0.01 max-limit=100M name=download packet-mark=no-mark parent=bridge queue=cake-download
add bucket-size=0.01 max-limit=10M name=upload packet-mark=no-mark parent=ether1 queue=cake-upload

Who is online

Users browsing this forum: scoobyn8 and 32 guests