CAKE w/ Adaptive Bandwidth

Hello again. What exactly should I be using for dl_if and ul_if

Here's my output of 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 cake 8011: dev eth1 root refcnt 17 bandwidth 9Mbit besteffort triple-isolate nonat nowash no-ack-filter split-gso rtt 100ms noatm overhead 44
qdisc ingress ffff: dev eth1 parent ffff:fff1 ----------------
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 noqueue 0: dev lan5 root refcnt 2
qdisc noqueue 0: dev lan1 root refcnt 2
qdisc noqueue 0: dev br-lan root refcnt 2
qdisc noqueue 0: dev phy0-ap0 root refcnt 2
qdisc noqueue 0: dev phy1-ap0 root refcnt 2
qdisc cake 8012: dev ifb4eth1 root refcnt 2 bandwidth 9Mbit besteffort dual-dsthost nat wash ingress no-ack-filter split-gso rtt 100ms noatm overhead 44

I assume it's eth1 for ul_if and is it ifb4eth1 for dl_if?

1 Like

Yes because those are the interfaces with the cake qdisc.

With cake-autorate running, if you repeatedly call the same command, you should see the cake bandwidths getting continuously adjusted in dependence upon load and latency.

Of course once you are satisfied about that, you can switch to monitoring cake-autorate’s own log for a much more thorough picture of what’s going on.

1 Like

Alright so with cake auto-rate i don't know if its actually working because it says
"l_idle; ul_idle; 75000; 30686" as im playing counter strike, and my download and upload latency both spikes 20-40ms and it still says "l_idle; ul_idle; 75000; 30686" when im monitoring it. I might be doing something wrong. I tried my best to adjust everything myself but as i don't like asking for help but getting a headache for the past week trying to figure this all out. Can someone help me out, thanks!

Here are my sqm settings


config queue 'eth1'
        option enabled '1'
        option interface 'wan'
        option download '75000'
        option upload '30000'
        option qdisc 'cake'
        option script 'layer_cake.qos'
        option qdisc_advanced '1'
        option ingress_ecn 'NOECN'
        option egress_ecn 'NOECN'
        option linklayer 'ethernet'
        option debug_logging '1'
        option verbosity '5'
        option squash_dscp '0'
        option squash_ingress '0'
        option overhead '22'
        option linklayer_advanced '1'
        option tcMTU '2047'
        option tcTSIZE '128'
        option tcMPU '64'
        option linklayer_adaptation_mechanism 'default'

So i've been able to get these results
https://www.waveform.com/tools/bufferbloat?test-id=921a1a05-16d1-416b-9758-d7810e92f8ac

But my jitter is like 20-40ms on the download and upload when im ingame on counter strike. Im trying to fix my jitter issue im having.

And here is my results with no sqm or cake-autorate settings
https://www.waveform.com/tools/bufferbloat?test-id=5b71a589-7f91-4968-aaa1-a0f701f138ea
And my jitter is better ingame with these results.

So im doing something wrong inside of the sqm settings or cake-autorate settings (btw im hooked up to ethernet cat6 cable)

Also

Here is my bufferbloat test with modem not bridged
https://www.waveform.com/tools/bufferbloat?test-id=4c953288-2c6c-4095-9eeb-5428a6c833d9

Here is bufferbloat test with modem bridged to my wrt1900ac router (current setup):
https://www.waveform.com/tools/bufferbloat?test-id=5b71a589-7f91-4968-aaa1-a0f701f138ea

Here are some of the logs when im playing counter strike

