What's new

[RT-AC86U] I built cake!!!

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Status
Not open for further replies.
Well we would here in Australia but, politics, and Telstra, if I want it I'll have to fork out an absurd amount of money.

And I really wish I had a fiber connection would be better than the crappy copper line I have now.


Well you could allway's just move to New Zealand we have fibre to the door and we are getting here in nz Hyper fibre nextyear
 
Well you could allway's just move to New Zealand we have fibre to the door and we are getting here in nz Hyper fibre nextyear
I would but the cost would be more than getting the fiber cable in the first place lol, my uncle is a kiwi, he seems to like the weather here compared to pamerston north, and I live in walking distance of the beach it's a hard choice.

Looks like I'll just wait till I changed jobs and save money.
 
I would but the cost would be more than getting the fiber cable in the first place lol, my uncle is a kiwi, he seems to like the weather here compared to pamerston north, and I live in walking distance of the beach it's a hard choice.

Looks like I'll just wait till I changed jobs and save money.




Palmerston North
 
I tested cake for a few days.

The RT-AC86U has a 1.8Ghz Cortex-A53 dual-core CPU and cake work without problems up to 280Mbps. Nat and queue only work at one core. Cake ran unstable from 290Mbps.

The main difference between cake and fq_codel is that cake supports per host queuing and fq_codel basically works with per flow queuing. (Of course, cake can also be operated in per flow queuing method.)

fq_codel:

fq_codel example on 100Mbps/100Mbps symmetric internet.

Suppose you do the following on one smart tv, one smart phone, and one PC.

The smart tv plays 4k netflix (25Mbps), the smart phone plays 4k@60fps (25Mbps) youtube video, the PC plays 4k@30fps youtube (20Mbps) video, and downloads large files with 4 simultaneous connections.

Then this network has a total of 7 flows, and fq_codel divides the 100Mbps bandwidth into 7 to guarantee 14.2Mbps of bandwidth.
As a result, smart tv, smart phone and PC all suffer from video playback, and file downloads occupy 56.8Mbps of bandwidth.

Asus' adaptive qos tries to solve this problem by classifying and prioritizing packets.


cake:

cake example on 100Mbps/100Mbps symmetric internet.

In the same situation, cake searches nat and recognizes smart tv, smart phone, and PC as separate hosts and divides the bandwidth into three.
Therefore, the smart tv, smart phone, and PC are guaranteed a bandwidth of 33.3Mbps each, so the smart tv and smart phone will not experience any problems with video playback.

However, PC has 33.3Mbps (+ extra 16.6Mbps) bandwidth for 5 flows, so youtube gets 10Mbps and downloads files at 40Mbps. As a result, PC cannot watch 4K@30fps youtube video smoothly.

I personally think cake works pretty well and seems very suitable for environments with many users.
But it doesn't fit my internet speed (500Mbps/500Mbps) so I keep using adaptive qos + fq_codel + the freshjr script with a speed limit of 450Mbps.
My internet speed is fast, but when I reach maximum speed, I am experiencing bandwidth hogging and ping loss.


sched-cake-oot
RT-AC86U
https://drive.google.com/open?id=18sY2EmUxrw23ix-e0xHCWibLG6SB0YNu
RT-AX88U
https://drive.google.com/open?id=1YhawbEmvK1IMug9PeQbUH_gR8lN6o6Ee

tc-adv
https://drive.google.com/open?id=1cATB5RNBfwtxioP7JH89Sw-9PqX6voQ-

Here is the setting I tested.
This script is almost same with piece_of_cake.qos of openwrt sqm.

Edit : Simple installation process.

Turn off QoS if you were using it.

Code:
opkg install sched-cake-oot_2020-05-28-a5dccfd8-ax_aarch64-3.10.ipk
opkg install tc-adv_4.16.0-git-20191110_aarch64-3.10.ipk

nano /jffs/scripts/cake-start
Code:
#!/bin/sh

