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!

much happier. before, a single client going full throttle on up or down, would cause packet loss on other clients. no more!
also i just noticed that the DL speeds i get on spdMerlin top at:
running only suricata: 550Mbps
running only cake: 400Mbps
running both: 280Mbps

Interesting. I am on a lower speed line speed 150/15 and not seeing any difference. @rgnldo might be able to comment here.
 
Not sure on the "per client", but @jackiechun and I are contemplating adding some config options to include different Priority Queue Parameters (diffserv4) which puts traffic into 4 "tins" as noted here: https://man7.org/linux/man-pages/man8/tc-cake.8.html#PRIORITY_QUEUE_PARAMETERS

We currently use besteffort for both up/down in the script.
Thanks the per client portion I'm referring to is the ability to see internet traffic under the Adaptive QOS->Classification section. I believe that no longer works once you withdraw your privacy from TrendMicro. I can use the drop down box to show only certain client's current live traffic. I think the traffic analyzer section which shows me Stats and such would no longer work either.
 
Thanks the per client portion I'm referring to is the ability to see internet traffic under the Adaptive QOS->Classification section. I believe that no longer works once you withdraw your privacy from TrendMicro. I can use the drop down box to show only certain client's current live traffic. I think the traffic analyzer section which shows me Stats and such would no longer work either.

That's correct. I am willing to forego that for the simple stats via command line (for now), simple perf and better privacy.
 
Pleased to announce v0.0.3 has been released (I had time to hammer through most of the roadmap):

- update and uninstall options added
- install option will automatically check the repository for the latest and greatest cake binaries
- added support for users to use any other prioritization queue they like (e.g. diffserv3, diffserv4, diffserv8, besteffort). If none are explicitly specified it will default to besteffort.

To update/install: https://github.com/ttgapers/cakeqos-merlin#cakeqos-merlin

After updating/installing, if you want to use for example diffserv4 you can run: /jffs/scripts/cake-qos enable 135Mbit 13Mbit "diffserv4 docsis ack-filter" (assuming 135Mbit and 13Mbit download/upload speed + docsis ack-filter parameters)

If that happens, I’ll want to reward you, so set up a bitcoin wallet for me to do so, please.

I think I'd like to ask that any donations go towards @RMerlin ;) https://www.snbforums.com/threads/the-rmerlin-donation-thread.17285/
 
Interesting!

I might want to try Cake + Suricata once WWDC is done.

Does anyone have good instructions on how to set up that combo?

(Or is it just following their individual instructions?)
 
Interesting!

I might want to try Cake + Suricata once WWDC is done.

Does anyone have good instructions on how to set up that combo?

(Or is it just following their individual instructions?)

i just followed individual instructions.
 
For the sake of science, I decided to fool around with my RT-AX88U (main) router and the symmetrical 1Gbps up/down Fibre ISP connection I have with this script. :)

Without QoS of any sort, I normally get an indicated 1ms unloaded and 5ms loaded latencies on my i7 desktop with 950Mbps down and 880Mbps up speeds on fast.com. On dslreports.com, I get A+ on all categories too.

When I installed this script, I tested with both 950Mbps down and 850Mbps up and with 500Mbps down and 500Mbps up speeds for the "docsis ack-filter" parameters.

With both tests above, I achieved a latency of 2ms unloaded and 18 to 20ms loaded with speeds of 440Mbps down and 500Mbps up. On dslreports.com I dropped to A on all categories too.

The script works very well and, IMO, works well above the 250Mbps indicated in the notes. :)

Of course, for symmetrical Fibre connections below about 500Mbps it may prove unnecessary (only testing will tell for sure), but for any cable, DSL, or satellite connections, this script is a very welcome feature. I can't wait to test it with some of my customer's routers who have ISP connections much lower than mine.

Congrats to all here who contributed to this!

Now, my question is... how do I completely uninstall this script from my RT-AX88U? :D

terminal: /jffs/scripts/cake-qos stop
or remove cake-qos script or add .bak on the file from scripts and manually remove entry or comment out from firewall-start then restart your router
 
Installed as specified onto a AX88U and getting this as output when entering up and down speed plus overhead.
Code:
 /jffs/scripts/cake-qos enable
Broadcom Packet Flow Cache HW acceleration <DISABLED>
CPU Speed (*) ==> Disable
Changing power settings. Forcing cpu to max frequency.
   Set cpuspeed to on(pwr config --cpuspeed on) to make it adaptive again
