CAKE w/ Adaptive Bandwidth

GNU Octave, version 9.1.0

Ah, most recent versions of the octave script should have that fixed, octave stopped supporting matlab style .- and .+ operators and just expects plain - and + instead.
(These operators will do addition and subtraction between two matrices of equal dimensions, individually for each element)

1 Like

Please try the latest version on the master branch:

https://raw.githubusercontent.com/lynxthecat/cake-autorate/master/fn_parse_autorate_log.m

1 Like

cake-autorate v3.2.0 has just been released.


What's Changed

  • This version focuses on reducing CPU usage for everyday use.
  • Fold pinger parsing and pinger maintenance processes into main process thereby to reduce IPC overhead. This involved a significant restructure of the code.
  • Reduce overhead associated with achieved rate monitoring.
  • Improve IPC read efficiency of the main process.
  • Use buffered log file writes.
  • Replace costly regex with alternatives.
  • Disable costly logging options by default.
  • Improve efficiency of load classification.
  • Reduce frequency of shaper rate updates on high load by only permitting shaper rate increases on load updates and increasing the default shaper rate increase factor to give the same overall increase rate.
  • Only print log file headers to log file corresponding with toggled logging stats.
  • Remove Starlink satellite switching code given insufficient evidence that it helps especially given recent improvements to Starlink connections.
  • Add simple CPU benchmark script.
  • Add support for devices running Asus Merlin.
  • Other minor fixes and improvements.

Full Changelog : v3.1.1...v3.2.0


Since the underlying control logic in cake-autorate has remained settled for some time now, it seemed apt to streamline the code and focus on reducing CPU usage with default settings.

On my RT3200 running OpenWrt 23.05.3, total CPU usage for cake-autorate now sits at around 6-8% with default settings.

5 Likes

Hello there

I face problems while setting up cake-autorate properly, while I did already mention that in the previous CAKE thread, due to time reasons, I couldn't continue then. Meanwhile I installed the the version 3.3.0 prerelease by using the installation guide on github by @Lynx

I did some logs and found out that cake-autorate stops running because my interfaces for upload/download are not correct. I am using the router as a dump AP with just a lan (br-lan) interface, so I am confused what to set for dl_if and ul_if in the config file.
screenshot

cake-autorate doesn’t set up the cake instances (it could, but that’d be for a different discussion), rather it is intended to alter the bandwidths of existing, already instantiated interfaces. So I think your question really is more about how to setup cake correctly for your use case, rather than how to setup cake-autorate for it.

So backtracking, do you have cake instances set up already? You can check for that by checking the output from:

tc qdisc ls

2 Likes

I enabled SQM in LuCi and chose cake as queue discipline

By using
tc qdisc ls

I get the following output:

/etc$ tc qdisc ls
qdisc noqueue 0: dev lo root refcnt 2 
qdisc mq 0: dev eth0 root 
qdisc fq_codel 0: dev eth0 parent :10 limit 10240p flows 1024 quantum 1518 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64 
qdisc fq_codel 0: dev eth0 parent :f limit 10240p flows 1024 quantum 1518 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64 
qdisc fq_codel 0: dev eth0 parent :e limit 10240p flows 1024 quantum 1518 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64 
qdisc fq_codel 0: dev eth0 parent :d limit 10240p flows 1024 quantum 1518 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64 
qdisc fq_codel 0: dev eth0 parent :c limit 10240p flows 1024 quantum 1518 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64 
qdisc fq_codel 0: dev eth0 parent :b limit 10240p flows 1024 quantum 1518 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64 
qdisc fq_codel 0: dev eth0 parent :a limit 10240p flows 1024 quantum 1518 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64 
qdisc fq_codel 0: dev eth0 parent :9 limit 10240p flows 1024 quantum 1518 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64 
qdisc fq_codel 0: dev eth0 parent :8 limit 10240p flows 1024 quantum 1518 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64 
qdisc fq_codel 0: dev eth0 parent :7 limit 10240p flows 1024 quantum 1518 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64 
qdisc fq_codel 0: dev eth0 parent :6 limit 10240p flows 1024 quantum 1518 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64 
qdisc fq_codel 0: dev eth0 parent :5 limit 10240p flows 1024 quantum 1518 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64 
qdisc fq_codel 0: dev eth0 parent :4 limit 10240p flows 1024 quantum 1518 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64 
qdisc fq_codel 0: dev eth0 parent :3 limit 10240p flows 1024 quantum 1518 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64 
qdisc fq_codel 0: dev eth0 parent :2 limit 10240p flows 1024 quantum 1518 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64 
qdisc fq_codel 0: dev eth0 parent :1 limit 10240p flows 1024 quantum 1518 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64 
qdisc noqueue 0: dev lan3 root refcnt 2 
qdisc noqueue 0: dev lan2 root refcnt 2 
qdisc noqueue 0: dev lan1 root refcnt 2 
qdisc cake 8025: dev br-lan root refcnt 2 bandwidth 10Mbit besteffort triple-isolate nonat nowash no-ack-filter split-gso rtt 100ms raw overhead 0 
qdisc ingress ffff: dev br-lan parent ffff:fff1 ---------------- 
qdisc noqueue 0: dev phy1-ap0 root refcnt 2 
qdisc noqueue 0: dev phy0-ap0 root refcnt 2 
qdisc cake 8026: dev ifb4br-lan root refcnt 2 bandwidth 85Mbit besteffort triple-isolate nonat wash no-ack-filter split-gso rtt 100ms raw overhead 0

So it seems that you indeed have cake interfaces set up as: br-lan and ifb4br-lan?

Quick note on LAN-side directed interfaces like br-lan you likely will shape internet download with br-lan and internet upload with ifb4br-lan...