case $1 in
        start)
        logger "Starting Cake queue management"
		runner disable 2>/dev/null
		fc disable 2>/dev/null
		fc flush 2>/dev/null
		insmod /opt/lib/modules/sch_cake.ko 2>/dev/null

		#WAN-eth0
		/opt/sbin/tc qdisc replace dev eth0 root cake bandwidth 280mbit besteffort nat

		ip link add name ifb9eth0 type ifb
		/opt/sbin/tc qdisc del dev eth0 ingress 2>/dev/null
		/opt/sbin/tc qdisc add dev eth0 handle ffff: ingress
		/opt/sbin/tc qdisc del dev ifb9eth0 root 2>/dev/null
		/opt/sbin/tc qdisc add dev ifb9eth0 root cake bandwidth 280mbit besteffort nat wash ingress
		ifconfig ifb9eth0 up
		/opt/sbin/tc filter add dev eth0 parent ffff: protocol all prio 10 u32 match u32 0 0 flowid 1:1 action mirred egress redirect dev ifb9eth0
        ;;
        stop)
	logger "Stopping Cake queue management"
		##off
		/opt/sbin/tc qdisc del dev eth0 ingress 2>/dev/null
		/opt/sbin/tc qdisc del dev ifb9eth0 root 2>/dev/null
		/opt/sbin/tc qdisc del dev eth0 root 2>/dev/null
		ip link del ifb9eth0

		rmmod sch_cake 2>/dev/null
		fc enable
		runner enable
		;;
	*)
        echo "Usage: $0 {start|stop}"
        ;;
esac

chmod +x /jffs/scripts/cake-start

Code:
Change bandwidth values for your connection.
eth0 for upload, ifb9eth0 for download.

Kbit or Mbit both are ok.
e.g) 800Kbps upload and 10Mbps download.

/opt/sbin/tc qdisc replace dev eth0 root cake bandwidth 800Kbit besteffort nat
/opt/sbin/tc qdisc add dev ifb9eth0 root cake bandwidth 10Mbit besteffort nat ingress wash

nano /jffs/scripts/services-start
Code:
#!/bin/sh

/jffs/scripts/cake-start start
chmod +x /jffs/scripts/services-start
/jffs/scripts/services-start

let's see

tc qdisc
tc -s qdisc show dev eth0 (for upload)
tc -s qdisc show dev ifb9eth0 (for download)
 
Last edited:
I tested cake for a few days.

The RT-AC86U has a 1.8Ghz Cortex-A53 dual-core CPU and cake work without problems up to 280Mbps. Nat and queue only work at one core. Cake ran unstable from 290Mbps.

The main difference between cake and fq_codel is that cake supports per host queuing and fq_codel basically works with per flow queuing. (Of course, cake can also be operated in per flow queuing method.)

fq_codel:

fq_codel example on 100Mbps/100Mbps symmetric internet.

Suppose you do the following on one smart tv, one smart phone, and one PC.

The smart tv plays 4k netflix (25Mbps), the smart phone plays 4k@60fps (25Mbps) youtube video, the PC plays 4k@30fps youtube (20Mbps) video, and downloads large files with 4 simultaneous connections.

Then this network has a total of 7 flows, and fq_codel divides the 100Mbps bandwidth into 7 to guarantee 14.2Mbps of bandwidth.
As a result, smart tv, smart phone and PC all suffer from video playback, and file downloads occupy 56.8Mbps of bandwidth.

Asus' adaptive qos tries to solve this problem by classifying and prioritizing packets.


cake:

cake example on 100Mbps/100Mbps symmetric internet.

In the same situation, cake searches nat and recognizes smart tv, smart phone, and PC as separate hosts and divides the bandwidth into three.
Therefore, the smart tv, smart phone, and PC are guaranteed a bandwidth of 33.3Mbps each, so the smart tv and smart phone will not experience any problems with video playback.

However, PC has 33.3Mbps (+ extra 16.6Mbps) bandwidth for 5 flows, so youtube gets 10Mbps and downloads files at 40Mbps. As a result, PC cannot watch 4K@30fps youtube video smoothly.

I personally think cake works pretty well and seems very suitable for environments with many users.
But it doesn't fit my internet speed (500Mbps/500Mbps) so I use the freshjr script with a speed limit of 450Mbps.
My internet speed is fast, but when I reach maximum speed, I am experiencing bandwidth hogging and ping loss.


sched-cake-oot
https://drive.google.com/open?id=18sY2EmUxrw23ix-e0xHCWibLG6SB0YNu
tc-adv
https://drive.google.com/open?id=1cATB5RNBfwtxioP7JH89Sw-9PqX6voQ-

This is the setting I tested.
Code:
#!/bin/sh

runner disable 2>/dev/null
fc disable 2>/dev/null
fc flush 2>/dev/null
insmod /opt/lib/modules/sch_cake.ko 2>/dev/null

#WAN-eth0
/opt/sbin/tc qdisc replace dev eth0 root cake bandwidth 280Mbit besteffort nat

ip link add name ifb9eth0 type ifb
/opt/sbin/tc qdisc del dev eth0 ingress 2>/dev/null
/opt/sbin/tc qdisc add dev eth0 handle ffff: ingress
/opt/sbin/tc qdisc del dev ifb9eth0 root 2>/dev/null
/opt/sbin/tc qdisc add dev ifb9eth0 root cake bandwidth 280Mbit besteffort nat ingress wash
ifconfig ifb9eth0 up
/opt/sbin/tc filter add dev eth0 parent ffff: protocol all prio 10 u32 match u32 0 0 flowid 1:1 action mirred egress redirect dev ifb9eth0
I think the fresh jr script needs some tweaks for it to be usable with.
Did you use Merlin's tc intercept to inject cake?