Broadcom Packet Flow Cache learning via BLOG disabled.
Broadcom Packet Flow Cache flushing the flows
/jffs/scripts/cake-qos: line 162: /opt/sbin/tc: not found
RTNETLINK answers: File exists
/jffs/scripts/cake-qos: line 162: /opt/sbin/tc: not found
/jffs/scripts/cake-qos: line 162: /opt/sbin/tc: not found
/jffs/scripts/cake-qos: line 162: /opt/sbin/tc: not found
System log looks like this:
Code:
Jun 20 14:37:56 RT-AX88U-9D28 myusername: Cake Queue Management Enabled - settings: 40Mbit | 10Mbit | 4
Jun 20 14:37:56 RT-AX88U-9D28 myusername: Cake Queue Management Starting - settings: 40Mbit | 10Mbit | 4

you need to install:

Code:
opkg install tc-adv_4.16.0-git-20191110_aarch64-3.10.ipk
 
Interesting. I am on a lower speed line speed 150/15 and not seeing any difference. @rgnldo might be able to comment here.
As stated in the requirements, Cake-QoS works best with bandwidth below 250 mb/s.
 
Last edited:
I just installed cake on a fiber connection 300/50 and I have set it to 95% - 280/48.
Here are my results on dslreports after doing 2 tests before installing CAKE and another 2 tests after installing CAKE.
vqzw9fh
OmvziIb
OmvziIb

It seems my score and my speed improved :D.
I will monitor this on spdMerlin as there I have different speeds: 300/50 most of the time or slightly over 306/52.
*Sorry I don't really know how to insert the image in the comment .... i attached it instead.
 

Attachments

  • Annotation 2020-06-21 102642.jpg
    Annotation 2020-06-21 102642.jpg
    32.1 KB · Views: 243
@ttgapers / @jackiechun


Not sure if this might be useful.

Here is my method for auto detecting compatible routers, so ...assuming cake has been compiled for both HND and the newer AX models.

Code:
Get_Router_Model() {
    local HARDWARE_MODEL
    [ -z "$(nvram get odmpid)" ] && HARDWARE_MODEL=$(nvram get productid) || HARDWARE_MODEL=$(nvram get odmpid)
    echo $HARDWARE_MODEL
    return 0
}
Is_HND() {
    [ -n "$(uname -m | grep "aarch64")" ] && { echo Y; return 0; } || { echo N; return 1; }
}
Is_AX() {
    # Kernel is '4.1.52+' (i.e. isn't '2.6.36*') and it isn't HND
    [ -n "$(uname -r | grep "^4")" ] && [ -z "$(uname -m | grep "aarch64")" ] && { echo Y; return 0; } || { echo N; return 1; }
}


### Check Requirements

FAIL="0"
if [ "$(nvram get jffs2_scripts)" -ne 1 ]; then
    echo "ERROR: Custom JFFS Scripts must be enabled."
    FAIL="1"
fi
if [ ! -f "/opt/bin/opkg" ]; then
    echo "ERROR: Entware must be installed."
    FAIL="1"
fi
#################### Martineau Hack #############################
HARDWARE_MODEL="$(Get_Router_Model)"
if [ "$(Is_HND)" == "N" ] && [ "$(Is_AX)" == "N" ];then
    echo -e "\a\t[✖] ***ERROR Router $HARDWARE_MODEL isn't supported (Only HND-models RT-AC86U,RT-AX88U or RT-AX56U,RT-AX58U)"
    FAIL=1
fi
#################################################################
if [ "${FAIL}" = "1" ]; then
    return 1
fi
Hopefully you can also modify the script to auto-detect the compatible router model and eliminate the need for the user to explicitly specify the model number as the first argument passed to the script for the initial install.
 
Last edited:
I’m possibly not as worried about using Trend Micro as some and continue to run AiProtect.

The icing on the cake for me would be to combine cake’s superior queue handling with Trends ability to differentiate between traffic types and use diffserve

As I’m understanding it, cake is giving us far superior queue management but shares the available bandwidth fairly between clients. In my scenario, which I assume applies to others, I have limited bandwidth and want to ensure that for examples such as when I’m streaming live internet TV, a large download from a different device doesn’t get an equal share of my precious bandwidth, but instead gets what I can spare whilst still maintaining sufficient for the important stuff.

All of this is theory in my head rather than actual experience with cake so far.
 
I’m possibly not as worried about using Trend Micro as some and continue to run AiProtect.

The icing on the cake for me would be to combine cake’s superior queue handling with Trends ability to differentiate between traffic types and use diffserve

As I’m understanding it, cake is giving us far superior queue management but shares the available bandwidth fairly between clients. In my scenario, which I assume applies to others, I have limited bandwidth and want to ensure that for examples such as when I’m streaming live internet TV, a large download from a different device doesn’t get an equal share of my precious bandwidth, but instead gets what I can spare whilst still maintaining sufficient for the important stuff.

All of this is theory in my head rather than actual experience with cake so far.

The new release (0.0.3) allows more flexibility with other Priority Queue parameters (incl diffserv8, diffserv4 etc.). We use besteffort as defaults.
 
Last edited:

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

Staff online

Top