DATA; 2024-12-11-17:37:14; 1733938634.551471; 1733938634.549033; 46; 33; 0; 0; 1733938634.                                                                          54142; 156.154.70.3; 633; 10182; 11300; 1184; 1118; 20162; 10182; 11300; 1184; 1118; 20396                                                                          ; 0; 917; 10162; 40162; 0; 917; 10396; 40396; dl_idle; ul_idle; 75000; 30686
SUMMARY; 2024-12-11-17:37:14; 1733938634.553910; 46; 33; 0; 0; 917; 917; dl_idle; ul_idle;                                                                           75000; 30686
DATA; 2024-12-11-17:37:14; 1733938634.592765; 1733938634.590113; 46; 33; 0; 0; 1733938634.                                                                          58254; 208.67.220.220; 633; 5991; 6800; 942; 809; 20162; 5991; 6800; 942; 809; 20396; 0; 7                                                                          44; 10162; 40162; 0; 744; 10396; 40396; dl_idle; ul_idle; 75000; 30686
SUMMARY; 2024-12-11-17:37:14; 1733938634.595197; 46; 33; 0; 0; 744; 744; dl_idle; ul_idle;                                                                           75000; 30686
DATA; 2024-12-11-17:37:14; 1733938634.642300; 1733938634.639865; 46; 33; 0; 0; 1733938634.                                                                          63241; 185.228.168.9; 634; 5125; 6700; 1718; 1575; 20162; 5125; 6700; 1718; 1575; 20396; 0                                                                          ; 913; 10162; 40162; 0; 913; 10396; 40396; dl_idle; ul_idle; 75000; 30686
SUMMARY; 2024-12-11-17:37:14; 1733938634.644731; 46; 33; 0; 0; 913; 913; dl_idle; ul_idle;                                                                           75000; 30686
CPU_RAW; 2024-12-11-17:37:14; 1733938634.702690; 1733938634.700438; cpu; 35368; 0; 19557;                                                                           2611829; 7; 0; 98422; 0; 0; 0
CPU_RAW; 2024-12-11-17:37:14; 1733938634.705961; 1733938634.700438; cpu0; 23300; 0; 11327;                                                                           1249540; 5; 0; 98416; 0; 0; 0
CPU_RAW; 2024-12-11-17:37:14; 1733938634.709293; 1733938634.700438; cpu1; 12068; 0; 8230;                                                                           1362289; 2; 0; 6; 0; 0; 0
CPU; 2024-12-11-17:37:14; 1733938634.711274; 1733938634.700438; 14; 27; 1
DATA; 2024-12-11-17:37:14; 1733938634.715341; 1733938634.712898; 46; 33; 0; 0; 1733938634.                                                                          69328; 156.154.70.4; 634; 10598; 12100; 1387; 1502; 20162; 10598; 12100; 1387; 1502; 20396                                                                          ; 0; 1251; 10162; 40162; 0; 1251; 10396; 40396; dl_idle; ul_idle; 75000; 30686
SUMMARY; 2024-12-11-17:37:14; 1733938634.717788; 46; 33; 0; 0; 1251; 1251; dl_idle; ul_idl                                                                          e; 75000; 30686
DATA; 2024-12-11-17:37:14; 1733938634.748027; 1733938634.746759; 46; 33; 0; 0; 1733938634.                                                                          74284; 156.154.70.2; 634; 11003; 11850; 1160; 847; 20162; 11003; 11850; 1160; 847; 20396;                                                                           0; 1183; 10162; 40162; 0; 1183; 10396; 40396; dl_idle; ul_idle; 75000; 30686
SUMMARY; 2024-12-11-17:37:14; 1733938634.749373; 46; 33; 0; 0; 1183; 1183; dl_idle; ul_idl                                                                          e; 75000; 30686
DATA; 2024-12-11-17:37:14; 1733938634.792525; 1733938634.790090; 46; 33; 0; 0; 1733938634.                                                                          78244; 208.67.220.123; 634; 5998; 6600; 1097; 602; 20162; 5998; 6600; 1097; 602; 20396; 0;                                                                           1131; 10162; 40162; 0; 1131; 10396; 40396; dl_idle; ul_idle; 75000; 30686
SUMMARY; 2024-12-11-17:37:14; 1733938634.799931; 46; 33; 0; 0; 1131; 1131; dl_idle; ul_idl                                                                          e; 75000; 30686
DATA; 2024-12-11-17:37:14; 1733938634.848845; 1733938634.847496; 46; 33; 0; 0; 1733938634.                                                                          84336; 156.154.70.3; 634; 10183; 12050; 1248; 1867; 20162; 10183; 12050; 1248; 1867; 20396                                                                          ; 0; 1204; 10162; 40162; 0; 1204; 10396; 40396; dl_idle; ul_idle; 75000; 30686
SUMMARY; 2024-12-11-17:37:14; 1733938634.851330; 46; 33; 0; 0; 1204; 1204; dl_idle; ul_idl                                                                          e; 75000; 30686
LOAD; 2024-12-11-17:37:14; 1733938634.872949; 1733938634.872569; 26; 22; 75000; 30686
DATA; 2024-12-11-17:37:14; 1733938634.888036; 1733938634.886759; 26; 22; 0; 0; 1733938634.                                                                          88266; 208.67.220.220; 634; 5991; 6650; 915; 659; 20162; 5991; 6650; 915; 659; 20396; 0; 9                                                                          93; 10162; 40162; 0; 993; 10396; 40396; dl_idle; ul_idle; 75000; 30686
SUMMARY; 2024-12-11-17:37:14; 1733938634.890488; 26; 22; 0; 0; 993; 993; dl_idle; ul_idle;                                                                           75000; 30686
DATA; 2024-12-11-17:37:14; 1733938634.940890; 1733938634.939612; 26; 22; 0; 0; 1733938634.                                                                          93512; 185.228.168.9; 635; 5127; 7850; 1813; 2723; 20162; 5127; 7850; 1813; 2723; 20396; 0                                                                          ; 1462; 10162; 40162; 0; 1462; 10396; 40396; dl_idle; ul_idle; 75000; 30686
SUMMARY; 2024-12-11-17:37:14; 1733938634.943849; 26; 22; 0; 0; 1462; 1462; dl_idle; ul_idl                                                                          e; 75000; 30686
DATA; 2024-12-11-17:37:14; 1733938634.998628; 1733938634.997324; 26; 22; 0; 0; 1733938634.                                                                          99327; 156.154.70.4; 635; 10599; 11900; 1378; 1301; 20162; 10599; 11900; 1378; 1301; 20396                                                                          ; 0; 1637; 10162; 40162; 0; 1637; 10396; 40396; dl_idle; ul_idle; 75000; 30686
SUMMARY; 2024-12-11-17:37:15; 1733938635.001607; 26; 22; 0; 0; 1637; 1637; dl_idle; ul_idl                                                                          e; 75000; 30686
DATA; 2024-12-11-17:37:15; 1733938635.048288; 1733938635.047009; 26; 22; 0; 0; 1733938635.                                                                          04298; 156.154.70.2; 635; 11003; 11700; 1116; 697; 20162; 11003; 11700; 1116; 697; 20396;                                                                           0; 1345; 10162; 40162; 0; 1345; 10396; 40396; dl_idle; ul_idle; 75000; 30686
SUMMARY; 2024-12-11-17:37:15; 1733938635.050732; 26; 22; 0; 0; 1345; 1345; dl_idle; ul_idl                                                                          e; 75000; 30686
DATA; 2024-12-11-17:37:15; 1733938635.088897; 1733938635.087588; 26; 22; 0; 0; 1733938635.                                                                          08355; 208.67.220.123; 635; 5998; 6950; 1083; 952; 20162; 5998; 6950; 1083; 952; 20396; 0;                                                                           1418; 10162; 40162; 0; 1418; 10396; 40396; dl_idle; ul_idle; 75000; 30686
SUMMARY; 2024-12-11-17:37:15; 1733938635.091321; 26; 22; 0; 0; 1418; 1418; dl_idle; ul_idl                                                                          e; 75000; 30686
DATA; 2024-12-11-17:37:15; 1733938635.147207; 1733938635.145925; 26; 22; 0; 0; 1733938635.                                                                          14183; 156.154.70.3; 635; 10183; 11050; 1211; 867; 20162; 10183; 11050; 1211; 867; 20396;                                                                           0; 954; 10162; 40162; 0; 954; 10396; 40396; dl_idle; ul_idle; 75000; 30686

Maybe im modifying the wrong file?
I've modified the "nano config.primary.sh" file

Here is the settings i adjusted in that file (btw i used chatgpt to help me out cause a lot of it was confusing for me)

#!/usr/bin/env bash

# defaults.sh -- default configuration values for cake-autorate.sh
#
# This file is part of cake-autorate.
#
# CAKE-AUTORATE IS HIGHLY CONFIGURABLE AND THIS FILE MAY BE
# CONSULTED IN RESPECT OF OVERRIDING VARIABLES IN A CONFIG FILE.
#
# DO NOT MODIFY THIS FILE. ANY CHANGES NEED TO BE MADE TO
# THE CONFIG FILE FOR A GIVEN INSTANCE OF CAKE-AUTORATE.
# MODIFYING THIS FILE WILL RESULT IN THE LOSS OF ANY CHANGES
# DURING AN UPDATE OR UNEXPECTED BEHAVIOR AFTER AN UPDATE
# IF THE OLD DEFAULT FILE WAS IN USE.

