The "CAKE w/ Adaptive Bandwidth" OpenWrt project addresses the application of the CAKE algorithm for mitigating bufferbloat to variable bandwidth connections such as 4G, 5G, LTE and Starlink.
An outcome of this project has been: cake-autorate - a bash script that automatically adjusts CAKE bandwidth settings based on traffic load and one-way-delay or round-trip-time measurements.
cake-autorate is intended for variable bandwidth connections and is not generally required for use on connections that have a stable, fixed bandwidth.
cake-autorate is primarily for use on top of an existing application of the CAKE qdiscs on the relevant interfaces (whether through the OpenWrt SQM packages or an alternative like cake-qos-simple - the latter supports DSCPs, which may be of particular value for connections that exhibit periods of lower bandwidth); cake-autorate then dynamically adjusts the CAKE bandwidth for those pre-existing CAKE qdiscs.
Alternatively, cake-autorate can also be used to monitor, log and analyse the achieved rates and latency in whatever resolution is desired of any connection (that is, it does not seek to alter the CAKE bandwidths of any pre-existing CAKE qdiscs).
cake-autorate includes the following features:
- simple control algorithm to adjust shaper rate in dependence upon monitored load and latency to increase shaper rate as much as possible before latency begins to suffer;
- can be used to adjust cake shaper rates on the fly or in a monitor mode just to monitor the underlying connection in very fine detail (latency and achieved rates);
- highly configurable using a config file - many aspects of the underlying control algorithm or other functionality is configurable;
- supports use of multiple ping binaries (ping, fping and tsping);
- active reflector maintenance including rotating out bad reflectors and converging on an optimal set from any initial set provided;
- utilises multiple states like running, idle and stall, with appropriate handling for each;
- advanced logging and log rotation features; and
- plotting tools for analyzing results Matlab or Grafana.
cake-autorate is now in a fairly mature state in the sense that the underlying control aspects, which have been found to work generally well, have not
changed in some time.
For convenience, an installer script is available.
cake-autorate has been designed for use on OpenWrt, but it can be run with only minor modification on other platforms like Asus Merlin too.
The cake-autorate Github repository resides at:
https://github.com/lynxthecat/cake-autorate
Current Status
- Stable branch:
cake-autorate version 3.2.0 was released on May 15 https://github.com/lynxthecat/cake-autorate/tree/v3.2
- Development branch:
https://github.com/lynxthecat/cake-autorate
Project History
The "CAKE w/ Adaptive Bandwidth" OpenWrt project builds upon the efforts of various experts on this forum spanning several years. For details concerning its early development, see these archived threads:
This is a new thread for continued discussion of the same.