What's new

CakeQOS CakeQOS-Merlin

  • 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!

I've been having a few laggy connections recently. I've been using FlexQoS and want to eliminate that as a potential problem (it is probably Virgin that's at fault - I'm paying for 300Mbps but currently getting 200Mbps).

I uninstalled FlexQoS and installed CakeQoS.

Are these Entware isn't ready warnings normal?
you need to install entware repo before installing cake as the cake install is in the entware repo.

you can easily install entware from the AMTM menu (part of merlin fw).
 
I wondered if there was an inherent hardware limitation I was bumping up against, or this is normal for cake-QOS...

For what it is worth, I did some troubleshooting by turning off hardware acceleration w/o cake-qos running and confirmed there is no hardware limitation. I'm just seeing cake-qos doing its thing and wasn't used to it.
 
you need to install entware repo before installing cake as the cake install is in the entware repo.

you can easily install entware from the AMTM menu (part of merlin fw).

I've inserted a USB drive and tried to follow this guide:


I'm not able to access AMTM?

ASUSWRT-Merlin RT-AX88U 384.19_0 Fri Aug 14 19:20:07 UTC 2020
username@RT-AX88U-8480:/tmp/home/root# /jffs/scripts/amtm
-sh: /jffs/scripts/amtm: not found
username@RT-AX88U-8480:/tmp/home/root# /jffs/scripts
-sh: /jffs/scripts: Permission denied
username@RT-AX88U-8480:/tmp/home/root# /jffs/scripts/
-sh: /jffs/scripts/: Permission denied
username@RT-AX88U-8480:/tmp/home/root# /jffs/scripts/amtm
-sh: /jffs/scripts/amtm: not found
username@RT-AX88U-8480:/tmp/home/root# /jffs/scripts/amtm/
-sh: /jffs/scripts/amtm/: not found
username@RT-AX88U-8480:/tmp/home/root#

I have a RT-AX88U router running Merlin 384.19.

I did format the JFFS partition when switching from FlexQoS. I've reinstalled Merlin, but there's no change.

I was able to access AMTM using this command:

Code:
curl -Os https://raw.githubusercontent.com/decoderman/amtm/master/amtm && sh amtm

I used the menu to format the USB, create the swap file and enable logging.

When I rebooted the router and SSH'd back into the CLI, I was no longer able to acccess AMTM via either the curl command or the jffs command.

Is the guide out of date? Am I doing something wrong?

*******************************************************************

** Edit **

I am able to access AMTM via the 'curl command'. I have installed CakeQoS.

This is the current status:

