As you can see, the result is excellent however having an A+ or F or by waveform I see and feel no difference .. more some game server sends a class DSCP CS3 by default! I've tried to output CS3 as well but still no noticeable change! Is it possible that cake can't handle packets smaller than 350 bytes? And even less those of 78 bytes like on fifa! It's highly likely that I'll be compensated (comp lag) but that doesn't make any sense because that's like saying that all games and all game servers compensate me all the time.
On the latest release, it doesn't appear to be possible to turn logging to file off, setting log_to_file=0 results in:
SYSLOG; 2023-09-18-02:11:48; 1694999508.199189; Starting cake-autorate with PID: 16449 and config: /root/cake-autorate/config.primary.sh ERROR; 2023-09-18-02:11:48; 1694999508.383739; ./cake-autorate.sh: line 214: proc_pids['maintain_log_file']: unbound variable LOAD; 2023-09-18-02:11:48; 1694999508.396248; 1694999508.395147; 0; 4; 20000; 7000 INFO; 2023-09-18-02:11:48; 1694999508.398864; Stopping cake-autorate with PID: 16449 and config: /root/cake-autorate/config.primary.sh INFO; 2023-09-18-02:11:48; 1694999508.401351; Killing all background processes and cleaning up temporary files. ERROR; 2023-09-18-02:11:48; 1694999508.396029; ./cake-autorate.sh: line 248: proc_pids['maintain_log_file']: unbound variable ERROR; 2023-09-18-02:11:48; 1694999508.452563; ./cake-autorate.sh: line 1: pinger_pid: unbound variable SYSLOG; 2023-09-18-02:11:49; 1694999509.538473; Stopped cake-autorate with PID: 16449 and config: /root/cake-autorate/config.primary.sh
Thanks for reporting - fixed here:
@cbz can you confirm this issue is resolved with the latest code on 'master'?
I think this makes for a good time to release v3.1 now.
Confirmed, it works fine now
Here is the v3.1 release of cake-autorate:
Changes from v3.0:
- Removed consulting the achieved rate when setting the new shaper rate on detection of bufferbloat. Whilst the achieved transfer rate on bufferbloat detection can give insight into the connection capacity, leveraging this effectively proved troublesome.
- Introduced scaling of shaper rate reduction on bufferbloat based on the average OWD delta taken across the bufferbloat detection window as a portion of a user configurable average OWD delta threshold.
- Amended existing DATA log lines for more consistency and to incorporate the average OWD deltas and compensated thresholds.
- Introduced new SUMMARY log lines to offer a simple way to see a summary of key statistics using:
grep -e SUMMARY.
- Utilities that read from log file(s) will need to be updated to take into account the changes to the logging.
- Fixed startup crash when log to file is disabled.
- Fixed minor issue relating to parser termination traps.
For those wondering about the reduced activity on this thread and on GitHub compared to the last couple of years, I think the reason is that cake-autorate is in a mature state now and seems to be behaving satisfactorily in terms of performance and stability.
I began work on this project out of frustration with not being in a position to effectively leverage cake on my 4G connection in OpenWrt, and so much development of cake-autorate came about based on my wanting to get something that works reasonably well for my own connection. With help from @moeller0 and others, I think we now have something that works reasonably well for any variable rate connection. Naturally since I use cake-autorate 24/7, I remain motivated to keep working on it, albeit for now things to work on and improve, or further new features to add, are not readily apparent to me - and actually I'm welcoming that as it gives me more time for other things.
As ever, I welcome any feedback or comments from users, even if it is just simply to confirm that cake-autorate is working well.
I think it would useful to add a config option such that the summary is only printed out when the calculated values for ul/dl have changed (and also optionally enable these to be sent to syslog -- for those of us who centralise log collection).
Seems to me very specific. Also achieved rates can change even if the shaper rates don't. And don't forget that it's already possible to output shaper rate changes.
I think what you are looking for (selective logging to the system log) could easily be implemented in a wrapper script.
is there an updated example config for starlink somewhere?
Thanks for asking.
We released a patch update to address this:
Updated v3.1 example Starlink config here:
To bring the example Starlink config up to date with v3.1, compared to the previous example Starlink config for v3.0, these lines:
dl_delay_thr_ms=40 # (milliseconds) ul_delay_thr_ms=40 # (milliseconds)
have been replaced with:
dl_owd_delta_thr_ms=40.0 # (milliseconds) ul_owd_delta_thr_ms=40.0 # (milliseconds) dl_avg_owd_delta_thr_ms=80.0 # (milliseconds) ul_avg_owd_delta_thr_ms=80.0 # (milliseconds)
And the latter values really need testing and likely some tweaking for optimal performance and/or user-specific bandwidth-latency preference.
@starlinker, please report back any experience, good, bad, or ugly
That is an amazing result for starlink. Would it be possible for you to try a more difficult test, like the flent rrul and tcp_nup and tcp_ndown tests?
Apologies for the long message, but I just wanted to quickly share my anecdotal experience with cake-autorate on a 5G internet, in case it helps with further development (or with tweaking the default parameters etc).
So, I have Verizon 5G Home Internet and OpenWRT w/ Cake installed on an Raspberry Pi 4 that sits between the Verizon router (not actually acting as a router) and my Wifi Access Point.
I initially installed Cake (without autorate) due to bufferbloat that easily seen with bufferbloat tests and empirically when playing online games requiring low latency (mainly Rocket League). As I configured the SQM to about half of the top download and upload speeds (so in my case to 50Mbps down and 5Mbps up, when the max speed should be double that), it solved the bufferbloat problem pretty well and made the online gaming enjoyable.
Then after learning about this project (Cake w/ adaptive bandwidth) I gave it a go (I believe it was v. 3.0.0) trying to get more out of my connection when needed. However, just by changing the min/base/max bandwidth settings while using otherwise the default parameters, the experience was quite horrible.
On bufferbloat/speed tests the upload and download speeds were much lower than without the adaptive features, and the emprical tests playing Rocket League were even worse, as the lag was worse than it has even been. It is possible that latency improved slightly, but since that wasn't a problem even at higher speeds I didn't pay too much attention to latency at this point.
As I monitored the logs during bufferbloat tests, I saw the the download and upload speeds were being adjusted extremely fast both up and down (especially down when bufferbloat was detected, with the recovery adjustments being slower than that of course), and since the bufferbloat issue was already sufficiently well resolved with fixed SQM bandwidth settings, it seems like these speed adjustments were made more or less randomly rather than due to a kind of bufferbloat that cand actually be controlled via SQM adjustments.
That also seems to explain why online games became unplayable, as the wildly fluctuating bandwidth speeds seem to throw the game (Rocket League) completely off, causing way more lag that the actual bufferbloat would have caused.
By adjusting the parameters that control how quickly the traffic shaper adjusts up and down, I was able to resolve a lot of the issues and both make Rocket League playable again, and to get good speed test/bufferbloat results with low latency and better upload and download speeds that I had before using cake-autorate.
Here are my current settings in case anyone is interested. I'm sure they are still far from optimal even for my situtation, but to me they work infinitely better than the default values.
Finally, thanks to everyone who have been working on this project, as when configured well, it can be really useful for variable speed connection like the 5G home internet I have.
min_dl_shaper_rate_kbps=25000 base_dl_shaper_rate_kbps=50000 max_dl_shaper_rate_kbps=85000 min_ul_shaper_rate_kbps=4000 base_ul_shaper_rate_kbps=5000 max_ul_shaper_rate_kbps=10000 dl_owd_delta_thr_ms=30.0 ul_owd_delta_thr_ms=30.0 dl_avg_owd_delta_thr_ms=90.0 ul_avg_owd_delta_thr_ms=90.0 shaper_rate_min_adjust_down_bufferbloat=0.998 shaper_rate_max_adjust_down_bufferbloat=0.90 shaper_rate_adjust_up_load_high=1.001 shaper_rate_adjust_down_load_low=0.999 shaper_rate_adjust_up_load_low=1.002
Thanks for sharing. Would you be willing to reset the log file, then run a couple of speed tests, then export the log file and upload it for us to look at?