CAKE w/ Adaptive Bandwidth [October 2021 to September 2022]

@yelreve do you include a facility to output lines like the shell script? I ask because I think it is important to be able to output plots of bandwidth and RTT to make sure all is working as it should.

I like this plot a lot (albeit optimisation is still needed to stop those larger RTT spikes, but I haven't had enough time to optimise):

Because for me it shows how the LTE bandwidth scales up upon loading. You see the small bufferbloat (false) ceilings in the initial rise:

but as the LTE connection between my B818-263 modem and cell tower gets optimized (max theoretically possible bandwidth on my connection given single channel and no channel aggregation is 80Mbit/s I believe) it can keep going higher from 20Mbit/s all the way up to around 50Mbit/s where it oscillates:

So you see an algorithm could get thrown by stopping the climb upon the initial false ceilings. Would the theory in your script handle this situation? Such a climb will not always occur because whereas this particular climb reflects a relatively unloaded cell tower, when the cell tower faces congestion the possible ascent will look different. And add to that variability associated with signal propagation issues (in my case not such a big factor, but in other LTE connections can be a big factor).

Factors like this make me wonder if not just keeping it all super simple is best, because trying to do clever stuff might break given underlying complexities. Complexity that works for connections: {A, B and C} may completely fail for connections: {D, E and F}.

Also what do we do with connections like @Knomax's:

Certainly I think being able to output something like this is really helpful.

Yes CSV output would be good because that has been asked for for analysis purposes above.

Presently I have:

printf "%s;%14.2f;%14.2f;%14.2f;%14.2f;%14.2f;%14.2f;%14.2f;\n" $( date "+%Y%m%dT%H%M%S.%N" )) $rx_load $tx_load $baseline_RTT $RTT $delta_RTT $cur_dl_rate $cur_ul_rate

Hi @Lynx, I've built in the ability to write the adjustments out to a json log file, can tweak this to give a CSV output instead if that would be more useful? :slight_smile:

1 Like

hey do you guys have any tips on how to reduce rollback in fighting games i mainly play brawlhalla and when i attack someone i hear the sound as if im hitting the person but im not and then get instantly punished

Sorry, but CAKE /w Adaptive Bandwidth is more geared towards helping individuals with relationship issues. Specifically it helps avoid dating websites lagging owing to concurrent downloads of self-help DVDs and the like.

2 Likes

uhhh ok wait are u being serious

Yes, check it out:

root@OpenWrt:~# ping mysinglefriend.com
PING mysinglefriend.com (212.32.224.182) 56(84) bytes of data.
64 bytes from slb.i2.datinglab.net (212.32.224.182): icmp_seq=1 ttl=49 time=54.4 ms
64 bytes from slb.i2.datinglab.net (212.32.224.182): icmp_seq=2 ttl=49 time=54.9 ms
64 bytes from slb.i2.datinglab.net (212.32.224.182): icmp_seq=3 ttl=49 time=43.3 ms
64 bytes from slb.i2.datinglab.net (212.32.224.182): icmp_seq=4 ttl=49 time=61.3 ms
64 bytes from slb.i2.datinglab.net (212.32.224.182): icmp_seq=5 ttl=49 time=55.2 ms
^C
--- mysinglefriend.com ping statistics ---
6 packets transmitted, 5 received, 16.6667% packet loss, time 5006ms
rtt min/avg/max/mdev = 43.336/53.824/61.324/5.823 ms

This is with downloading:

Now, by utilising CAKE /w Adaptive Bandwidth, my life is complete.

  1. A computer implemented method of controlling bufferbloat associated with lifestyle website use in combination with one or more of a plurality of self-help related downloads, the method comprising the steps of:
    a) performing a plurality of RTT measurements in respect of one or more reflectors thereby to obtain a current RTT metric;
    b) updating a baseline RTT metric based on the current RTT metric;
    c) measuring one or both of a download and upload transmission rate thereby to determine one or both of a download rate metric and an upload rate metric; and
    d) updating an SQM bandwidth parameter in dependence upon a comparison of the current RTT metric against the updated baseline RTT metric and the determined download rate metric and/or upload rate metric.

  2. A computer-readable storage medium comprising instructions which, when executed by a processor, cause the processor to carry out the method according to claim 1.

  3. The computer-readable storage medium according to claim 2, comprising a holographic identifier arranged to present, in accordance with a first viewing angle, a graphic relating to a lifestyle website, and, in accordance with a second viewing angle, a graphic relating to a self-help source.

The intellectual property governing the sale of such DVD's according to claim 3 is available for sale to the highest bidder!

4 Likes

Oh dear. :rofl: :nerd_face: :stuck_out_tongue_closed_eyes:

hello everyone the script gave me an error I replaced line 124 like that, tell me if I did well
before

     printf "%s;%14.2f;%14.2f;%14.2f;%14.2f;%14.2f;%14.2f;%14.2f;\n" $( date "+%Y%m%dT%H%M%S.%N" )) $rx_load $tx_load $baseline_RTT $RTT $delta_RTT $cur_dl_rate $cur_ul_rate

