Using OpenWRT 18.06rc1 SQM works with fq_codel or cake with simplest_tbf.qos but not with piece_of_cake.qos or layer_cake.qos.
The working configurations immediately and obviously reduce bufferbloat and correctly limit bandwith to whatever configured setting when running dslreports.org/speedtest.
Here's a run with the configurations from below.
I did a little digging and I think the issue that the bandwidth / capacity for cake is not getting correctly set.
Details:
nominal down / up
300 / 12
wan interface
eth1
cat /etc/config/sqm
config queue
option enabled '1'
option qdisc 'cake'
option verbosity '8'
option debug_logging '0'
option upload '9000'
option download '2500'
option qdisc_advanced '0'
option linklayer 'none'
option script 'layer_cake.qos'
option interface 'eth1'
note: I've set the download very low to make it obvious if cake is working.
tc -s qdisc show dev eth1
qdisc cake 8028: root refcnt 9 diffserv3 flowblind rtt 5.0ms raw overhead 100000
Sent 6290122 bytes 59927 pkt (dropped 0, overlimits 0 requeues 17)
backlog 0b 0p requeues 17
memory used: 14b of 8384b
capacity estimate: 6755Tbit
min/max network layer size: 1514 / 42
min/max overhead-adjusted size: 1514 / 65708
average network hdr offset: 42
qdisc ingress ffff: parent ffff:fff1 ----------------
Sent 281864018 bytes 197751 pkt (dropped 0, overlimits 0 requeues 0)
backlog 0b 0p requeues 0
tc -s qdisc show dev ifb4eth1
qdisc cake 8029: root refcnt 2 besteffort flowblind wash rtt 5.0ms raw overhead 100000
Sent 299268041 bytes 207887 pkt (dropped 0, overlimits 0 requeues 0)
backlog 0b 0p requeues 0
memory used: 14b of 19904b
capacity estimate: 6755Tbit
min/max network layer size: 1514 / 60
min/max overhead-adjusted size: 1514 / 65708
average network hdr offset: 60
Note that capacity estimates are ridiculously huge and look nothing like my 'download' setting.
I'd expect the output of tc to look something like this (stolen from another post):
qdisc cake 8007: root refcnt 2 bandwidth 2Mbit besteffort triple-isolate rtt 100.0ms raw
Sent 731135 bytes 2576 pkt (dropped 1, overlimits 1264 requeues 0)
backlog 0b 0p requeues 0
memory used: 11200b of 4Mb
capacity estimate: 2Mbit
Any ideas? I've tried iterating with various settings, updating tc from snapshot, manually calling tc, but nothing seems to make cake happy.
Below is the output of some logs
SQM_DEBUG=1 SQM_VERBOSITY_MAX=8 /etc/init.d/sqm stop ; SQM_DEBUG=1 SQM_VERBOSITY_MAX=8 /etc/init.d/sqm start
SQM: Stopping SQM on eth1
SQM: ifb associated with interface eth1: ifb4eth1
SQM: /usr/lib/sqm/stop-sqm: ifb4eth1 shaper deleted
SQM: /usr/lib/sqm/stop-sqm: ifb4eth1 interface deleted
SQM: Starting SQM script: layer_cake.qos on eth1, in: 2500 Kbps, out: 9000 Kbps
SQM: QDISC cake is useable.
SQM: Starting layer_cake.qos
SQM: ifb associated with interface eth1:
SQM: Currently no ifb is associated with eth1, this is normal during starting of the sqm system.
SQM: LLA: default link layer adjustment method for cake is cake
SQM: egress shaping activated
SQM: QDISC ingress is useable.
SQM: LLA: default link layer adjustment method for cake is cake
SQM: ingress shaping activated
SQM: layer_cake.qos was started on eth1 successfully
cat /var/run/sqm/eth1.debug.log
Sun Jul 15 13:59:53 UTC 2018: Starting.
Starting SQM script: layer_cake.qos on eth1, in: 2500 Kbps, out: 9000 Kbps
Failed to find act_ipt. Maybe it is a built in module ?
module is already loaded - sch_cake
module is already loaded - sch_ingress
module is already loaded - act_mirred
module is already loaded - cls_fw
module is already loaded - cls_flow
module is already loaded - cls_u32
module is already loaded - sch_htb
module is already loaded - sch_hfsc
/sbin/ip link add name TMP_IFB_4_SQM type ifb
/usr/sbin/tc qdisc replace dev TMP_IFB_4_SQM root cake
QDISC cake is useable.
/sbin/ip link set dev TMP_IFB_4_SQM down
/sbin/ip link delete TMP_IFB_4_SQM type ifb
Starting layer_cake.qos
ifb associated with interface eth1:
Currently no ifb is associated with eth1, this is normal during starting of the sqm system.
/sbin/ip link add name ifb4eth1 type ifb
/usr/sbin/tc qdisc del dev eth1 root
RTNETLINK answers: No such file or directory
LLA: default link layer adjustment method for cake is cake
/usr/sbin/tc qdisc add dev eth1 root cake bandwidth 9000kbit diffserv3
egress shaping activated
/sbin/ip link add name TMP_IFB_4_SQM type ifb
/usr/sbin/tc qdisc replace dev TMP_IFB_4_SQM ingress
QDISC ingress is useable.
/sbin/ip link set dev TMP_IFB_4_SQM down
/sbin/ip link delete TMP_IFB_4_SQM type ifb
/usr/sbin/tc qdisc del dev eth1 handle ffff: ingress
RTNETLINK answers: Invalid argument
/usr/sbin/tc qdisc add dev eth1 handle ffff: ingress
/usr/sbin/tc qdisc del dev ifb4eth1 root
RTNETLINK answers: No such file or directory
LLA: default link layer adjustment method for cake is cake
/usr/sbin/tc qdisc add dev ifb4eth1 root cake bandwidth 2500kbit diffserv3 besteffort wash
/sbin/ip link set dev ifb4eth1 up
/usr/sbin/tc filter add dev eth1 parent ffff: protocol all prio 10 u32 match u32 0 0 flowid 1:1 action mirred egress redirect dev ifb4eth1
ingress shaping activated
layer_cake.qos was started on eth1 successfully