[[$] /opt/bin/cake-qos status general

#########################################################

CakeQOS-Merlin: > Download Status:
qdisc cake 8004: dev ifb9eth0 root refcnt 2 bandwidth 350Mbit besteffort triple-isolate nat wash ingress no-ack-filter split-gso rtt 100.0ms raw overhead 0 no-sce

CakeQOS-Merlin: > Upload Status:
qdisc cake 8003: dev eth0 root refcnt 2 bandwidth 35Mbit besteffort triple-isolate nat nowash no-ack-filter split-gso rtt 100.0ms raw overhead 0 no-sce


[$] /opt/bin/cake-qos status download

#########################################################

qdisc cake 8004: root refcnt 2 bandwidth 350Mbit besteffort triple-isolate nat wash ingress no-ack-filter split-gso rtt 100.0ms raw overhead 0 no-sce
Sent 1615570 bytes 2766 pkt (dropped 0, overlimits 824 requeues 0)
backlog 0b 0p requeues 0
memory used: 75Kb of 15140Kb
capacity estimate: 350Mbit
min/max network layer size: 60 / 1514
min/max overhead-adjusted size: 60 / 1514
average network hdr offset: 14

Tin 0
thresh 350Mbit
target 5.0ms
interval 100.0ms
pk_delay 1.6ms
av_delay 426us
sp_delay 1us
backlog 0b
pkts 2766
bytes 1615570
way_inds 0
way_miss 84
way_cols 0
marks 0
drops 0
ack_drop 0
sp_flows 1
bk_flows 1
un_flows 0
max_len 1514
quantum 1514

[$] /opt/bin/cake-qos status upload

#########################################################

qdisc cake 8003: root refcnt 2 bandwidth 35Mbit besteffort triple-isolate nat nowash no-ack-filter split-gso rtt 100.0ms raw overhead 0 no-sce
Sent 1010799 bytes 3111 pkt (dropped 1, overlimits 748 requeues 0)
backlog 0b 0p requeues 0
memory used: 238080b of 4Mb
capacity estimate: 35Mbit
min/max network layer size: 42 / 1514
min/max overhead-adjusted size: 42 / 1514
average network hdr offset: 14

Tin 0
thresh 35Mbit
target 5.0ms
interval 100.0ms
pk_delay 1.1ms
av_delay 79us
sp_delay 0us
backlog 0b
pkts 3112
bytes 1012145
way_inds 0
way_miss 196
way_cols 0
marks 0
drops 1
ack_drop 0
sp_flows 0
bk_flows 1
un_flows 0
max_len 1514
quantum 1068

qdisc ingress ffff: parent ffff:fff1 ----------------
Sent 1721232 bytes 3275 pkt (dropped 0, overlimits 0 requeues 0)
backlog 0b 0p requeues 0

[$] /opt/bin/cake-qos update

#########################################################

CakeQOS-Merlin: Your cake binaries are up-to-date.
CakeQOS-Merlin: cake-qos.sh is up-to-date.

#########################################################

My internet connection then died, so I rebooted my router.

Now when I enter any of the cakeqos commands I am receiving an error:

Code:
username@RT-AX88U-8480:/tmp/home/root# cakeqos
-sh: cakeqos: not found
 
Last edited:
I've inserted a USB drive and tried to follow this guide:


I'm not able to access AMTM?



I have a RT-AX88U router running Merlin 384.19.

I did format the JFFS partition when switching from FlexQoS. I've reinstalled Merlin, but there's no change.

I was able to access AMTM using this command:

Code:
curl -Os https://raw.githubusercontent.com/decoderman/amtm/master/amtm && sh amtm

I used the menu to format the USB, create the swap file and enable logging.

When I rebooted the router and SSH'd back into the CLI, I was no longer able to acccess AMTM via either the curl command or the jffs command.

Is the guide out of date? Am I doing something wrong?
Why don't try with just 'amtm' as the command? Besides, the 'amtm' command doesn't reside in "/jffs/scripts"
Code:
admin@RT-AX88U-56A8:/tmp/home/root# which amtm
/usr/sbin/amtm
 
Why don't try with just 'amtm' as the command? Besides, the 'amtm' command doesn't reside in "/jffs/scripts"
Code:
admin@RT-AX88U-56A8:/tmp/home/root# which amtm
/usr/sbin/amtm

Thanks for the tip. I can access amtm via the amtm command.

How do I access cakeqos?

Code:
username@RT-AX88U-8480:/tmp/home/root# cakeqos
-sh: cakeqos: not found

** Edit **

I'm an idiot - cake-qos!!!

________________________


I have Cake-QoS installed and have set some limits for download/upload.

I ran this speed test and could see some quite large buffer bloat spikes (300ms+).


I reduced my download and upload speeds and performed new tests. I'm still seeing some occasional buffer bloat spikes of around 30ms.

With QoS disabled, I get 350Mbps / 35Mbps. I have my limits set to 290Mbps / 27 Mbps

Is it possible to eradicate buffer bloat entirely? How low do I need to set my limits? they're already ~20% below my non-QoS speeds.
 
Last edited:
Thanks for the tip. I can access amtm via the amtm command.

How do I access cakeqos?

Code:
username@RT-AX88U-8480:/tmp/home/root# cakeqos
-sh: cakeqos: not found

** Edit **

I'm an idiot - cake-qos!!!

________________________


I have Cake-QoS installed and have set some limits for download/upload.

I ran this speed test and could see some quite large buffer bloat spikes (300ms+).


I reduced my download and upload speeds and performed new tests. I'm still seeing some occasional buffer bloat spikes of around 30ms.

With QoS disabled, I get 350Mbps / 35Mbps. I have my limits set to 290Mbps / 27 Mbps

Is it possible to eradicate buffer bloat entirely? How low do I need to set my limits? they're already ~20% below my non-QoS speeds.

I was hoping you'd discovered you'd omitted the dash/hyphen...lol.
to determine your optimum settings, it might be beneficial to read cake's manpage.
besteffort, unlimited (the connection itself is either limited technologically or throttled by your ISP...) and setting my rtt were the biggest "adjustments" I needed to make, as I recall. I'd have to look to see if there was anything going on with acks, but those could bear inspection too on any implementation
 
besteffort, unlimited (the connection itself is either limited technologically or throttled by your ISP...) and setting my rtt were the biggest "adjustments" I needed to make, as I recall. I'd have to look to see if there was anything going on with acks, but those could bear inspection too on any implementation

https://www.man7.org/linux/man-pages/man8/tc-cake.8.html#OVERHEAD_COMPENSATION_PARAMETERS

  • Overhead.
    • I'm with Virgin Media, so I guess I would use DOCSIS?
  • RTT
    • My gaming ping is ~30ms. Is that the RTT I need to be using?
    • If I perform a speed test (speedtest.net), I'm getting a 4-6ms ping.
    • Should I set it to Regional (medium sized European country - I live in London)?
  • Bandwidth
    • Virgin told me that this was the fastest broadband package they have available in my area, so I'm guessing that I'm not being limited by my ISP because my speeds exceed what I'm paying for.
    • If that's the case, should I set it to unlimited or bandwidth?
  • PRIORITY QUEUE PARAMETERS
    • Ideally, I'd like my gaming data or gaming PC's data to have absolutely highest priority on the home network and WAN link.
    • Besteffort sounds like it just chucks all network traffic in together, which seems 'a bit crap'.
    • Would diffserv4 be better?
    • Is diffserv4 better than diffserv3? I'm guessing it's newer?

What would a sample Cake QoS command look like and how would I enter it in the CLI?

Thanks for your help.
 
Just to confirm I also get this error intermittently after making the required changes to the wan interface

Don't specify an interface!
 
https://www.man7.org/linux/man-pages/man8/tc-cake.8.html#OVERHEAD_COMPENSATION_PARAMETERS

  • Overhead.
    • I'm with Virgin Media, so I guess I would use DOCSIS?
  • RTT
    • My gaming ping is ~30ms. Is that the RTT I need to be using?
    • If I perform a speed test (speedtest.net), I'm getting a 4-6ms ping.
    • Should I set it to Regional (medium sized European country - I live in London)?
  • Bandwidth
    • Virgin told me that this was the fastest broadband package they have available in my area, so I'm guessing that I'm not being limited by my ISP because my speeds exceed what I'm paying for.
    • If that's the case, should I set it to unlimited or bandwidth?
  • PRIORITY QUEUE PARAMETERS
    • Ideally, I'd like my gaming data or gaming PC's data to have absolutely highest priority on the home network and WAN link.
    • Besteffort sounds like it just chucks all network traffic in together, which seems 'a bit crap'.
    • Would diffserv4 be better?
    • Is diffserv4 better than diffserv3? I'm guessing it's newer?

What would a sample Cake QoS command look like and how would I enter it in the CLI?

Thanks for your help.

Too complicated!


Your ISP may be DOCSIS yet your router is ethernet. Ethernet always works...

Morris
 
https://www.man7.org/linux/man-pages/man8/tc-cake.8.html#OVERHEAD_COMPENSATION_PARAMETERS

  • Overhead.
    • I'm with Virgin Media, so I guess I would use DOCSIS?
  • RTT
    • My gaming ping is ~30ms. Is that the RTT I need to be using?
    • If I perform a speed test (speedtest.net), I'm getting a 4-6ms ping.
    • Should I set it to Regional (medium sized European country - I live in London)?
  • Bandwidth
    • Virgin told me that this was the fastest broadband package they have available in my area, so I'm guessing that I'm not being limited by my ISP because my speeds exceed what I'm paying for.
    • If that's the case, should I set it to unlimited or bandwidth?
  • PRIORITY QUEUE PARAMETERS
    • Ideally, I'd like my gaming data or gaming PC's data to have absolutely highest priority on the home network and WAN link.
    • Besteffort sounds like it just chucks all network traffic in together, which seems 'a bit crap'.
    • Would diffserv4 be better?
    • Is diffserv4 better than diffserv3? I'm guessing it's newer?

What would a sample Cake QoS command look like and how would I enter it in the CLI?

Thanks for your help.
@Morris is a heavy-hitter - he knows what he's talking about.
bandwidth - if memory serves, yours isn't a symmetrical connection; In an asymmetric connection like yours, packets are trying to fit out of the smaller hole to get out of your network rather than the bigger door into it - that's where they need lining up and right-sizing: on the download side set unlimited, on the upload side set between 90-95% of the speedtest result. 87% might be right, or 92%...keep testing your bufferbloat until you hit A/A+
Priority queuing - the sorting takes time, and not every website broadcasts the right metadata for the sorting to work, so besteffort is much less crap than a confused QoS trying to sort things based on how they smell (for all intents and purposes - routers don't have noses and electrons probably don't smell like much). until the tagging/attribution is more uniformly used and correct, everything tends to end up in one bin anyway. don't stress/obsess over this.
For RTT, ping your provider's homepage (presumably hosted on the server at the end of the first hop from your router)...I'm guessing the setting here that might be best for you is metro
as far as setting it up, follow the options/syntax in the script you launch on the command line with cake-qos. I can't remember which option it is (or they are), but it's a simple and clear interface. you'll do fine.
 
@Morris is a heavy-hitter - he knows what he's talking about.
bandwidth - if memory serves, yours isn't a symmetrical connection; In an asymmetric connection like yours, packets are trying to fit out of the smaller hole to get out of your network rather than the bigger door into it - that's where they need lining up and right-sizing: on the download side set unlimited, on the upload side set between 90-95% of the speedtest result. 87% might be right, or 92%...keep testing your bufferbloat until you hit A/A+
Priority queuing - the sorting takes time, and not every website broadcasts the right metadata for the sorting to work, so besteffort is much less crap than a confused QoS trying to sort things based on how they smell (for all intents and purposes - routers don't have noses and electrons probably don't smell like much). until the tagging/attribution is more uniformly used and correct, everything tends to end up in one bin anyway. don't stress/obsess over this.
For RTT, ping your provider's homepage (presumably hosted on the server at the end of the first hop from your router)...I'm guessing the setting here that might be best for you is metro
as far as setting it up, follow the options/syntax in the script you launch on the command line with cake-qos. I can't remember which option it is (or they are), but it's a simple and clear interface. you'll do fine.

Thanks for the reply.

Do you know that the units of the bandwidth command are? Do I need to enter 30mbps as '30 Mbit', '30720' or '31457280'?

Does the attached image look correct?
 

Attachments

  • image_2020-12-04_093727.png
    image_2020-12-04_093727.png
    20.7 KB · Views: 175
Thanks for the reply.

Do you know that the units of the bandwidth command are? Do I need to enter 30mbps as '30 Mbit', '30720' or '31457280'?

Does the attached image look correct?
If you start to use decimals and then run option 3, 3 it will give you the answer in lower units - my 10.5Mbit upload is shown in Kbit
Code:
#########################################################

CakeQOS-Merlin: > Download Status:
qdisc cake 8035: dev ifb9eth0 root refcnt 2 bandwidth 53Mbit besteffort triple-isolate nat nowash ingress no-ack-filter split-gso rtt 30.0ms raw overhead 0 no-sce

CakeQOS-Merlin: > Upload Status:
qdisc cake 8034: dev eth0 root refcnt 2 bandwidth 10500Kbit besteffort triple-isolate nat nowash ack-filter split-gso rtt 30.0ms raw overhead 0 no-sce

#########################################################
 
All: keep it simple by using defaults and things just work. Specify the following:
- upload speed
- download speed
- besteffort
- line type (ethernet, dsl, docus)

That's it. As simple as cake :-}
I agree these simple settings work for most users. This is where I've ended finally ended up after lots of experiments. Some users have reported good results with other parameters, but this is definitely the "Set and Forget" approach.

I'm sure @Morris is aware, but for the benefit of others, there is no need to leave a big bandwidth margin for Cake. If you have the correct overhead you can pretty much set to 100% of your actuals. I use 100% of my download and around 98% of my upload and get great results. If you read some of the Cake documentation on the internet this is covered.
 
Thanks for the reply.

Do you know that the units of the bandwidth command are? Do I need to enter 30mbps as '30 Mbit', '30720' or '31457280'?

Does the attached image look correct?
31457280 is the way...bps is the base unit, as I recall.
you don't need to tell it "rtt" (from the screenshot) - metro will suffice, but again, you can tell it a specific value that best fits your connection if it's somewhere between metro-regional-internet presets

The important thing is: how does the connection "feel" to users - better overall or no noticable change or still a few issues? 'better' is the goal, but 'no change' is an indication you're on the right path
 
I agree these simple settings work for most users. This is where I've ended finally ended up after lots of experiments. Some users have reported good results with other parameters, but this is definitely the "Set and Forget" approach.

I'm sure @Morris is aware, but for the benefit of others, there is no need to leave a big bandwidth margin for Cake. If you have the correct overhead you can pretty much set to 100% of your actuals. I use 100% of my download and around 98% of my upload and get great results. If you read some of the Cake documentation on the internet this is covered.

I suspect that Cake operates at 95% of what ever numbers you input. At least it feels that way in my testing. This is not to say it's what actually happens. What ever the reality is, we give up a little tiny bit of bandwidth to eliminate dropped packets that require window runout and retry effectively slowing throughput and response time. In reality, throughput can be faster using cake. The streaming and gamin experience with cake is a delight as long as you are not over subscribed for the real time application on your want link.

Morris
 
I suspect that Cake operates at 95% of what ever numbers you input. At least it feels that way in my testing. This is not to say it's what actually happens. What ever the reality is, we give up a little tiny bit of bandwidth to eliminate dropped packets that require window runout and retry effectively slowing throughput and response time. In reality, throughput can be faster using cake. The streaming and gamin experience with cake is a delight as long as you are not over subscribed for the real time application on your want link.

Morris
I read this paper last night and they have a good explanation of the bandwidth shaping options with graphs.
 
There was also a public service announcement posted on Reddit in April by @dtaht about CAKE. I think I found that paper linked in that thread.


Some of this has already been configured for us in the Asus Merlin Cake-QOS Script. Do a status and you will see the evidence. It was also discussed as it was being developed.

CakeQOS-Merlin: > Download Status:
qdisc cake 8019: dev ifb9eth0 root refcnt 2 bandwidth 107Mbit besteffort triple-isolate nat wash ingress no-ack-filter split-gso rtt 100.0ms noatm overhead 38 mpu 84 no-sce

CakeQOS-Merlin: > Upload Status:
qdisc cake 8018: dev eth0 root refcnt 2 bandwidth 116Mbit besteffort triple-isolate nat nowash no-ack-filter split-gso rtt 100.0ms noatm overhead 38 mpu 84 no-sce

Morris
 

Latest threads

Sign Up For SNBForums Daily Digest

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