by this after

         printf "%s;%14.2f;%14.2f;%14.2f;%14.2f;%14.2f;%14.2f;%14.2f;\n" $( date "+%Y%m%dT%H%M%S.%N" ) $rx_load $tx_load $baseline_RTT $RTT $delta_RTT $cur_dl_rate $cur_ul_rate

just one ) not two ))
have a nice day

1 Like

Yes, thanks. Will commit this fix.

Please can you post output now with heavy download (I mean whilst browsing lifestyle website and downloading multiple self-help .ISO files)?

1 Like

i woulld like use a file service i put like this

for tmp and see graphic

Capture cake 1

#!/bin/sh /etc/rc.common
# Copyright (C) 2007 OpenWrt.org

export PATH=/usr/sbin:/usr/bin:/sbin:/bin
export HOME=/root

exec &> /tmp/sqm-autorate.log

START=97
STOP=4

start() {
        /root/sqm-autorate.sh&
}

stop() {
        ps | grep sqm-autorate.sh | grep -v grep | awk '{print $1}' | xargs kill
}

it's just ?

1 Like

Yes, but please can you post output from manual run first. Just want to make sure the timestamping stuff is working properly...? Also would like to see how it ramps up on your connection upon heavy download associated with the self-help .ISO files...

1 Like

like this ?

20211106T181701.405197246;          0.38;          0.15;          0.22;          0.22;         -0.01;       6000.00;      16000.00;
20211106T181702.419709791;          0.43;          0.16;          0.20;          0.20;         -0.02;       6000.00;      16000.00;
20211106T181703.439929098;          0.41;          0.14;          0.21;          1.08;          0.88;       6000.00;      16000.00;
20211106T181704.447385910;          0.35;          0.16;          0.21;          0.33;          0.12;       6000.00;      16000.00;
20211106T181705.467120653;          0.38;          0.15;          0.21;          0.23;          0.02;       6000.00;      16000.00;
20211106T181706.488522769;          0.40;          0.15;          0.22;          1.31;          1.10;       6000.00;      16000.00;
20211106T181707.496521985;          0.39;          0.14;          0.22;          0.32;          0.10;       6000.00;      16000.00;
20211106T181708.521797729;          0.43;          0.15;          0.23;          0.68;          0.45;       6000.00;      16000.00;
20211106T181709.526711162;          0.39;          0.14;          0.25;          1.95;          1.72;       6000.00;      16000.00;
20211106T181710.549341687;          0.43;          0.15;          0.25;          1.02;          0.78;       6000.00;      16000.00;
20211106T181711.557672106;          0.41;          0.14;          0.26;          0.79;          0.53;       6000.00;      16000.00;
20211106T181712.568922866;          0.38;          0.14;          0.27;          1.38;          1.12;       6000.00;      16000.00;
20211106T181713.582849566;          0.40;          0.15;          0.27;          0.35;          0.08;       6000.00;      16000.00;
20211106T181714.593840484;          0.40;          0.15;          0.27;          0.34;          0.07;       6000.00;      16000.00;
20211106T181715.604069557;          0.40;          0.15;          0.29;          1.72;          1.45;       6000.00;      16000.00;
20211106T181716.625034469;          0.39;          0.15;          0.26;          0.25;         -0.03;       6000.00;      16000.00;
20211106T181717.631064231;          0.39;          0.14;          0.26;          0.68;          0.43;       6000.00;      16000.00;
20211106T181718.643243398;          0.34;          0.15;          0.28;          1.90;          1.64;       6000.00;      16000.00;
20211106T181719.660263161;          0.40;          0.15;          0.29;          1.33;          1.06;       6000.00;      16000.00;
20211106T181720.677557406;          0.37;          0.15;          0.29;          0.35;          0.06;       6000.00;      16000.00;
20211106T181721.689593452;          0.42;          0.14;          0.30;          1.82;          1.53;       6000.00;      16000.00;
20211106T181722.705915290;          0.36;          0.15;          0.24;          0.23;         -0.07;       6000.00;      16000.00;
20211106T181723.726367798;          0.39;          0.15;          0.24;          0.56;          0.32;       6000.00;      16000.00;
20211106T181729.817128052;          0.41;          0.14;          0.29;          0.35;          0.06;       6000.00;      16000.00;

Capturecake 2 ^^

Perfect, thanks. @moeller0 is this what you had in mind for keeping timestamps?

BTW you don't load the connection enough to have bandwidth ramp up. If you load it with multiple .ISO downloads, do you see the bandwidth scale up properly until bufferbloat?

1 Like

good ! for the file service can you help me

i feel iam near succed thanks

ok i will surcharge the bandwith

I think just chmod +x the service file and enable and start having set 'enable_verbose_output=0'?

1 Like

