CAKE w/ Adaptive Bandwidth

So we have four timestamps:

9.9.9.9         : [0] Originate: 48987052, Received: 48987089, Transmit: 48987089, Finished: 48987109, RTT: 57, Down: 20, Up: 37,

And as per:

  • dl_owd_us = Finished - Transmit

  • ul_owd=us = Received - Originate

Now, if I understand correctly from your post here:

  • remote_send_ts = Transmit

  • local_send_ts = Originate

And so:

  • if Transmit rolls over to 0, then dl_owd_us will spike massively; and

  • if Originate rolls over to 0, then ul_owd_us will spike massively.

Either way, I'm thinking:

dl_owd_delta_us=$(( dl_owd_us - dl_owd_baselines_us[${reflector}] ))
ul_owd_delta_us=$(( ul_owd_us - ul_owd_baselines_us[${reflector}] ))

if (( (${dl_owd_delta_us#-} + ${ul_owd_delta_us#-}) < 3000000000 ))

will capture either local or remote rollover?

Are you running 22.03? If so, you can just download and upload in LuCi this:

Or you can follow the instructions here:

yep OpenWrt 22.03.4 r20123-38ccc47687 / LuCI openwrt-22.03 branch git-23.093.57104-ce20b4a

Perfect, then you can just download the opkg file from the link I gave above as I already compiled using: openwrt-sdk-22.03.4-mediatek-mt7622_gcc-11.2.0_musl.Linux-x86_64. Or use WSL 2 virtual machine or linux box, download the SDK, then just run the commands @Lochnair gave in his readme.

'tsping' will eventually get made an official OpenWrt package. It's super elegant and is the only ping binary that supports round robin pinging plus ICMP type 13.

Your ipk worked

root@OpenWrt:~# tsping
Usage: tsping [OPTION...] IP1 IP2 IP3 ...
Try `tsping --help' or `tsping --usage' for more information.
1 Like

Sweet, so now just adjust your config like so:

root@OpenWrt-1:~# cat cake-autorate/cake-autorate_config.primary.sh
#!/bin/bash

# *** STANDARD CONFIGURATION OPTIONS ***

### For multihomed setups, it is the responsibility of the user to ensure that the probes
### sent by this instance of cake-autorate actually travel through these interfaces.
### See ping_extra_args and ping_prefix_string

dl_if=ifb-wan # download interface
ul_if=wan     # upload interface

# Set either of the below to 0 to adjust one direction only
# or alternatively set both to 0 to simply use cake-autorate to monitor a connection
adjust_dl_shaper_rate=1 # enable (1) or disable (0) actually changing the dl shaper rate
adjust_ul_shaper_rate=1 # enable (1) or disable (0) actually changing the ul shaper rate

min_dl_shaper_rate_kbps=5000  # minimum bandwidth for download (Kbit/s)
base_dl_shaper_rate_kbps=20000 # steady state bandwidth for download (Kbit/s)
max_dl_shaper_rate_kbps=80000  # maximum bandwidth for download (Kbit/s)

min_ul_shaper_rate_kbps=5000  # minimum bandwidth for upload (Kbit/s)
base_ul_shaper_rate_kbps=20000 # steady state bandwidth for upload (KBit/s)
max_ul_shaper_rate_kbps=35000  # maximum bandwidth for upload (Kbit/s)

randomize_reflectors=0

pinger_binary=tsping

reflectors=(
"9.9.9.9" "9.9.9.10" "9.9.9.11" # Quad9
"94.140.14.15" "94.140.14.140" "94.140.14.141" "94.140.15.15" "94.140.15.16" # AdGuard
"64.6.65.6" "156.154.70.1" "156.154.70.2" "156.154.70.3" "156.154.70.4" "156.154.70.5" "156.154.71.1" "156.154.71.2" "156.154.71.3" "156.154.71.4" "156.154.71.5" # Neustar
"208.67.220.2" "208.67.220.123" "208.67.220.220" "208.67.222.2" "208.67.222.123" # OpenDNS
"185.228.168.9" "185.228.168.10" # CleanBrowsing
)

dl_delay_thr_ms=10 # (milliseconds)
ul_delay_thr_ms=30 # (milliseconds)

config_file_check="cake-autorate"

That is, remove Google and Cloudflare from the reflectors (as they do not support ICMP type 13), specify the tsping binary, reduce the dl_delay_thr from 30 to 10, and consider turning reflector randomization off if you feel good about the first few items on the list (which will be used as the initial reflector set - for me these work well).

Ok so my new config is this

root@OpenWrt:~/cake-autorate# cat cake-autorate_config.primary.sh
#!/bin/bash

# *** STANDARD CONFIGURATION OPTIONS ***

### For multihomed setups, it is the responsibility of the user to ensure that the probes
### sent by this instance of cake-autorate actually travel through these interfaces.
### See ping_extra_args and ping_prefix_string

output_processing_stats=1       # enable (1) or disable (0) output monitoring lines showing processing stats
output_load_stats=1             # enable (1) or disable (0) output monitoring lines showing achieved loads
output_reflector_stats=1        # enable (1) or disable (0) output monitoring lines showing reflector stats
output_cake_changes=1           # enable (1) or disable (0) output monitoring lines showing cake bandwidth changes
debug=1                         # enable (1) or disable (0) out of debug lines

#log_to_file=1
# log file path defaults to /var/log/
# or, if set below, then ${log_file_path_override}
#log_file_path_override="/var/log/cake-autorate.primary.log"

dl_if=ifb4wan # download interface
ul_if=wan     # upload interface

# Set either of the below to 0 to adjust one direction only
# or alternatively set both to 0 to simply use cake-autorate to monitor a connection
adjust_dl_shaper_rate=1 # enable (1) or disable (0) actually changing the dl shaper rate
adjust_ul_shaper_rate=1 # enable (1) or disable (0) actually changing the ul shaper rate

min_dl_shaper_rate_kbps=20000  # minimum bandwidth for download (Kbit/s)
base_dl_shaper_rate_kbps=30000 # steady state bandwidth for download (Kbit/s)
max_dl_shaper_rate_kbps=100000  # maximum bandwidth for download (Kbit/s)

min_ul_shaper_rate_kbps=3000  # minimum bandwidth for upload (Kbit/s)
base_ul_shaper_rate_kbps=4000 # steady state bandwidth for upload (KBit/s)
max_ul_shaper_rate_kbps=15000  # maximum bandwidth for upload (Kbit/s)

# *** OVERRIDES ***

randomize_reflectors=0

pinger_binary=tsping

reflectors=(
"9.9.9.9" "9.9.9.10" "9.9.9.11" # Quad9
"94.140.14.15" "94.140.14.140" "94.140.14.141" "94.140.15.15" "94.140.15.16" # AdGuard
"64.6.65.6" "156.154.70.1" "156.154.70.2" "156.154.70.3" "156.154.70.4" "156.154.70.5" "156.154.71.1" "156.154.71.2" "156.154.71.3" "156.154.71.4" "156.154.71.5" # Neustar
"208.67.220.2" "208.67.220.123" "208.67.220.220" "208.67.222.2" "208.67.222.123" # OpenDNS
"185.228.168.9" "185.228.168.10" # CleanBrowsing
)

dl_delay_thr_ms=10 # (milliseconds)
ul_delay_thr_ms=30 # (milliseconds)

### See cake-autorate_defaults.sh for additional configuration options
### that can be set in this configuration file to override the defaults.
### Place any such overrides below this line.


# *** DO NOT EDIT BELOW THIS LINE ***

config_file_check="cake-autorate"

Looks like it is using tsping now

root@OpenWrt:~/cake-autorate# ./cake-autorate.sh
DEBUG; 2023-05-06-13:58:39; 1683381519.685383; Starting: rotate_log_file with PID: 10605
DEBUG; 2023-05-06-13:58:39; 1683381519.690108; Starting: print_headers with PID: 10605
DATA_HEADER; LOG_DATETIME; LOG_TIMESTAMP; PROC_TIME_US; DL_ACHIEVED_RATE_KBPS; UL_ACHIEVED_RATE_KBPS; DL_LOAD_PERCENT; UL_LOAD_PERCENT; RTT_TIMESTAMP; REFLECTOR; SEQUENCE; DL_OWD_BASELINE; DL_OWD_US; DL_OWD_DELTA_EWMA_US; DL_OWD_DELTA_US; DL_ADJ_DELAY_THR; UL_OWD_BASELINE; UL_OWD_US; UL_OWD_DELTA_EWMA_US; UL_OWD_DELTA_US; UL_ADJ_DELAY_THR; SUM_DL_DELAYS; SUM_UL_DELAYS; DL_LOAD_CONDITION; UL_LOAD_CONDITION; CAKE_DL_RATE_KBPS; CAKE_UL_RATE_KBPS
LOAD_HEADER; LOG_DATETIME; LOG_TIMESTAMP; PROC_TIME_US; DL_ACHIEVED_RATE_KBPS; UL_ACHIEVED_RATE_KBPS; CAKE_DL_RATE_KBPS; CAKE_UL_RATE_KBPS
REFLECTOR_HEADER; LOG_DATETIME; LOG_TIMESTAMP; PROC_TIME_US; REFLECTOR; DL_MIN_BASELINE_US; DL_BASELINE_US; DL_BASELINE_DELTA_US; DL_BASELINE_DELTA_THR_US; DL_MIN_DELTA_EWMA_US; DL_DELTA_EWMA_US; DL_DELTA_EWMA_DELTA_US; DL_DELTA_EWMA_DELTA_THR; UL_MIN_BASELINE_US; UL_BASELINE_US; UL_BASELINE_DELTA_US; UL_BASELINE_DELTA_THR_US; UL_MIN_DELTA_EWMA_US; UL_DELTA_EWMA_US; UL_DELTA_EWMA_DELTA_US; UL_DELTA_EWMA_DELTA_THR
SYSLOG; 2023-05-06-13:58:39; 1683381519.694779; Starting cake-autorate with PID: 10605 and config: /root/cake-autorate/cake-autorate_config.primary.sh
DEBUG; 2023-05-06-13:58:39; 1683381519.705872; Starting: maintain_log_file with PID: 10615
DEBUG; 2023-05-06-13:58:39; 1683381519.706330; CAKE-autorate version: 2.0.0
DEBUG; 2023-05-06-13:58:39; 1683381519.708333; config_path: /root/cake-autorate/cake-autorate_config.primary.sh
DEBUG; 2023-05-06-13:58:39; 1683381519.710177; run_path: /var/run/cake-autorate/primary
DEBUG; 2023-05-06-13:58:39; 1683381519.711904; log_file_path: /var/log/cake-autorate.primary.log
DEBUG; 2023-05-06-13:58:39; 1683381519.713626; pinger_binary:tsping
DEBUG; 2023-05-06-13:58:39; 1683381519.715278; download interface: ifb4wan (20000 / 30000 / 100000)
DEBUG; 2023-05-06-13:58:39; 1683381519.716754; upload interface: wan (3000 / 4000 / 15000)
DEBUG; 2023-05-06-13:58:39; 1683381519.718105; rx_bytes_path: /sys/class/net/ifb4wan/statistics/tx_bytes
DEBUG; 2023-05-06-13:58:39; 1683381519.719533; tx_bytes_path: /sys/class/net/wan/statistics/tx_bytes
DEBUG; 2023-05-06-13:58:39; 1683381519.721219; Starting: verify_ifs_up with PID: 10605
SHAPER; 2023-05-06-13:58:39; 1683381519.737920; tc qdisc change root dev ifb4wan cake bandwidth 30000Kbit
SHAPER; 2023-05-06-13:58:39; 1683381519.744043; tc qdisc change root dev wan cake bandwidth 4000Kbit
DEBUG; 2023-05-06-13:58:39; 1683381519.757691; Starting: monitor_achieved_rates with PID: 10627
DEBUG; 2023-05-06-13:58:39; 1683381519.761457; Starting: maintain_pingers with PID: 10629
LOAD; 2023-05-06-13:58:39; 1683381519.763715; 1683381519.763363; 0; 0; 30000; 4000
INFO; 2023-05-06-13:58:39; 1683381519.772819; Started cake-autorate with PID: 10605 and config: /root/cake-autorate/cake-autorate_config.primary.sh
DEBUG; 2023-05-06-13:58:39; 1683381519.786781; Starting pingers.
DEBUG; 2023-05-06-13:58:39; 1683381519.788042; Starting: parse_tsping with PID: 10632
DEBUG; 2023-05-06-13:58:39; 1683381519.789691; Starting: start_pinger with PID: 10629
DEBUG; 2023-05-06-13:58:39; 1683381519.792179; Starting: change_state_maintain_pingers with PID: 10629
DEBUG; 2023-05-06-13:58:39; 1683381519.794591; Changing maintain_pingers state from: START to: RUNNING
DATA; 2023-05-06-13:58:39; 1683381519.832314; 1683381519.831644; 0; 0; 0; 0; 1683381519.8247800; 9.9.9.9; 0; 23500; 15000; -807; -8500; 10050; 18100; 9000; -864; -9100; 30375; 0; 0; dl_idle; ul_idle; 30000; 4000
DATA; 2023-05-06-13:58:39; 1683381519.881971; 1683381519.881306; 0; 0; 0; 0; 1683381519.8742470; 9.9.9.10; 0; 23500; 15000; -807; -8500; 10050; 17200; 8000; -874; -9200; 30375; 0; 0; dl_idle; ul_idle; 30000; 4000
DATA; 2023-05-06-13:58:39; 1683381519.938728; 1683381519.938164; 0; 0; 0; 0; 1683381519.9304380; 9.9.9.11; 0; 24400; 16000; -798; -8400; 10050; 21700; 13000; -826; -8700; 30375; 0; 0; dl_idle; ul_idle; 30000; 4000
LOAD; 2023-05-06-13:58:39; 1683381519.962959; 1683381519.962640; 109; 21; 30000; 4000
DATA; 2023-05-06-13:58:39; 1683381519.991831; 1683381519.991207; 109; 21; 0; 0; 1683381519.9841300; 94.140.14.15; 0; 34300; 27000; -693; -7300; 10050; 15400; 6000; -893; -9400; 30375; 0; 0; dl_idle; ul_idle; 30000; 4000
DATA; 2023-05-06-13:58:40; 1683381520.049867; 1683381520.049297; 109; 21; 0; 0; 1683381520.0422160; 94.140.14.140; 0; 32500; 25000; -712; -7500; 10050; 24400; 16000; -798; -8400; 30375; 0; 0; dl_idle; ul_idle; 30000; 4000
DATA; 2023-05-06-13:58:40; 1683381520.099535; 1683381520.098972; 109; 21; 0; 0; 1683381520.0918800; 94.140.14.141; 0; 31600; 24000; -722; -7600; 10050; 24400; 16000; -798; -8400; 30375; 0; 0; dl_idle; ul_idle; 30000; 4000
DATA; 2023-05-06-13:58:40; 1683381520.137362; 1683381520.136801; 109; 21; 0; 0; 1683381520.1296850; 9.9.9.9; 1; 15850; 15000; -811; -850; 10050; 12610; 12000; -839; -610; 30375; 0; 0; dl_idle; ul_idle; 30000; 4000
LOAD; 2023-05-06-13:58:40; 1683381520.163714; 1683381520.163386; 81; 21; 30000; 4000
DATA; 2023-05-06-13:58:40; 1683381520.178252; 1683381520.177683; 81; 21; 0; 0; 1683381520.1703910; 9.9.9.10; 1; 16750; 16000; -801; -750; 10050; 3520; 2000; -935; -1520; 30375; 0; 0; dl_idle; ul_idle; 30000; 4000
DATA; 2023-05-06-13:58:40; 1683381520.225844; 1683381520.225292; 81; 21; 0; 0; 1683381520.2189510; 9.9.9.11; 1; 14140; 13000; -830; -1140; 10050; 4870; 3000; -925; -1870; 30375; 0; 0; dl_idle; ul_idle; 30000; 4000
DATA; 2023-05-06-13:58:40; 1683381520.300595; 1683381520.300031; 81; 21; 0; 0; 1683381520.2929860; 94.140.14.15; 1; 25930; 25000; -715; -930; 10050; 15040; 15000; -811; -40; 30375; 0; 0; dl_idle; ul_idle; 30000; 4000
DATA; 2023-05-06-13:58:40; 1683381520.349729; 1683381520.349166; 81; 21; 0; 0; 1683381520.3426330; 94.140.14.140; 1; 25750; 25000; -715; -750; 10050; 15940; 15000; -811; -940; 30375; 0; 0; dl_idle; ul_idle; 30000; 4000
LOAD; 2023-05-06-13:58:40; 1683381520.364399; 1683381520.364075; 91; 21; 30000; 4000
DATA; 2023-05-06-13:58:40; 1683381520.401507; 1683381520.400946; 91; 21; 0; 0; 1683381520.3939060; 94.140.14.141; 1; 26560; 26000; -706; -560; 10050; 15040; 14000; -820; -1040; 30375; 0; 0; dl_idle; ul_idle; 30000; 4000
DATA; 2023-05-06-13:58:40; 1683381520.437833; 1683381520.437272; 91; 21; 0; 0; 1683381520.4302140; 9.9.9.9; 2; 15850; 16000; -719; 150; 10050; 11161; 11000; -774; -161; 30375; 0; 0; dl_idle; ul_idle; 30000; 4000
DATA; 2023-05-06-13:58:40; 1683381520.485720; 1683381520.485161; 91; 21; 0; 0; 1683381520.4777080; 9.9.9.10; 2; 16751; 18000; -606; 1249; 10050; 3522; 6000; -610; 2478; 30375; 0; 0; dl_idle; ul_idle; 30000; 4000
DATA; 2023-05-06-13:58:40; 1683381520.533482; 1683381520.532891; 91; 21; 0; 0; 1683381520.5262810; 9.9.9.11; 2; 14141; 16000; -574; 1859; 10050; 4872; 7000; -634; 2128; 30375; 0; 0; dl_idle; ul_idle; 30000; 4000
LOAD; 2023-05-06-13:58:40; 1683381520.565462; 1683381520.565136; 98; 21; 30000; 4000
DATA; 2023-05-06-13:58:40; 1683381520.594313; 1683381520.593700; 98; 21; 0; 0; 1683381520.5870930; 94.140.14.15; 2; 25093; 25000; -655; -93; 10050; 9604; 9000; -791; -604; 30375; 0; 0; dl_idle; ul_idle; 30000; 4000
DATA; 2023-05-06-13:58:40; 1683381520.645430; 1683381520.644866; 98; 21; 0; 0; 1683381520.6377770; 94.140.14.140; 2; 25075; 25000; -654; -75; 10050; 8794; 8000; -809; -794; 30375; 0; 0; dl_idle; ul_idle; 30000; 4000
DATA; 2023-05-06-13:58:40; 1683381520.699835; 1683381520.699270; 98; 21; 0; 0; 1683381520.6928280; 94.140.14.141; 2; 25156; 25000; -653; -156; 10050; 13204; 13000; -761; -204; 30375; 0; 0; dl_idle; ul_idle; 30000; 4000
DATA; 2023-05-06-13:58:40; 1683381520.745327; 1683381520.744762; 98; 21; 0; 0; 1683381520.7379110; 9.9.9.9; 3; 15852; 18000; -446; 2148; 10050; 11164; 15000; -336; 3836; 30375; 0; 0; dl_idle; ul_idle; 30000; 4000
LOAD; 2023-05-06-13:58:40; 1683381520.766003; 1683381520.765679; 138; 93; 30000; 4000
DATA; 2023-05-06-13:58:40; 1683381520.797100; 1683381520.796540; 138; 93; 0; 2; 1683381520.7896390; 9.9.9.10; 3; 15175; 15000; -565; -175; 10050; 3538; 20000; 1011; 16462; 30375; 0; 0; dl_idle; ul_idle; 30000; 4000
DATA; 2023-05-06-13:58:40; 1683381520.847481; 1683381520.846913; 138; 93; 0; 2; 1683381520.8402440; 9.9.9.11; 3; 14142; 16000; -342; 1858; 10050; 4887; 20000; 861; 15113; 30375; 0; 0; dl_idle; ul_idle; 30000; 4000
DATA; 2023-05-06-13:58:40; 1683381520.909975; 1683381520.909408; 138; 93; 0; 2; 1683381520.9028880; 94.140.14.15; 3; 25009; 25000; -593; -9; 10050; 9616; 22000; 460; 12384; 30375; 0; 0; dl_idle; ul_idle; 30000; 4000
DATA; 2023-05-06-13:58:40; 1683381520.955056; 1683381520.954485; 138; 93; 0; 2; 1683381520.9479730; 94.140.14.140; 3; 25007; 25000; -592; -7; 10050; 8802; 17000; 46; 8198; 30375; 0; 0; dl_idle; ul_idle; 30000; 4000
LOAD; 2023-05-06-13:58:40; 1683381520.966779; 1683381520.966450; 95; 23; 30000; 4000
DATA; 2023-05-06-13:58:41; 1683381521.010259; 1683381521.009690; 95; 23; 0; 0; 1683381521.0031900; 94.140.14.141; 3; 25156; 26000; -510; 844; 10050; 13212; 22000; 146; 8788; 30375; 0; 0; dl_idle; ul_idle; 30000; 4000
DATA; 2023-05-06-13:58:41; 1683381521.038345; 1683381521.037776; 95; 23; 0; 0; 1683381521.0313840; 9.9.9.9; 4; 15853; 17000; -294; 1147; 10050; 9216; 9000; -324; -216; 30375; 0; 0; dl_idle; ul_idle; 30000; 4000
DATA; 2023-05-06-13:58:41; 1683381521.087344; 1683381521.086775; 95; 23; 0; 0; 1683381521.0803190; 9.9.9.10; 4; 15175; 16000; -432; 825; 10050; 3543; 9000; 1433; 5457; 30375; 0; 0; dl_idle; ul_idle; 30000; 4000
DATA; 2023-05-06-13:58:41; 1683381521.137196; 1683381521.136631; 95; 23; 0; 0; 1683381521.1300790; 9.9.9.11; 4; 14143; 16000; -133; 1857; 10050; 4890; 8000; 1074; 3110; 30375; 0; 0; dl_idle; ul_idle; 30000; 4000
LOAD; 2023-05-06-13:58:41; 1683381521.167480; 1683381521.167150; 97; 21; 30000; 4000
DATA; 2023-05-06-13:58:41; 1683381521.211298; 1683381521.210704; 97; 21; 0; 0; 1683381521.2029990; 94.140.14.15; 4; 25000; 25000; -536; 0; 10050; 9627; 21000; 1496; 11373; 30375; 0; 0; dl_idle; ul_idle; 30000; 4000
DATA; 2023-05-06-13:58:41; 1683381521.259659; 1683381521.259078; 97; 21; 0; 0; 1683381521.2523810; 94.140.14.140; 4; 25000; 25000; -535; 0; 10050; 8814; 21000; 1199; 12186; 30375; 0; 0; dl_idle; ul_idle; 30000; 4000
DATA; 2023-05-06-13:58:41; 1683381521.310424; 1683381521.309853; 97; 21; 0; 0; 1683381521.3031450; 94.140.14.141; 4; 25156; 26000; -381; 844; 10050; 13219; 21000; 871; 7781; 30375; 0; 0; dl_idle; ul_idle; 30000; 4000
DATA; 2023-05-06-13:58:41; 1683381521.338022; 1683381521.337458; 97; 21; 0; 0; 1683381521.3310210; 9.9.9.9; 5; 15854; 17000; -157; 1146; 10050; 8121; 8000; -304; -121; 30375; 0; 0; dl_idle; ul_idle; 30000; 4000
LOAD; 2023-05-06-13:58:41; 1683381521.368267; 1683381521.367949; 84; 21; 30000; 4000
DATA; 2023-05-06-13:58:41; 1683381521.387062; 1683381521.386502; 84; 21; 0; 0; 1683381521.3800800; 9.9.9.10; 5; 15175; 16000; -312; 825; 10050; 3546; 7000; 1624; 3454; 30375; 0; 0; dl_idle; ul_idle; 30000; 4000
DATA; 2023-05-06-13:58:41; 1683381521.449782; 1683381521.449211; 84; 21; 0; 0; 1683381521.4428150; 9.9.9.11; 5; 14146; 18000; 245; 3854; 10050; 4902; 17000; 2121; 12098; 30375; 0; 0; dl_idle; ul_idle; 30000; 4000
DATA; 2023-05-06-13:58:41; 1683381521.510757; 1683381521.510190; 84; 21; 0; 0; 1683381521.5035100; 94.140.14.15; 5; 25001; 26000; -390; 999; 10050; 9637; 20000; 2338; 10363; 30375; 0; 0; dl_idle; ul_idle; 30000; 4000
^CDEBUG; 2023-05-06-13:58:41; 1683381521.558568; Starting: cleanup_and_killall with PID: 10605
INFO; 2023-05-06-13:58:41; 1683381521.561363; Stopping cake-autorate with PID: 10605 and config: /root/cake-autorate/cake-autorate_config.primary.sh
INFO; 2023-05-06-13:58:41; 1683381521.563552; Killing all background processes and cleaning up temporary files.
DEBUG; 2023-05-06-13:58:41; 1683381521.567356; Terminating monitor_achieved_rates.
DEBUG; 2023-05-06-13:58:41; 1683381521.569618; Terminating monitor_achieved_rates.
DEBUG; 2023-05-06-13:58:41; 1683381521.571417; Starting: kill_maintain_pingers with PID: 10629
DEBUG; 2023-05-06-13:58:41; 1683381521.572974; Terminating maintain_pingers.
DEBUG; 2023-05-06-13:58:41; 1683381521.580917; Killing tsping instance.
DEBUG; 2023-05-06-13:58:41; 1683381521.584281; Starting: kill_pinger with PID: 10629
DEBUG; 2023-05-06-13:58:41; 1683381521.692666; Terminating parse_tsping.
DEBUG; 2023-05-06-13:58:42; 1683381522.584672; Starting: kill_maintain_log_file with PID: 10615
DEBUG; 2023-05-06-13:58:42; 1683381522.585874; Starting: flush_log_fd with PID: 10615
SYSLOG; 2023-05-06-13:58:42; 1683381522.686044; Stopped cake-autorate with PID: 10605 and config: /root/cake-autorate/cake-autorate_config.primary.sh

OK perfect. Now you can then test by using a modified 'betterpseedtest.sh' that I hacked.

Here is my hacked 'betterspeedtest.sh':

https://raw.githubusercontent.com/lynxthecat/OpenWrtScripts/bidir/betterspeedtest.sh

To use it, just install package netperf, then please run a test like so:

  • manually run cake-autorate by running ./cake-autorate.sh
  • in a separate terminal run:
  • then ctrl-c cake-autorate
  • then upload /var/log/cake-autorate.primary.log and link to it
  • ideally also upload @moeller0's plotting analysis results (or I can do those too)

I am super curious to see how the results data looks on your connection.

1 Like

Ok here is the log, speeds are a bit slower at the moment...

https://gist.githubusercontent.com/bairhys/34f0c5410d3c6b8994acf8709d4f19df/raw/fe25bb29e547ef9d449c99cd1ae0216ef1c22167/cake-autorate.primary.log

1 Like

For some reason this only seems to show download, but not upload?

I don't understand, doesn't the green line show upload?

In both tests, upload were around 3.5mbps

Here is an excel plot showing only 9.9.9.9:

@rb1 I think the data does show upload, and it's just a scaling issue.

Presumably the download is enough to generate a whole bunch of upload receive acknowledgements that actually result in some data transfer?

Are you using cake's ack-filter?

Raw CDFs:

Delta CDFs:

Any thoughts @moeller0?

I repeated the test. Here is some more data

https://gist.githubusercontent.com/bairhys/631797f7e30be87824448089acd19db6/raw/670374c48f665aecd78d134a8f6a2fb416eea18e/cake-autorate.primary.log

sh ./betterspeedtest.sh -H server -t 60 && sh ./betterspeedtest.sh -H server -t 60 --bidir
Testing against server (ipv4) with 5 simultaneous sessions while pinging gstatic.com (60 seconds in each direction)
.............................................................
 Download: 43.72 Mbps
  Latency: (in msec, 61 pings, 0.00% packet loss)
      Min: 23.800
    10pct: 26.000
   Median: 36.600
      Avg: 39.962
    90pct: 48.600
      Max: 95.300
..............................................................
   Upload: 4.39 Mbps
  Latency: (in msec, 62 pings, 0.00% packet loss)
      Min: 28.500
    10pct: 30.800
   Median: 44.900
      Avg: 48.368
    90pct: 67.700
      Max: 96.400
Testing against server (ipv4) with 5 simultaneous sessions while pinging gstatic.com (60 seconds in each direction)
..........................................................................................................................
 Download: 48.56 Mbps
  Latency: (in msec, 61 pings, 0.00% packet loss)
      Min: 31.200
    10pct: 33.200
   Median: 45.800
      Avg: 55.475
    90pct: 91.200
      Max: 148.000
.
   Upload: 2.83 Mbps
  Latency: (in msec, 62 pings, 0.00% packet loss)
      Min: 29.900
    10pct: 29.900
   Median: 43.700
      Avg: 53.174
    90pct: 85.200
      Max: 147.000

1 Like

That includes some Netflix/Prime streaming too?

https://www.waveform.com/tools/bufferbloat test results?

This is my sqm setup

root@OpenWrt:~/cake-autorate# cat /etc/config/sqm

config queue 'eth1'
        option qdisc 'cake'
        option script 'piece_of_cake.qos'
        option linklayer 'none'
        option download '60000'
        option upload '5000'
        option debug_logging '0'
        option verbosity '5'
        option interface 'wan'
        option enabled '1'
        option qdisc_advanced '1'
        option qdisc_really_really_advanced '1'
        option squash_dscp '1'
        option squash_ingress '1'
        option ingress_ecn 'ECN'
        option egress_ecn 'NOECN'
        option eqdisc_opts 'nat dual-srchost memlimit 32mb'

Output from 'tc qdisc ls' (and waveform bufferbloat test?).

You don't see to experience what I had - lower upload delta on high load:

Yes I think someone is on youtube

oh I didn't know about this test

root@OpenWrt:~/cake-autorate# tc qdisc ls
qdisc noqueue 0: dev lo root refcnt 2
qdisc fq_codel 0: dev eth0 root refcnt 2 limit 10240p flows 1024 quantum 1518 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
qdisc noqueue 0: dev lan1 root refcnt 2
qdisc noqueue 0: dev lan2 root refcnt 2
qdisc noqueue 0: dev lan3 root refcnt 2
qdisc noqueue 0: dev lan4 root refcnt 2
qdisc cake 8015: dev wan root refcnt 2 bandwidth 4Mbit besteffort dual-srchost nat nowash no-ack-filter split-gso rtt 100ms raw overhead 0 memlimit 32Mb
qdisc ingress ffff: dev wan parent ffff:fff1 ----------------
qdisc noqueue 0: dev br-lan root refcnt 2
qdisc noqueue 0: dev wlan0 root refcnt 2
qdisc noqueue 0: dev wlan1 root refcnt 2
qdisc fq_codel 0: dev tun0 root refcnt 2 limit 10240p flows 1024 quantum 1500 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
qdisc cake 8016: dev ifb4wan root refcnt 2 bandwidth 47076Kbit besteffort triple-isolate nonat wash no-ack-filter split-gso rtt 100ms raw overhead 0

Save for the relatively meagre upload rate, that looks pretty sweet to me.

Could you repeat without cake?

Yeah my LTE maxes out at about 80/10 but been raining most of day today