# *** OUTPUT AND LOGGING OPTIONS ***

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_summary_stats=1          # enable (1) or disable (0) output monitoring lines showing summary stats
output_cake_changes=1           # enable (1) or disable (0) output monitoring lines showing cake bandwidth changes
output_cpu_stats=1              # enable (1) or disable (0) output monitoring lines showing CPU usage percentages
output_cpu_raw_stats=1          # enable (1) or disable (0) output monitoring lines showing raw CPU usage lines
debug=1                         # enable (1) or disable (0) out of debug lines

# This can generate a LOT of records so be careful:
log_DEBUG_messages_to_syslog=0  # enable (1) or disable (0) logging of all DEBUG records into the system log.

# ** Take care with these settings to ensure you won't run into OOM issues on your router ***
# every write the cumulative write time and bytes associated with each log line are checked
# and if either exceeds the configured values below, the log file is rotated
log_to_file=1              # enable (1) or disable (0) output logging to file (/tmp/cake-autorate.log)
log_file_max_time_mins=10  # maximum time between log file rotations
log_file_max_size_KB=2000  # maximum KB (i.e. bytes/1024) worth of log lines between log file rotations

# log file path defaults to /var/log/
# or, if set below, then ${log_file_path_override}
log_file_path_override=""

# *** 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=ifb4wan # download interface
ul_if=wan     # upload interface

# pinger binary selection can be any of:
# fping - round robin pinging (rtts)
# tsping - round robin pinging using ICMP type 13 (owds)
# ping - (iputils-ping) individual pinging (rtts)
pinger_binary=fping

# list of reflectors to use and number of pingers to initiate
# pingers will be initiated with reflectors in the order specified in the list
# additional reflectors will be used to replace any reflectors that go stale
# so e.g. if 6 reflectors are specified and the number of pingers is set to 4, the first 4 reflectors will be used initially
# and the remaining 2 reflectors in the list will be used in the event any of the first 4 go bad
# a bad reflector will go to the back of the queue on reflector rotation
reflectors=(
"1.1.1.1" "1.0.0.1"  # Cloudflare
"8.8.8.8" "8.8.4.4"  # Google
"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
)

randomize_reflectors=1 # enable (1) or disable (0) randomization of reflectors on startup

# Think carefully about the following settings
# to avoid excessive CPU use (proportional with ping interval / number of pingers)
# and to avoid abusive network activity (excessive ICMP frequency to one reflector)
# The author has found an ICMP rate of 1/(0.2/4) = 20 Hz to give satisfactory performance on 4G
no_pingers=6 # number of pingers to maintain
reflector_ping_interval_s=0.3 # (seconds, e.g. 0.2s or 2s)

# average owd delta threshold in ms up to which the maximum adjust_up_load_high is applied to the shaper rate adjustment
# for average owd deltas between avg_owd_delta_max_adjust_up_thr_ms and owd_delta_thr_ms, the adjustment is scaled linearly
# from max_adjust_up_load_high (at avg_owd_delta_max_adjust_up_thr_ms) to min_adjust_up_load_high (at owd_delta_thr_ms)
dl_avg_owd_delta_max_adjust_up_thr_ms=10.0 # (milliseconds)
ul_avg_owd_delta_max_adjust_up_thr_ms=10.0 # (milliseconds)

# owd delta threshold in ms is the extent of OWD increase to classify as a delay
# these are automatically adjusted based on maximum on the wire packet size
# (adjustment significant at sub 12Mbit/s rates, else negligible)
dl_owd_delta_delay_thr_ms=20.0 # (milliseconds)
ul_owd_delta_delay_thr_ms=20.0 # (milliseconds)

# average owd delta threshold in ms beyond which the maximum adjust_down_bufferbloat is applied to the shaper rate adjustment
# for average owd deltas between owd_delta_thr_ms and avg_owd_delta_max_adjust_up_thr_ms, the adjustment is scaled linearly
# from min_adjust_down_bufferbloat (at owd_delta_thr_ms) to min_adjust_up_load_high (at avg_owd_delta_max_adjust_down_thr_ms)
dl_avg_owd_delta_max_adjust_down_thr_ms=40.0 # (milliseconds)
ul_avg_owd_delta_max_adjust_down_thr_ms=40.0 # (milliseconds)

# 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=30000  # minimum bandwidth for download (Kbit/s)
base_dl_shaper_rate_kbps=75000 # steady state bandwidth for download (Kbit/s)
max_dl_shaper_rate_kbps=75000  # maximum bandwidth for download (Kbit/s)

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

# sleep functionality saves unecessary pings and CPU cycles by
# pausing all active pingers when connection is not in active use
enable_sleep_function=1 # enable (1) or disable (0) sleep functonality
connection_active_thr_kbps=3000  # threshold in Kbit/s below which dl/ul is considered idle
sustained_idle_sleep_thr_s=60.0  # time threshold to put pingers to sleep on sustained dl/ul achieved rate < idle_thr (seconds)

min_shaper_rates_enforcement=1 # enable (1) or disable (0) dropping down to minimum shaper rates on connection idle or stall

startup_wait_s=0.0 # number of seconds to wait on startup (e.g. to wait for things to settle on router reboot)

# *** ADVANCED CONFIGURATION OPTIONS ***

log_file_buffer_size_B=512     # log file buffer size in bytes
log_file_buffer_timeout_ms=500 # log file buffer timeout in milliseconds

log_file_export_compress=1 # compress log file exports using gzip and append .gz to export filename

### In multi-homed setups, it is mandatory to use either ping_extra_args
### or ping_prefix_string to direct the pings through $dl_if and $ul_if.
### No universal recommendation exists, because there are multiple
### policy-routing packages available (e.g. vpn-policy-routing and mwan3).
### Typically they either react to a firewall mark set on the pings, or
### provide a convenient wrapper.
###
### In a traditional single-homed setup, there is usually no need for these parameters.
###
### These arguments can also be used for any other purpose - e.g. for setting a
### particular QoS mark.

# extra arguments for ping or fping
# e.g., here is how you can set the correct outgoing interface and
# the firewall mark for ping:
# ping_extra_args="-I wwan0 -m $((0x300))"
# Unfortunately, fping does not offer a command line switch to set
# the firewall mark.
# WARNING: no error checking so use at own risk!
ping_extra_args=""