I personally wonder how it runs on an AX88U.
 
Last edited:
You should try the triple isolate flag, I've found it to be much better. I've been running this setup for years on a edgerouter lite with great results.

I've given an example below:

Code:
#!/bin/sh

runner disable 2>/dev/null
fc disable 2>/dev/null
fc flush 2>/dev/null
insmod /opt/lib/modules/sch_cake.ko 2>/dev/null

#WAN-eth0
/opt/sbin/tc qdisc replace dev eth0 root cake bandwidth 280Mbit [B]triple-isolate[/B] nat

ip link add name ifb9eth0 type ifb
/opt/sbin/tc qdisc del dev eth0 ingress 2>/dev/null
/opt/sbin/tc qdisc add dev eth0 handle ffff: ingress
/opt/sbin/tc qdisc del dev ifb9eth0 root 2>/dev/null
/opt/sbin/tc qdisc add dev ifb9eth0 root cake bandwidth 280Mbit [B]triple-isolate[/B] nat ingress wash
ifconfig ifb9eth0 up
/opt/sbin/tc filter add dev eth0 parent ffff: protocol all prio 10 u32 match u32 0 0 flowid 1:1 action mirred egress redirect dev ifb9eth0
 
You should try the triple isolate flag, I've found it to be much better. I've been running this setup for years on a edgerouter lite with great results.

I've given an example below:

Code:
#!/bin/sh

runner disable 2>/dev/null
fc disable 2>/dev/null
fc flush 2>/dev/null
insmod /opt/lib/modules/sch_cake.ko 2>/dev/null

#WAN-eth0
/opt/sbin/tc qdisc replace dev eth0 root cake bandwidth 280Mbit [B]triple-isolate[/B] nat

ip link add name ifb9eth0 type ifb
/opt/sbin/tc qdisc del dev eth0 ingress 2>/dev/null
/opt/sbin/tc qdisc add dev eth0 handle ffff: ingress
/opt/sbin/tc qdisc del dev ifb9eth0 root 2>/dev/null
/opt/sbin/tc qdisc add dev ifb9eth0 root cake bandwidth 280Mbit [B]triple-isolate[/B] nat ingress wash
ifconfig ifb9eth0 up
/opt/sbin/tc filter add dev eth0 parent ffff: protocol all prio 10 u32 match u32 0 0 flowid 1:1 action mirred egress redirect dev ifb9eth0
triple isolate is default
 
triple isolate is default
My mistake, it's been a long time since I've looked at the documentation for this.

Try removing besteffort to utilize the different categories/tins for classifications, unless you have already tried this.
 
My mistake, it's been a long time since I've looked at the documentation for this.

Try removing besteffort to utilize the different categories/tins for classifications, unless you have already tried this.
cake prioritize packets to use dscp.
maybe normal users don't know much about dscp.
 
cake prioritize packets to use dscp.
maybe normal users don't know much about dscp.

For normal users it'll only be effective on outbound connections. For inbound if memory serves only 2 tins are utilized.

I've played around with a script someone made to do dscp marking on an x86 openwrt box on a busy network ([bunch of students] just over 20 devices and over a TB of inbound traffic per month) and it worked well to categorize everything.
 
I added them in services-start.
And change bandwidth values for your connection
eth0 for uplaod / ifb9eth0 for download.
I installed the .ipk considering they were files and made the script executable.

I personally recommend it should hook into the GUI values or the script values for bandwidth.
 
Last edited:
For normal users it'll only be effective on outbound connections. For inbound if memory serves only 2 tins are utilized.

I've played around with a script someone made to do dscp marking on an x86 openwrt box on a busy network ([bunch of students] just over 20 devices and over a TB of inbound traffic per month) and it worked well to categorize everything.
I have experience of google's dscp.
Sometimes googledrive data comes with CS2.
Youtube+quic comes with CS4.

I definitely saw googledrive count as video, during testing the cake with command [tc -s qdisc show dev ifb9eth0] when I configured cake as diffserv4.
It took priority over a regular network.

CS4 is fine for steaming video.
But CS2 for file download doens't looks good. (not always)
 
Last edited:
So far no luck, I installed the .ipk files, then I made a new script with the commands you gave, nothing even added the script to service start nothing is in the GUI am I missing something?
 
Last edited:
Status
Not open for further replies.

Similar threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top