Yes, except the time part would be better in seconds after midnight instead of the HHMMSS.nanosec format currently in use... but for human sanity checking this is excellent as is as well as to estimate cycle time, which in the example was ~1.2 seconds

2 Likes

ok i has test but not work where is my error ?
output to the file /root sqm to 0

and file +x is ok in /etc/init.d

@Knomax can help because he got it to work. He mentioned permissions issue with service file?

If you require more immediate input, I'd suggest heading to the IRC OpenWrt channel and asking there. Or perhaps someone will suggest something on this thread.

1 Like

ok so before i have make an error with my value i has reversed the dl and upload

20211106T185705.770155177;          0.06;          0.39;          0.23;          1.21;          0.99;      36000.00;       6000.00;
20211106T185706.777948111;          0.06;          0.42;          0.23;          0.25;          0.02;      36000.00;       6000.00;
20211106T185707.785578953;          0.07;          0.38;          0.24;          1.13;          0.90;      36000.00;       6000.00;
20211106T185708.823132002;          0.07;          0.40;          0.24;          0.32;          0.08;      36000.00;       6000.00;
20211106T185709.840659454;          0.06;          0.41;          0.24;          0.61;          0.38;      36000.00;       6000.00;

20211106T185635.210429928;          0.07;          0.41;          0.29;          0.28;         -0.03;      36000.00;       6000.00;
20211106T185636.225210543;          0.07;          0.40;          0.29;          0.35;          0.06;      36000.00;       6000.00;
20211106T185637.260597465;          0.07;          0.41;          0.30;          1.26;          0.97;      36000.00;       6000.00;
20211106T185638.281700105;          0.06;          0.40;          0.30;          0.30;          0.00;      36000.00;       6000.00;
20211106T185639.302930814;          0.07;          0.39;          0.24;          0.24;         -0.06;      36000.00;       6000.00;
20211106T185640.314204394;          0.06;          0.41;          0.24;          0.31;          0.07;      36000.00;       6000.00;
20211106T185641.327128776;          0.07;          0.41;          0.25;          1.28;          1.04;      36000.00;       6000.00;
20211106T185642.362238355;          0.07;          0.41;          0.25;          0.36;          0.11;      36000.00;       6000.00;
20211106T185643.404526456;          0.07;          0.41;          0.26;          0.55;          0.29;      36000.00;       6000.00;
20211106T185644.384960714;          0.06;          0.40;          0.26;          0.56;          0.31;      36000.00;       6000.00;
20211106T185645.425504298;          0.08;          0.40;          0.26;          0.52;          0.25;      36000.00;       6000.00;
20211106T185646.427872620;          0.07;          0.40;          0.26;          0.35;          0.09;      36000.00;       6000.00;
20211106T185647.434218401;          0.06;          0.42;          0.27;          0.75;          0.49;      36000.00;       6000.00;
20211106T185648.476664603;          0.06;          0.39;          0.27;          0.29;          0.02;      36000.00;       6000.00;
20211106T185649.484982215;          0.07;          0.42;          0.29;          1.94;          1.67;      36000.00;       6000.00;
20211106T185650.507220560;          0.06;          0.36;          0.29;          0.54;          0.26;      36000.00;       6000.00;
20211106T185651.524732938;          0.06;          0.42;          0.29;          0.43;          0.14;      36000.00;       6000.00;
20211106T185652.547156462;          0.08;          0.44;          0.29;          0.79;          0.50;      36000.00;       6000.00;
20211106T185653.559707339;          0.07;          0.38;          0.31;          1.63;          1.34;      36000.00;       6000.00;
20211106T185654.595325018;          0.07;          0.41;          0.31;          0.72;          0.42;      36000.00;       6000.00;
20211106T185655.592521677;          0.07;          0.40;          0.29;          0.29;         -0.02;      36000.00;       6000.00;
20211106T185656.600830489;          0.06;          0.40;          0.30;          0.65;          0.36;      36000.00;       6000.00;
20211106T185657.637648301;          0.07;          0.40;          0.31;          2.06;          1.76;      36000.00;       6000.00;
20211106T185658.630008810;          0.07;          0.40;          0.32;          0.63;          0.32;      36000.00;       6000.00;
20211106T185659.674013213;          0.07;          0.40;          0.32;          0.52;          0.20;      36000.00;       6000.00;
20211106T185700.669102360;          0.06;          0.41;          0.32;          0.39;          0.07;      36000.00;       6000.00;
20211106T185701.701865536;          0.07;          0.39;          0.34;          2.01;          1.69;      36000.00;       6000.00;
20211106T185702.715123675;          0.07;          0.40;          0.34;          0.51;          0.18;      36000.00;       6000.00;
20211106T185703.736636184;          0.07;          0.42;          0.34;          0.38;          0.04;      36000.00;       6000.00;
20211106T185710.864503580;          0.07;          0.41;          0.25;          1.53;          1.30;      36000.00;       6000.00;
20211106T185711.876682490;          0.07;          0.40;          0.26;          0.69;          0.43;      36000.00;       6000.00;