# a wrapper for ping binary - used as a prefix for the real command
# e.g., when using mwan3, it is recommended to set it like this:
# ping_prefix_string="mwan3 use gpon exec"
# WARNING: the wrapper must exec ping as the final step, not run it as a subprocess.
# Running ping or fping as a subprocess will lead to problems stopping it.
# WARNING: no error checking - so use at own risk!
ping_prefix_string=""

# interval in ms for monitoring achieved rx/tx rates
# this is automatically adjusted based on maximum on the wire packet size
# (adjustment significant at sub 12Mbit/s rates, else negligible)
monitor_achieved_rates_interval_ms=500 # (milliseconds)

# interval in ms for monitoring CPU usage
monitor_cpu_usage_interval_ms=2000

# bufferbloat is detected when (bufferbloat_detection_thr) samples
# out of the last (bufferbloat detection window) samples are delayed
bufferbloat_detection_window=4   # number of samples to retain in detection window
bufferbloat_detection_thr=2      # number of delayed samples for bufferbloat detection

# OWD baseline against which to measure delays
# the idea is that the baseline is allowed to increase slowly to allow for path changes
# and slowly enough such that bufferbloat will be corrected well before the baseline increases,
# but it will decrease very rapidly to ensure delays are measured against the shortest path
alpha_baseline_increase=0.001  # how rapidly baseline RTT is allowed to increase
alpha_baseline_decrease=0.9  # how rapidly baseline RTT is allowed to decrease

# OWD delta from baseline is tracked using ewma with alpha set below
alpha_delta_ewma=0.095

# rate adjustment parameters
# shaper rate is adjusted by a maximum of shaper_rate_max_adjust_down_bufferbloat on detection of bufferbloat
# and this is scaled by the average delta owd / average owd delta threshold
# otherwise shaper rate is adjusted up on load high, and down on load idle or low
shaper_rate_min_adjust_down_bufferbloat=0.99    # how rapidly to reduce shaper rate upon detection of bufferbloat (min reduction)
shaper_rate_max_adjust_down_bufferbloat=0.70    # how rapidly to reduce shaper rate upon detection of bufferbloat (max reduction)
shaper_rate_min_adjust_up_load_high=1.01        # how rapidly to increase shaper rate upon high load detected (min increase)
shaper_rate_max_adjust_up_load_high=1.03        # how rapidly to increase shaper rate upon high load detected (max increase)
shaper_rate_adjust_down_load_low=0.98           # how rapidly to return down to base shaper rate upon idle or low load detected
shaper_rate_adjust_up_load_low=1.02             # how rapidly to return up to base shaper rate upon idle or low load detected

# the load is categoried as low if < high_load_thr and high if > high_load_thr relative to the current shaper rate
high_load_thr=0.75   # % of currently set bandwidth for detecting high load

# refractory periods between successive bufferbloat/decay rate changes
# the bufferbloat refractory period should be greater than the
# average time it would take to replace the bufferbloat
# detection window with new samples upon a bufferbloat event
bufferbloat_refractory_period_ms=250 # (milliseconds)
decay_refractory_period_ms=800 # (milliseconds)

# interval for checking reflector health
reflector_health_check_interval_s=1.0 # (seconds)
# deadline for reflector response not to be classified as an offence against reflector
reflector_response_deadline_s=1.0 # (seconds)

# reflector misbehaving is detected when $reflector_misbehaving_detection_thr samples
# out of the last (reflector misbehaving detection window) samples are offences
# thus with a 1s interval, window 60 and detection_thr 3, this is tantamount to
# 3 offences within the last 60s
reflector_misbehaving_detection_window=60
reflector_misbehaving_detection_thr=3

reflector_replacement_interval_mins=60 # how often to replace a random reflector from the present list

reflector_comparison_interval_mins=1            # how often to compare reflectors
reflector_sum_owd_baselines_delta_thr_ms=20.0   # max increase from min sum owd baselines before reflector rotated
reflector_owd_delta_ewma_delta_thr_ms=10.0      # max increase from min delta ewma before reflector rotated

# stall is detected when the following two conditions are met:
# 1) no reflector responses within $stall_detection_thr*$ping_response_interval_us; and
# 2) either $rx_achieved_rate or $tx_achieved_rate < $connection_stall_thr
stall_detection_thr=5
connection_stall_thr_kbps=10

global_ping_response_timeout_s=10.0 # timeout to set shaper rates to min on no ping response whatsoever (seconds)

if_up_check_interval_s=10.0 # time to wait before re-checking if rx/tx bytes files exist (e.g. from boot state or sleep recovery)

Im not sure what other files would help you. also im not sure if im supposed to do something in the firewall to prioritize gaming packets for counter strike
Like counter strikes ports are
TCP: 27015, 27036
UDP: 27015, 27031-27036

Also when i type

root@OpenWrt:~# /etc/init.d/sqm status
active with no instances
root@OpenWrt:~#

i get that, not sure if thats normal. But when i do a bufferbloat test it works fine.

Thanks to anyone that can help me out

Feel free to ask away; that’s what this thread is for!

What sort of connection are you working with?

And what is the output from:

tc qdisc ls

1 Like

What do u mean by connection, sorry im not too sure what you mean but im using an ethernet cable into my pc.
Also im on an isp called cogeco and here is a picture of my plan
cogeco

im not 100% sure on the connection but it says fibre 1gig but i dont know if its using the fiber line or how ever it works. The modem im using is the sagemcom fast 3896 which is bridged to my wrt1900ac V1

I made some pictures to see if that helps you.




i've been trying to figure all this out on my own for almost 2 weeks now sitting at the pc all day and i just can't figure it out and get rid of the jitter issue.
Thanks again for the help i appreciate it!

Here is the output log:


root@OpenWrt:~# tc qdisc ls
qdisc noqueue 0: dev lo root refcnt 2
qdisc mq 0: dev eth0 root
qdisc fq_codel 0: dev eth0 parent :8 limit 10240p flows 1024 quantum 1522 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
qdisc fq_codel 0: dev eth0 parent :7 limit 10240p flows 1024 quantum 1522 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
qdisc fq_codel 0: dev eth0 parent :6 limit 10240p flows 1024 quantum 1522 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
qdisc fq_codel 0: dev eth0 parent :5 limit 10240p flows 1024 quantum 1522 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
qdisc fq_codel 0: dev eth0 parent :4 limit 10240p flows 1024 quantum 1522 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
qdisc fq_codel 0: dev eth0 parent :3 limit 10240p flows 1024 quantum 1522 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
qdisc fq_codel 0: dev eth0 parent :2 limit 10240p flows 1024 quantum 1522 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
qdisc fq_codel 0: dev eth0 parent :1 limit 10240p flows 1024 quantum 1522 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
qdisc noqueue 0: dev lan4 root refcnt 2
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 805e: dev wan root refcnt 2 bandwidth 25Mbit diffserv3 triple-isolate nonat nowash no-ack-filter split-gso rtt 100ms noatm overhead 22 mpu 64
qdisc ingress ffff: dev wan parent ffff:fff1 ----------------
qdisc noqueue 0: dev br-lan root refcnt 2
qdisc cake 805f: dev ifb4wan root refcnt 2 bandwidth 40Mbit diffserv3 triple-isolate nonat nowash no-ack-filter split-gso rtt 100ms noatm overhead 22 mpu 64

Here is also how the root directory looks. maybe something is off there too


root@OpenWrt:~/cake-autorate# cd /root/cake-autorate
root@OpenWrt:~/cake-autorate# ls -l
-rwxrwxr-x    1 root     root         67783 Nov 27 19:16 cake-autorate.sh (green)
-rw-------    1 root     root         12893 Dec 11 21:03 config.primary.sh
-rw-------    1 root     root         12893 Dec 10 12:51 config.primary.sh.save
-rw-------    1 root     root         12895 Dec 11 18:01 config.primary.sh.save.1
-rw-rw-r--    1 root     root         12893 Nov 27 19:16 defaults.sh
-rwxr-xr-x    1 root     root           546 Dec 10 12:14 launcher.sh (green)
-rw-rw-r--    1 root     root          3340 Nov 27 19:16 lib.sh
-rwxrwxr-x    1 root     root          8648 Nov 27 19:16 setup.sh (green)
-rwxrwxr-x    1 root     root          3368 Nov 27 19:16 uninstall.sh (green)
-rw-r--r--    1 root     root            73 Dec 10 12:14 version.txt

So a fixed bandwidth connection? With a fixed bandwidth connection, you shouldn’t need to use cake-autorate. You’d just use cake with the appropriate fixed bandwidth.

Maybe @moeller0 can help us here.

not sure but my download and upload speeds change depending on the time of day.

But i remember looking into it and its not true fiber or w.e
Here is what i've found:

"Cogeco Ultrafiber is not true Fiber to home. Its over the COAX cable on DOCSIS 3.1 technology

"Why Cogeco Ultrafiber Isn’t True Fiber

While Cogeco markets "Ultrafiber," its deployment relies on a hybrid fiber-coaxial (HFC) setup, where fiber runs to the neighborhood node and COAX carries the signal to homes. This infrastructure limits the benefits of a true fiber connection, especially in terms of consistent performance and symmetrical upload speeds."

So not sure what that means but that's what i'm running and not sure if that confirms what you said or changes what you said.

But yeah im not sure

Found this info too
"Cogeco is fibre to the node (ie the closest pedestal or flush-to-grade vault) and then copper from there to your home."

1 Like

Ah yes. cake-autorate can indeed make sense for this kind of connection. Could you perhaps create a data log file covering a couple of speed tests as described in the GitHub README?

okay will do, but i must be blind because i clicked on all the github's and i can't find where the "data log file covering a couple of speed tests as described in the GitHub README" is located :confused:

Im in the readme link here

But not sure if thats the right readme since i don't see and instructions on that page where it gives me instructions on what speed tests you need. Sorry haha, maybe u can link me in the right direction. Thanks!

See here:

sorry took so long, took a while for me to figure out that octave program and exporting logs.

I do get this inside the octave program when its graphing the logs and not sure if normal:

WARNING: Unhandled type identifier encountered: CPU_R trying to ignore...
WARNING: Unhandled type identifier encountered: CPU;  trying to ignore...

So i'll just give you the log file and im guessing u can graph it cause i dunno if i paste the graphs here it would be correct since i got that cpu error above

  1. So what i did was ran
    /var/run/cake-autorate/*/log_file_reset
    to reset the log file

  2. Then i ran the bufferbloat test
    https://www.waveform.com/tools/bufferbloat?test-id=50336212-f4f1-4834-a05a-534e85f90b52

  3. Then right after i saved the log file
    /var/run/cake-autorate/*/log_file_export

Hopefully i did everything right?

Now im confused as my bufferbloat test is really good but for some reason playing counter strike my jitter spikes randomly and im trying to fix it + lower it.

Btw here were my current settings for cake-autorate as i set them back to default and adjusted the shaper_rates.
Not sure if my shaper rates are correct, or how I'd go about trouble shooting. Im just a noob with all this sorry lol.

S#!/usr/bin/env bash

# defaults.sh -- default configuration values for cake-autorate.sh
#
# This file is part of cake-autorate.
#
# CAKE-AUTORATE IS HIGHLY CONFIGURABLE AND THIS FILE MAY BE
# CONSULTED IN RESPECT OF OVERRIDING VARIABLES IN A CONFIG FILE.
#
# DO NOT MODIFY THIS FILE. ANY CHANGES NEED TO BE MADE TO
# THE CONFIG FILE FOR A GIVEN INSTANCE OF CAKE-AUTORATE.
# MODIFYING THIS FILE WILL RESULT IN THE LOSS OF ANY CHANGES
# DURING AN UPDATE OR UNEXPECTED BEHAVIOR AFTER AN UPDATE
# IF THE OLD DEFAULT FILE WAS IN USE.

# *** OUTPUT AND LOGGING OPTIONS ***

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_summary_stats=1          # enable (1) or disable (0) output monitoring lines showing summary stats
output_cake_changes=1           # enable (1) or disable (0) output monitoring lines showing cake bandwidth changes
output_cpu_stats=1              # enable (1) or disable (0) output monitoring lines showing CPU usage percentages
output_cpu_raw_stats=1          # enable (1) or disable (0) output monitoring lines showing raw CPU usage lines
debug=1                         # enable (1) or disable (0) out of debug lines

# This can generate a LOT of records so be careful:
log_DEBUG_messages_to_syslog=0  # enable (1) or disable (0) logging of all DEBUG records into the system log.

# ** Take care with these settings to ensure you won't run into OOM issues on your router ***
# every write the cumulative write time and bytes associated with each log line are checked
# and if either exceeds the configured values below, the log file is rotated
log_to_file=1              # enable (1) or disable (0) output logging to file (/tmp/cake-autorate.log)
log_file_max_time_mins=10  # maximum time between log file rotations
log_file_max_size_KB=2000  # maximum KB (i.e. bytes/1024) worth of log lines between log file rotations

# log file path defaults to /var/log/
# or, if set below, then ${log_file_path_override}
log_file_path_override=""

# *** 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=ifb4wan # download interface
ul_if=wan     # upload interface

# pinger binary selection can be any of:
# fping - round robin pinging (rtts)
# tsping - round robin pinging using ICMP type 13 (owds)
# ping - (iputils-ping) individual pinging (rtts)
pinger_binary=fping

# list of reflectors to use and number of pingers to initiate
# pingers will be initiated with reflectors in the order specified in the list
# additional reflectors will be used to replace any reflectors that go stale
# so e.g. if 6 reflectors are specified and the number of pingers is set to 4, the first 4 reflectors will be used initially
# and the remaining 2 reflectors in the list will be used in the event any of the first 4 go bad
# a bad reflector will go to the back of the queue on reflector rotation
reflectors=(
"1.1.1.1" "1.0.0.1"  # Cloudflare
"8.8.8.8" "8.8.4.4"  # Google
"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
)

randomize_reflectors=1 # enable (1) or disable (0) randomization of reflectors on startup

# Think carefully about the following settings
# to avoid excessive CPU use (proportional with ping interval / number of pingers)
# and to avoid abusive network activity (excessive ICMP frequency to one reflector)
# The author has found an ICMP rate of 1/(0.2/4) = 20 Hz to give satisfactory performance on 4G
no_pingers=6 # number of pingers to maintain
reflector_ping_interval_s=0.3 # (seconds, e.g. 0.2s or 2s)

# average owd delta threshold in ms up to which the maximum adjust_up_load_high is applied to the shaper rate adjustment
# for average owd deltas between avg_owd_delta_max_adjust_up_thr_ms and owd_delta_thr_ms, the adjustment is scaled linearly
# from max_adjust_up_load_high (at avg_owd_delta_max_adjust_up_thr_ms) to min_adjust_up_load_high (at owd_delta_thr_ms)
dl_avg_owd_delta_max_adjust_up_thr_ms=10.0 # (milliseconds)
ul_avg_owd_delta_max_adjust_up_thr_ms=10.0 # (milliseconds)

# owd delta threshold in ms is the extent of OWD increase to classify as a delay
# these are automatically adjusted based on maximum on the wire packet size
# (adjustment significant at sub 12Mbit/s rates, else negligible)
dl_owd_delta_delay_thr_ms=30.0 # (milliseconds)
ul_owd_delta_delay_thr_ms=30.0 # (milliseconds)

# average owd delta threshold in ms beyond which the maximum adjust_down_bufferbloat is applied to the shaper rate adjustment
# for average owd deltas between owd_delta_thr_ms and avg_owd_delta_max_adjust_up_thr_ms, the adjustment is scaled linearly
# from min_adjust_down_bufferbloat (at owd_delta_thr_ms) to min_adjust_up_load_high (at avg_owd_delta_max_adjust_down_thr_ms)
dl_avg_owd_delta_max_adjust_down_thr_ms=60.0 # (milliseconds)
ul_avg_owd_delta_max_adjust_down_thr_ms=60.0 # (milliseconds)

# 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=75000 # steady state bandwidth for download (Kbit/s)
max_dl_shaper_rate_kbps=75000  # maximum bandwidth for download (Kbit/s)

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

# sleep functionality saves unecessary pings and CPU cycles by
# pausing all active pingers when connection is not in active use
enable_sleep_function=1 # enable (1) or disable (0) sleep functonality
connection_active_thr_kbps=3000  # threshold in Kbit/s below which dl/ul is considered idle
sustained_idle_sleep_thr_s=60.0  # time threshold to put pingers to sleep on sustained dl/ul achieved rate < idle_thr (seconds)

min_shaper_rates_enforcement=0 # enable (1) or disable (0) dropping down to minimum shaper rates on connection idle or stall

startup_wait_s=0.0 # number of seconds to wait on startup (e.g. to wait for things to settle on router reboot)

# *** ADVANCED CONFIGURATION OPTIONS ***

log_file_buffer_size_B=512     # log file buffer size in bytes
log_file_buffer_timeout_ms=500 # log file buffer timeout in milliseconds

log_file_export_compress=1 # compress log file exports using gzip and append .gz to export filename

### In multi-homed setups, it is mandatory to use either ping_extra_args
### or ping_prefix_string to direct the pings through $dl_if and $ul_if.
### No universal recommendation exists, because there are multiple
### policy-routing packages available (e.g. vpn-policy-routing and mwan3).
### Typically they either react to a firewall mark set on the pings, or
### provide a convenient wrapper.
###
### In a traditional single-homed setup, there is usually no need for these parameters.
###
### These arguments can also be used for any other purpose - e.g. for setting a
### particular QoS mark.

# extra arguments for ping or fping
# e.g., here is how you can set the correct outgoing interface and
# the firewall mark for ping:
# ping_extra_args="-I wwan0 -m $((0x300))"
# Unfortunately, fping does not offer a command line switch to set
# the firewall mark.
# WARNING: no error checking so use at own risk!
ping_extra_args=""

# a wrapper for ping binary - used as a prefix for the real command
# e.g., when using mwan3, it is recommended to set it like this:
# ping_prefix_string="mwan3 use gpon exec"
# WARNING: the wrapper must exec ping as the final step, not run it as a subprocess.
# Running ping or fping as a subprocess will lead to problems stopping it.
# WARNING: no error checking - so use at own risk!
ping_prefix_string=""

# interval in ms for monitoring achieved rx/tx rates
# this is automatically adjusted based on maximum on the wire packet size
# (adjustment significant at sub 12Mbit/s rates, else negligible)
monitor_achieved_rates_interval_ms=200 # (milliseconds)

# interval in ms for monitoring CPU usage
monitor_cpu_usage_interval_ms=2000

# bufferbloat is detected when (bufferbloat_detection_thr) samples
# out of the last (bufferbloat detection window) samples are delayed
bufferbloat_detection_window=6   # number of samples to retain in detection window
bufferbloat_detection_thr=3      # number of delayed samples for bufferbloat detection

# OWD baseline against which to measure delays
# the idea is that the baseline is allowed to increase slowly to allow for path changes
# and slowly enough such that bufferbloat will be corrected well before the baseline increases,
# but it will decrease very rapidly to ensure delays are measured against the shortest path
alpha_baseline_increase=0.001  # how rapidly baseline RTT is allowed to increase
alpha_baseline_decrease=0.9  # how rapidly baseline RTT is allowed to decrease

# OWD delta from baseline is tracked using ewma with alpha set below
alpha_delta_ewma=0.095

# rate adjustment parameters
# shaper rate is adjusted by a maximum of shaper_rate_max_adjust_down_bufferbloat on detection of bufferbloat
# and this is scaled by the average delta owd / average owd delta threshold
# otherwise shaper rate is adjusted up on load high, and down on load idle or low
shaper_rate_min_adjust_down_bufferbloat=0.99    # how rapidly to reduce shaper rate upon detection of bufferbloat (min reduction)
shaper_rate_max_adjust_down_bufferbloat=0.75    # how rapidly to reduce shaper rate upon detection of bufferbloat (max reduction)
shaper_rate_min_adjust_up_load_high=1.0         # how rapidly to increase shaper rate upon high load detected (min increase)
shaper_rate_max_adjust_up_load_high=1.04        # how rapidly to increase shaper rate upon high load detected (max increase)
shaper_rate_adjust_down_load_low=0.99           # how rapidly to return down to base shaper rate upon idle or low load detected
shaper_rate_adjust_up_load_low=1.01             # how rapidly to return up to base shaper rate upon idle or low load detected

# the load is categoried as low if < high_load_thr and high if > high_load_thr relative to the current shaper rate
high_load_thr=0.75   # % of currently set bandwidth for detecting high load

# refractory periods between successive bufferbloat/decay rate changes
# the bufferbloat refractory period should be greater than the
# average time it would take to replace the bufferbloat
# detection window with new samples upon a bufferbloat event
bufferbloat_refractory_period_ms=300 # (milliseconds)
decay_refractory_period_ms=1000 # (milliseconds)

# interval for checking reflector health
reflector_health_check_interval_s=1.0 # (seconds)
# deadline for reflector response not to be classified as an offence against reflector
reflector_response_deadline_s=1.0 # (seconds)

# reflector misbehaving is detected when $reflector_misbehaving_detection_thr samples
# out of the last (reflector misbehaving detection window) samples are offences
# thus with a 1s interval, window 60 and detection_thr 3, this is tantamount to
# 3 offences within the last 60s
reflector_misbehaving_detection_window=60
reflector_misbehaving_detection_thr=3

reflector_replacement_interval_mins=60 # how often to replace a random reflector from the present list

reflector_comparison_interval_mins=1            # how often to compare reflectors
reflector_sum_owd_baselines_delta_thr_ms=20.0   # max increase from min sum owd baselines before reflector rotated
reflector_owd_delta_ewma_delta_thr_ms=10.0      # max increase from min delta ewma before reflector rotated

# stall is detected when the following two conditions are met:
# 1) no reflector responses within $stall_detection_thr*$ping_response_interval_us; and
# 2) either $rx_achieved_rate or $tx_achieved_rate < $connection_stall_thr
stall_detection_thr=5
connection_stall_thr_kbps=10

global_ping_response_timeout_s=10.0 # timeout to set shaper rates to min on no ping response whatsoever (seconds)

if_up_check_interval_s=10.0 # time to wait before re-checking if rx/tx bytes files exist (e.g. from boot state or sleep recovery)

Also not sure if i should install sqm-qos-simple instead of the luci-sqm since im trying to prioratize gaming traffic compared to the online tv streams in the household since we've got a few people watching tv from the DuneHD box.
basically just need to figure out how to get rid of the jitter in my game.

Here is my updated luci-sqm config, i also have layer_cake on but i don't think i have any sort of like port prioritization, as i don't know if should have that or if i set it up correctly too as i tried to prioritize udp 27015 for counter strike:
nano /etc/config/sqm

config queue 'eth1'
        option enabled '0'
        option interface 'wan'
        option download '75000'
        option upload '30000'
        option qdisc 'cake'
        option script 'layer_cake.qos'
        option qdisc_advanced '1'
        option ingress_ecn 'NOECN'
        option egress_ecn 'NOECN'
        option linklayer 'ethernet'
        option debug_logging '1'
        option verbosity '5'
        option squash_dscp '0'
        option squash_ingress '0'
        option overhead '22'
        option linklayer_advanced '1'
        option tcMTU '2047'
        option tcTSIZE '128'
        option tcMPU '64'
        option linklayer_adaptation_mechanism 'default'

Here is the firewall command and i tried setting up 27015 as highest priority, not sure if i did it right
iptables -t mangle -L -v -n

root@OpenWrt:~/cake-autorate# iptables -t mangle -L -v -n
Chain PREROUTING (policy ACCEPT 16M packets, 24G bytes)
 pkts bytes target     prot opt in     out     source               destination
29985   14M DSCP       udp  --  *      *       0.0.0.0/0            0.0.0.0/0            udp dpt:27015 DSCP set 0x30

Chain INPUT (policy ACCEPT 254K packets, 45M bytes)
 pkts bytes target     prot opt in     out     source               destination

Chain FORWARD (policy ACCEPT 16M packets, 24G bytes)
 pkts bytes target     prot opt in     out     source               destination

Chain OUTPUT (policy ACCEPT 227K packets, 41M bytes)
 pkts bytes target     prot opt in     out     source               destination

Chain POSTROUTING (policy ACCEPT 16M packets, 24G bytes)
 pkts bytes target     prot opt in     out     source               destination
41267   36M DSCP       udp  --  *      *       0.0.0.0/0            0.0.0.0/0            udp spt:27015 DSCP set 0x30
root@OpenWrt:~/cake-autorate#

Here is what i put into the firewall:
cd /etc/config
nano firewall

config rule
    option name 'Mark-CS-Traffic-Inbound'
    option src 'wan'
    option proto 'udp'
    option dest_port '27015'
    option target 'DSCP'
    option set_dscp 'CS6'

config rule
    option name 'Mark-CS-Traffic-Outbound'
    option src 'lan'
    option proto 'udp'
    option src_port '27015'
    option target 'DSCP'
    option set_dscp 'CS6'

and here is what i put into
nano /etc/firewall.user

iptables -t mangle -A PREROUTING -p udp --dport 27015 -j DSCP --set-dscp-class CS6
iptables -t mangle -A POSTROUTING -p udp --sport 27015 -j DSCP --set-dscp-class CS6

Not sure if im supposed to be doing all this.

Anyways let me know what other log files you need or if you need me to run it multiple times? I'll play counter strike in about an hour as i run another log file and maybe that will also be helpful for you. Thanks again!

I’ll take a look at the logs. In the meantime, try counterstrike with setting the cake bandwidth to a fixed 10 Mbit/s each way with cake-autorate not running. If that doesn’t result in low jitter then we’re really going to struggle.

Alright so i set the
Download speed (ingress) to: 15000
and Upload Steep Ingress to: 10000
the download speed one was a little higher because when i download speed to 10000 the bufferbloat test showed only 6mbps (we did have a tv on so would that be why).
Not sure if that's how u wanted it? or should i put them both at
10000/10000 no matter what?
During the bufferbloat tests and the whole time i was playing there was 1 tv on streaming a show, should i have it on or off?
(btw when i was playing with the sqm on my brother did say that the tv did buffer sometimes, prolly cause 15000 and 10000 is too low for gaming + tv im guessing?

With SQM, bufferbloat test before playing
https://www.waveform.com/tools/bufferbloat?test-id=3cb39b06-50ca-47d2-8348-7c98744727a1

Without SQM:
https://www.waveform.com/tools/bufferbloat?test-id=f3573dac-573c-44f0-abcb-03278583a335

So I'm super confused on how like the latency is insanely low on the bufferbloat test with the sqm but the results are very similar with and without sqm.

Maybe my sqm settings are not right? or maybe i did the game udp port setup wrong. But yeah i dunno why it continues to spike for both. Now on the without sqm i did have an issue where my playermodel would jitter backwards a step, while with the sqm he didn't which is good.

But both results still have constant spikes in jitter every like 8-10 seconds and not sure why.

Also this isn't as bad as it usually is, early in the morning still, usually later in the day it gets worse with a lot more spiking, especially when people around the street are up and we've got more people on the internet at the house.

Now a few days ago when i had openwrt the first time and didn't know much about it i don't remember what sqm or soq type package i downloaded and adjusted or what settings i had but i was able to get the jitters ingame down arrow to 1ms for the download and the upload arrow would average around 6ms and wouldn't go above 10ms and would spike to like 15ms max maybe once every 5mins.

But yeah i do wish i didn't mess with the packages and settings i had. I only did it cause i thought I'd be able to easily fix it if i messed up the settings. Now i don't remember what i setup lol. So i know getting the jitter down and keeping it from spiking is definitely possible :confused:

See the problem I see here is that cake-autorate merely serves to adjust the cake bandwidth to an appropriate level. Now if there is still unacceptable latency at even the lowest bandwidth (say 10 Mbit/s or even 5 Mbit/s), then there is nothing else that can be done because the cause of the latency spike is something other than bufferbloat resulting from the achieved rates exceeding the bandwidth the connection can tolerate at a given time.

I'd test 5 or 10 MBit/s down and up and make sure the connection is otherwise not used for the testing time period. Nothing other than your game.

Don't worry about having messed up settings - once you've settled on something you're happy with you can always start again and build back to that if you want.

okay i'll test again without any connections being used

Also can my wrt1900ac be bottlenecking causing the spikes?
should i run like htop as im playing to see cpu usage?
or run something else?

I was debating on getting a mini pc like an n100 or like a NanoPi R4s as my router as its stronger, but i'm not sure if that'll be a waste of money or if that will help

This log is pretty clean:

The latencies weren't great enough to trigger any cake bandwidth reductions.

Interesting that upload seemed to trigger more of a latency increase than download. @moeller0 is that normal for DOCSIS 3.1?

But I suppose this is not reflective of your experience at other times.

Looks like your router is not powerful enough:

Corresponding timeline:

So it looks like the CPU is saturated on download.

But I'm not sure that's the only issue here. As in, I think more powerful router will permit greater shaped bandwidth, but I do not think it will resolve the latency/jitter issue.

But yes still test at 5 MBit/s up and down (or perhaps 10 Mbit/s up and down).

I forgot to mention that the router i have isn't able to reach 1gb download speed on speedtest.
its only about to reach around 350-500mbps and the cpu goes to 100%
but i didn't think that mattered since we used sqm to lower the
Download speed (ingress) and Upload speed (egress) anyways which would lower cpu usage.

and i've tested
Download speed (ingress): 75000
Upload speed (egress): 30000

Those were the best numbers on the bufferbloat test latency wise and cpu core would stay under 100%, it would hit around 90% max on i think its core 0 for those settings with sqm

Now when i didn't have it bridged my modem/router combo would hit 1GB download easily.
But yeah, just some info. Maybe I'm just blabbering at this point lol, dunno if any of that info helps.

Anyways i tested 5mbps download and upload.
https://www.waveform.com/tools/bufferbloat?test-id=ec3819b1-ba78-4f97-9474-cdb210dd6e3e

and then played counter strike

and then did 10mbps download and upload again but its still the same results. Just jitter spikes every 8-10 seconds whether its 5mbps or 10mbps
https://www.waveform.com/tools/bufferbloat?test-id=71e9d930-1a49-4edf-829e-ff34451b76d8

I don't know how much settings would affect the results but maybe my queue discipline or link layer adaption settings are wrong.

Unfortunately I don’t think this is something that cake or cake-autorate can solve with any settings. It seems those jitter spikes do not relate to excessive throughput through your connection, and rather relate to undesirable characteristics of your connection itself.

So I think that problem you won’t be able to solve.

You could try talking with your ISP about those jitter spikes?

There may be periods when your connection does suffer from bufferbloat caused by excessive throughput, which would give even greater latency spikes, and this is where cake or cake-autorate could help you.

Does this make sense?

Ah darn, thanks for helping though. I might give QoSMate a try or one of the other scripts and see if that helps.

I talked to my isp a few days ago and they said everything is fine on their end hmm.

I ended up getting a new modem 2 days ago because i had the arris which had the puma 6 chipset which people say can cause jitter issues, so i've got a sagecom now but seems like its the same issues. So i do wonder if my router could be defective.

hmmm maybe if i plugin my ethernet port into the bridged sagecom modem and see if the jitters go away, would that work or would me plugging in my ethernet into my modem cause issues?

1 Like