Appropriate interface for SQM

Hello everyone,
I have SQM set up on my Archer C20 v5 with OpenWRT (its connected as second router to my ISP provielded ONT). I have selected the eth interface for the SQM but I am not sure if it works because the WiFi devices often cause alot of jitters in games on my PC (connected via LAN). So, should I apply the SQM on the wlan interface instead of wan?
P. S Only the PC is connected to ethernet port, rest of the devices are all connected via WiFi.

You enable SQM/QoS on the wan link, which usually is the one that has lower throughput than the lan.

There can be other reasons for that. Interference, noisy environment, channel congestion, obstacles, and the list goes on.

What I actually meant was that whenever 2-3 WiFi devices started streaming, the games on my PC became jittery (which is connected via LAN). My Internet is 15/15 and ingress and egress are set to 13000.

Have you measured the maximum throughput your wifi can get? If not give it a try with iperf. However I am pretty sure that it will be more than 15 Mbps symmetrical, so some host streaming from the internet won't saturate the wifi. Also verify the connection speed for all the wireless hosts. If they connect at low speeds, or even legacy speeds, they can affect the overall performance of the AP.

Apologies if my original post was misleading as I was talking about gaming on my PC which is connected via LAN rather than any of the wifi devices.

Ok, so to recap: You have the gaming PC connected to LAN port and 2-3 wifi hosts. When the wifi hosts are not downloading, everything is working fine. But when they start streaming something from the internet, your connection to the game server lags/jitters. Is this right? Something to add/remove?

Correct. No issues when there are no other devices using the bandwidth.

Alright, can you follow the troubleshooting steps mentioned here?

Please use the "Preformatted text </>" button for logs, scripts, configs and general console output.
grafik

root@OpenWrt:~# cat /etc/config/sqm

config queue 'eth1'
        option qdisc_advanced '0'
        option debug_logging '0'
        option verbosity '5'
        option qdisc 'cake'
        option script 'piece_of_cake.qos'
        option linklayer 'ethernet'
        option overhead '44'
        option enabled '1'
        option interface 'eth0.2'
        option download '13000'
        option upload '13000'

root@OpenWrt:~#   ifstatus wan
{
        "up": true,
        "pending": false,
        "available": true,
        "autostart": true,
        "dynamic": false,
        "uptime": 2850553,
        "l3_device": "eth0.2",
        "proto": "dhcp",
        "device": "eth0.2",
        "metric": 0,
        "dns_metric": 0,
        "delegation": true,
        "ipv4-address": [
                {
                        "address": "192.168.1.10",
                        "mask": 24
                }
        ],
        "ipv6-address": [

        ],
        "ipv6-prefix": [

        ],
        "ipv6-prefix-assignment": [

        ],
        "route": [
                {
                        "target": "0.0.0.0",
                        "mask": 0,
                        "nexthop": "192.168.1.1",
                        "source": "192.168.1.10/32"
                }
        ],
        "dns-server": [
                "192.168.1.1"
        ],
        "dns-search": [

        ],
        "neighbors": [

        ],
        "inactive": {
                "ipv4-address": [

                ],
                "ipv6-address": [

                ],
                "route": [

                ],
                "dns-server": [

                ],
                "dns-search": [

                ],
                "neighbors": [

                ]
        },
        "data": {
                "leasetime": 86400
        }
}

root@OpenWrt:~#   SQM_DEBUG=1 SQM_VERBOSITY_MAX=8 /etc/init.d/sqm stop ; SQM_DEB
UG=1 SQM_VERBOSITY_MAX=8 /etc/init.d/sqm start
/usr/lib/sqm/run.sh: line 57: can't create : nonexistent directory
SQM: Stopping SQM on eth0.2
/usr/lib/sqm/run.sh: line 57: can't create : nonexistent directory
SQM: Starting SQM script: piece_of_cake.qos on eth0.2, in: 13000 Kbps, out: 13000 Kbps
SQM: fn_exists: function candidate name: sqm_start
SQM: fn_exists: TYPE_OUTPUT: sqm_start: not found
SQM: fn_exists: return value: 1
SQM: Using generic sqm_start_default function.
SQM: fn_exists: function candidate name: sqm_prepare_script
SQM: fn_exists: TYPE_OUTPUT: sqm_prepare_script is a function
SQM: fn_exists: return value: 0
SQM: sqm_start_default: starting sqm_prepare_script
SQM: cmd_wrapper: ip: SUCCESS: /sbin/ip link add name TMP_IFB_4_SQM type ifb
SQM: cmd_wrapper: tc: SUCCESS: /usr/sbin/tc qdisc replace dev TMP_IFB_4_SQM root cake
SQM: QDISC cake is useable.
SQM: cmd_wrapper: ip: SUCCESS: /sbin/ip link set dev TMP_IFB_4_SQM down
SQM: cmd_wrapper: ip: SUCCESS: /sbin/ip link delete TMP_IFB_4_SQM type ifb
SQM: cmd_wrapper: ip: SUCCESS: /sbin/ip link add name TMP_IFB_4_SQM type ifb
SQM: cmd_wrapper: tc: SUCCESS: /usr/sbin/tc qdisc replace dev TMP_IFB_4_SQM root cake
SQM: QDISC cake is useable.
SQM: cmd_wrapper: ip: SUCCESS: /sbin/ip link set dev TMP_IFB_4_SQM down
SQM: cmd_wrapper: ip: SUCCESS: /sbin/ip link delete TMP_IFB_4_SQM type ifb
SQM: sqm_start_default: Starting piece_of_cake.qos
SQM: ifb associated with interface eth0.2:
SQM: Currently no ifb is associated with eth0.2, this is normal during starting of the sqm system.
SQM: cmd_wrapper: ip: SUCCESS: /sbin/ip link add name ifb4eth0.2 type ifb
SQM: fn_exists: function candidate name: egress
SQM: fn_exists: TYPE_OUTPUT: egress is a function
SQM: fn_exists: return value: 0
SQM: egress
SQM: cmd_wrapper: tc: invocation silenced by request, FAILURE either expected or acceptable.
SQM: cmd_wrapper: tc: FAILURE (2): /usr/sbin/tc qdisc del dev eth0.2 root
SQM: cmd_wrapper: tc: LAST ERROR: RTNETLINK answers: No such file or directory
SQM: LLA: default link layer adjustment method for cake is cake
SQM: cake link layer adjustments:  overhead 44 mpu 0
SQM: cmd_wrapper: tc: SUCCESS: /usr/sbin/tc qdisc add dev eth0.2 root cake bandwidth 13000kbit overhead 44 mpu 0 besteffort
SQM: sqm_start_default: egress shaping activated
SQM: cmd_wrapper: ip: SUCCESS: /sbin/ip link add name TMP_IFB_4_SQM type ifb
SQM: cmd_wrapper: tc: SUCCESS: /usr/sbin/tc qdisc replace dev TMP_IFB_4_SQM ingress
SQM: QDISC ingress is useable.
SQM: cmd_wrapper: ip: SUCCESS: /sbin/ip link set dev TMP_IFB_4_SQM down
SQM: cmd_wrapper: ip: SUCCESS: /sbin/ip link delete TMP_IFB_4_SQM type ifb
SQM: fn_exists: function candidate name: ingress
SQM: fn_exists: TYPE_OUTPUT: ingress is a function
SQM: fn_exists: return value: 0
SQM: ingress
SQM: cmd_wrapper: tc: invocation silenced by request, FAILURE either expected or acceptable.
SQM: cmd_wrapper: tc: FAILURE (2): /usr/sbin/tc qdisc del dev eth0.2 handle ffff: ingress
SQM: cmd_wrapper: tc: LAST ERROR: RTNETLINK answers: Invalid argument
SQM: cmd_wrapper: tc: SUCCESS: /usr/sbin/tc qdisc add dev eth0.2 handle ffff: ingress
SQM: cmd_wrapper: tc: invocation silenced by request, FAILURE either expected or acceptable.
SQM: cmd_wrapper: tc: FAILURE (2): /usr/sbin/tc qdisc del dev ifb4eth0.2 root
SQM: cmd_wrapper: tc: LAST ERROR: RTNETLINK answers: No such file or directory
SQM: LLA: default link layer adjustment method for cake is cake
SQM: cake link layer adjustments:  overhead 44 mpu 0
SQM: cmd_wrapper: tc: SUCCESS: /usr/sbin/tc qdisc add dev ifb4eth0.2 root cake bandwidth 13000kbit overhead 44 mpu 0 besteffort wash
SQM: cmd_wrapper: ip: SUCCESS: /sbin/ip link set dev ifb4eth0.2 up
SQM: cmd_wrapper: tc: SUCCESS: /usr/sbin/tc filter add dev eth0.2 parent ffff: protocol all prio 10 u32 match u32 0 0 flowid 1:1 action mirred egress redirect dev ifb4eth0.2
SQM: sqm_start_default: ingress shaping activated
SQM: piece_of_cake.qos was started on eth0.2 successfully
root@OpenWrt:~#   logread | grep SQM
Fri Aug 21 15:13:25 2020 user.notice SQM: Stopping SQM on eth0.2
Fri Aug 21 15:13:25 2020 user.notice SQM: Starting SQM script: piece_of_cake.qos on eth0.2, in: 13000 Kbps, out: 13000 Kbps
Fri Aug 21 15:13:25 2020 user.notice SQM: Using generic sqm_start_default function.
Fri Aug 21 15:13:26 2020 user.notice SQM: piece_of_cake.qos was started on eth0.2 successfully
Fri Aug 21 15:48:47 2020 user.notice SQM: Stopping SQM on eth0.2
Fri Aug 21 15:48:47 2020 user.notice SQM: Starting SQM script: piece_of_cake.qos on wlan0, in: 8000 Kbps, out: 8000 Kbps
Fri Aug 21 15:48:47 2020 user.notice SQM: Using generic sqm_start_default function.
Fri Aug 21 15:48:48 2020 user.notice SQM: piece_of_cake.qos was started on wlan0 successfully
Fri Aug 21 16:11:08 2020 user.notice SQM: Stopping SQM on wlan0
Fri Aug 21 16:11:08 2020 user.notice SQM: Starting SQM script: piece_of_cake.qos on wlan0, in: 8000 Kbps, out: 0 Kbps
Fri Aug 21 16:11:08 2020 user.notice SQM: Using generic sqm_start_default function.
Fri Aug 21 16:11:09 2020 user.notice SQM: piece_of_cake.qos was started on wlan0 successfully
Fri Aug 21 16:12:29 2020 user.notice SQM: Stopping SQM on wlan0
Fri Aug 21 16:12:29 2020 user.notice SQM: ERROR: cmd_wrapper: tc: FAILURE (2): /usr/sbin/tc qdisc del dev wlan0 root
Fri Aug 21 16:12:29 2020 user.notice SQM: ERROR: cmd_wrapper: tc: LAST ERROR: RTNETLINK answers: No such file or directory
Fri Aug 21 16:12:30 2020 user.notice SQM: Starting SQM script: piece_of_cake.qos on wlan0, in: 8000 Kbps, out: 8000 Kbps
Fri Aug 21 16:12:30 2020 user.notice SQM: Using generic sqm_start_default function.
Fri Aug 21 16:12:31 2020 user.notice SQM: piece_of_cake.qos was started on wlan0 successfully
Fri Aug 21 16:56:36 2020 user.notice SQM: Stopping SQM on wlan0
Fri Aug 21 16:56:37 2020 user.notice SQM: Starting SQM script: piece_of_cake.qos on eth0.2, in: 13500 Kbps, out: 13500 Kbps
Fri Aug 21 16:56:37 2020 user.notice SQM: Using generic sqm_start_default function.
Fri Aug 21 16:56:38 2020 user.notice SQM: piece_of_cake.qos was started on eth0.2 successfully
Fri Aug 21 18:19:54 2020 user.notice SQM: Stopping SQM on eth0.2
Fri Aug 21 18:19:54 2020 user.notice SQM: Starting SQM script: piece_of_cake.qos on eth0.2, in: 13000 Kbps, out: 13000 Kbps
Fri Aug 21 18:19:54 2020 user.notice SQM: Using generic sqm_start_default function.
Fri Aug 21 18:19:55 2020 user.notice SQM: piece_of_cake.qos was started on eth0.2 successfully
Fri Aug 21 19:20:13 2020 user.notice SQM: Stopping SQM on eth0.2
Fri Aug 21 19:20:14 2020 user.notice SQM: Starting SQM script: piece_of_cake.qos on eth0.2, in: 13000 Kbps, out: 13000 Kbps
Fri Aug 21 19:20:14 2020 user.notice SQM: fn_exists: function candidate name: sqm_start
Fri Aug 21 19:20:14 2020 user.notice SQM: fn_exists: TYPE_OUTPUT: sqm_start: not found
Fri Aug 21 19:20:14 2020 user.notice SQM: fn_exists: return value: 1
Fri Aug 21 19:20:14 2020 user.notice SQM: Using generic sqm_start_default function.
Fri Aug 21 19:20:14 2020 user.notice SQM: fn_exists: function candidate name: sqm_prepare_script
Fri Aug 21 19:20:14 2020 user.notice SQM: fn_exists: TYPE_OUTPUT: sqm_prepare_script is a function
Fri Aug 21 19:20:14 2020 user.notice SQM: fn_exists: return value: 0
Fri Aug 21 19:20:14 2020 user.notice SQM: sqm_start_default: starting sqm_prepare_script
Fri Aug 21 19:20:14 2020 user.notice SQM: cmd_wrapper: ip: SUCCESS: /sbin/ip link add name TMP_IFB_4_SQM type ifb
Fri Aug 21 19:20:14 2020 user.notice SQM: cmd_wrapper: tc: SUCCESS: /usr/sbin/tc qdisc replace dev TMP_IFB_4_SQM root cake
Fri Aug 21 19:20:14 2020 user.notice SQM: QDISC cake is useable.
Fri Aug 21 19:20:14 2020 user.notice SQM: cmd_wrapper: ip: SUCCESS: /sbin/ip link set dev TMP_IFB_4_SQM down
Fri Aug 21 19:20:14 2020 user.notice SQM: cmd_wrapper: ip: SUCCESS: /sbin/ip link delete TMP_IFB_4_SQM type ifb
Fri Aug 21 19:20:14 2020 user.notice SQM: cmd_wrapper: ip: SUCCESS: /sbin/ip link add name TMP_IFB_4_SQM type ifb
Fri Aug 21 19:20:14 2020 user.notice SQM: cmd_wrapper: tc: SUCCESS: /usr/sbin/tc qdisc replace dev TMP_IFB_4_SQM root cake
Fri Aug 21 19:20:14 2020 user.notice SQM: QDISC cake is useable.
Fri Aug 21 19:20:14 2020 user.notice SQM: cmd_wrapper: ip: SUCCESS: /sbin/ip link set dev TMP_IFB_4_SQM down
Fri Aug 21 19:20:14 2020 user.notice SQM: cmd_wrapper: ip: SUCCESS: /sbin/ip link delete TMP_IFB_4_SQM type ifb
Fri Aug 21 19:20:14 2020 user.notice SQM: sqm_start_default: Starting piece_of_cake.qos
Fri Aug 21 19:20:14 2020 user.notice SQM: ifb associated with interface eth0.2:
Fri Aug 21 19:20:14 2020 user.notice SQM: Currently no ifb is associated with eth0.2, this is normal during starting of the sqm system.
Fri Aug 21 19:20:14 2020 user.notice SQM: cmd_wrapper: ip: SUCCESS: /sbin/ip link add name ifb4eth0.2 type ifb
Fri Aug 21 19:20:14 2020 user.notice SQM: fn_exists: function candidate name: egress
Fri Aug 21 19:20:14 2020 user.notice SQM: fn_exists: TYPE_OUTPUT: egress is a function
Fri Aug 21 19:20:14 2020 user.notice SQM: fn_exists: return value: 0
Fri Aug 21 19:20:15 2020 user.notice SQM: egress
Fri Aug 21 19:20:15 2020 user.notice SQM: cmd_wrapper: tc: invocation silenced by request, FAILURE either expected or acceptable.
Fri Aug 21 19:20:15 2020 user.notice SQM: cmd_wrapper: tc: FAILURE (2): /usr/sbin/tc qdisc del dev eth0.2 root
Fri Aug 21 19:20:15 2020 user.notice SQM: cmd_wrapper: tc: LAST ERROR: RTNETLINK answers: No such file or directory
Fri Aug 21 19:20:15 2020 user.notice SQM: LLA: default link layer adjustment method for cake is cake
Fri Aug 21 19:20:15 2020 user.notice SQM: cake link layer adjustments:  overhead 44 mpu 0
Fri Aug 21 19:20:15 2020 user.notice SQM: cmd_wrapper: tc: SUCCESS: /usr/sbin/tc qdisc add dev eth0.2 root cake bandwidth 13000kbit overhead 44 mpu 0 besteffort
Fri Aug 21 19:20:15 2020 user.notice SQM: sqm_start_default: egress shaping activated
Fri Aug 21 19:20:15 2020 user.notice SQM: cmd_wrapper: ip: SUCCESS: /sbin/ip link add name TMP_IFB_4_SQM type ifb
Fri Aug 21 19:20:15 2020 user.notice SQM: cmd_wrapper: tc: SUCCESS: /usr/sbin/tc qdisc replace dev TMP_IFB_4_SQM ingress
Fri Aug 21 19:20:15 2020 user.notice SQM: QDISC ingress is useable.
Fri Aug 21 19:20:15 2020 user.notice SQM: cmd_wrapper: ip: SUCCESS: /sbin/ip link set dev TMP_IFB_4_SQM down
Fri Aug 21 19:20:15 2020 user.notice SQM: cmd_wrapper: ip: SUCCESS: /sbin/ip link delete TMP_IFB_4_SQM type ifb
Fri Aug 21 19:20:15 2020 user.notice SQM: fn_exists: function candidate name: ingress
Fri Aug 21 19:20:15 2020 user.notice SQM: fn_exists: TYPE_OUTPUT: ingress is a function
Fri Aug 21 19:20:15 2020 user.notice SQM: fn_exists: return value: 0
Fri Aug 21 19:20:15 2020 user.notice SQM: ingress
Fri Aug 21 19:20:15 2020 user.notice SQM: cmd_wrapper: tc: invocation silenced by request, FAILURE either expected or acceptable.
Fri Aug 21 19:20:15 2020 user.notice SQM: cmd_wrapper: tc: FAILURE (2): /usr/sbin/tc qdisc del dev eth0.2 handle ffff: ingress
Fri Aug 21 19:20:15 2020 user.notice SQM: cmd_wrapper: tc: LAST ERROR: RTNETLINK answers: Invalid argument
Fri Aug 21 19:20:15 2020 user.notice SQM: cmd_wrapper: tc: SUCCESS: /usr/sbin/tc qdisc add dev eth0.2 handle ffff: ingress
Fri Aug 21 19:20:15 2020 user.notice SQM: cmd_wrapper: tc: invocation silenced by request, FAILURE either expected or acceptable.
Fri Aug 21 19:20:15 2020 user.notice SQM: cmd_wrapper: tc: FAILURE (2): /usr/sbin/tc qdisc del dev ifb4eth0.2 root
Fri Aug 21 19:20:15 2020 user.notice SQM: cmd_wrapper: tc: LAST ERROR: RTNETLINK answers: No such file or directory
Fri Aug 21 19:20:15 2020 user.notice SQM: LLA: default link layer adjustment method for cake is cake
Fri Aug 21 19:20:15 2020 user.notice SQM: cake link layer adjustments:  overhead 44 mpu 0
Fri Aug 21 19:20:15 2020 user.notice SQM: cmd_wrapper: tc: SUCCESS: /usr/sbin/tc qdisc add dev ifb4eth0.2 root cake bandwidth 13000kbit overhead 44 mpu 0 besteffort wash
Fri Aug 21 19:20:15 2020 user.notice SQM: cmd_wrapper: ip: SUCCESS: /sbin/ip link set dev ifb4eth0.2 up
Fri Aug 21 19:20:15 2020 user.notice SQM: cmd_wrapper: tc: SUCCESS: /usr/sbin/tc filter add dev eth0.2 parent ffff: protocol all prio 10 u32 match u32 0 0 flowid 1:1 action mirred egress redirect dev ifb4eth0.2
Fri Aug 21 19:20:15 2020 user.notice SQM: sqm_start_default: ingress shaping activated
Fri Aug 21 19:20:15 2020 user.notice SQM: piece_of_cake.qos was started on eth0.2 successfully
root@OpenWrt:~# tc -d qdisc
qdisc noqueue 0: dev lo root refcnt 2
qdisc fq_codel 0: dev eth0 root refcnt 2 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn
qdisc noqueue 0: dev br-lan root refcnt 2
qdisc noqueue 0: dev eth0.1 root refcnt 2
qdisc cake 803c: dev eth0.2 root refcnt 2 bandwidth 13Mbit besteffort triple-isolate nonat nowash no-ack-filter split-gso rtt 100.0ms noatm overhead 44
qdisc ingress ffff: dev eth0.2 parent ffff:fff1 ----------------
qdisc noqueue 0: dev wlan0 root refcnt 2
qdisc cake 803d: dev ifb4eth0.2 root refcnt 2 bandwidth 13Mbit besteffort triple-isolate nonat wash no-ack-filter split-gso rtt 100.0ms noatm overhead 44
root@OpenWrt:~# tc -s qdisc
qdisc noqueue 0: dev lo root refcnt 2
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc fq_codel 0: dev eth0 root refcnt 2 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn
 Sent 422862080935 bytes 662610830 pkt (dropped 5, overlimits 0 requeues 11577)
 backlog 0b 0p requeues 11577
  maxpacket 1514 drop_overlimit 0 new_flow_count 28151 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc noqueue 0: dev br-lan root refcnt 2
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev eth0.1 root refcnt 2
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc cake 803c: dev eth0.2 root refcnt 2 bandwidth 13Mbit besteffort triple-isolate nonat nowash no-ack-filter split-gso rtt 100.0ms noatm overhead 44
 Sent 290283 bytes 1285 pkt (dropped 1, overlimits 209 requeues 0)
 backlog 0b 0p requeues 0
 memory used: 24192b of 4Mb
 capacity estimate: 13Mbit
 min/max network layer size:           28 /    1492
 min/max overhead-adjusted size:       72 /    1536
 average network hdr offset:           14

                  Tin 0
  thresh         13Mbit
  target          5.0ms
  interval      100.0ms
  pk_delay        6.5ms
  av_delay        614us
  sp_delay         14us
  backlog            0b
  pkts             1286
  bytes          291789
  way_inds            0
  way_miss          138
  way_cols            0
  drops               1
  marks               0
  ack_drop            0
  sp_flows            1
  bk_flows            1
  un_flows            0
  max_len          1881
  quantum           396

qdisc ingress ffff: dev eth0.2 parent ffff:fff1 ----------------
 Sent 454408 bytes 1202 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev wlan0 root refcnt 2
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc cake 803d: dev ifb4eth0.2 root refcnt 2 bandwidth 13Mbit besteffort triple-isolate nonat wash no-ack-filter split-gso rtt 100.0ms noatm overhead 44
 Sent 470202 bytes 1201 pkt (dropped 1, overlimits 334 requeues 0)
 backlog 0b 0p requeues 0
 memory used: 22696b of 4Mb
 capacity estimate: 13Mbit
 min/max network layer size:           46 /    1492
 min/max overhead-adjusted size:       90 /    1536
 average network hdr offset:           14

                  Tin 0
  thresh         13Mbit
  target          5.0ms
  interval      100.0ms
  pk_delay        2.5ms
  av_delay        153us
  sp_delay         25us
  backlog            0b
  pkts             1202
  bytes          471616
  way_inds            0
  way_miss          138
  way_cols            0
  drops               1
  marks               0
  ack_drop            0
  sp_flows            1
  bk_flows            1
  un_flows            0
  max_len          2828
  quantum           396

After generating some traffic:

root@OpenWrt:~# tc -s qdisc
qdisc noqueue 0: dev lo root refcnt 2
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc fq_codel 0: dev eth0 root refcnt 2 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn
 Sent 422902931245 bytes 662658649 pkt (dropped 5, overlimits 0 requeues 11577)
 backlog 0b 0p requeues 11577
  maxpacket 1514 drop_overlimit 0 new_flow_count 28151 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc noqueue 0: dev br-lan root refcnt 2
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev eth0.1 root refcnt 2
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc cake 8040: dev eth0.2 root refcnt 2 bandwidth 13Mbit besteffort triple-isolate nonat nowash no-ack-filter split-gso rtt 100.0ms noatm overhead 44
 Sent 6432 bytes 35 pkt (dropped 0, overlimits 2 requeues 0)
 backlog 0b 0p requeues 0
 memory used: 2240b of 4Mb
 capacity estimate: 13Mbit
 min/max network layer size:           28 /    1323
 min/max overhead-adjusted size:       72 /    1367
 average network hdr offset:            2

                  Tin 0
  thresh         13Mbit
  target          5.0ms
  interval      100.0ms
  pk_delay        181us
  av_delay          5us
  sp_delay          5us
  backlog            0b
  pkts               35
  bytes            6432
  way_inds            0
  way_miss            9
  way_cols            0
  drops               0
  marks               0
  ack_drop            0
  sp_flows            1
  bk_flows            1
  un_flows            0
  max_len          1337
  quantum           396

qdisc ingress ffff: dev eth0.2 parent ffff:fff1 ----------------
 Sent 7224 bytes 42 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev wlan0 root refcnt 2
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc cake 8041: dev ifb4eth0.2 root refcnt 2 bandwidth 13Mbit besteffort triple-isolate nonat wash no-ack-filter split-gso rtt 100.0ms noatm overhead 44
 Sent 7852 bytes 42 pkt (dropped 0, overlimits 10 requeues 0)
 backlog 0b 0p requeues 0
 memory used: 4032b of 4Mb
 capacity estimate: 13Mbit
 min/max network layer size:           46 /    1470
 min/max overhead-adjusted size:       90 /    1514
 average network hdr offset:            2

                  Tin 0
  thresh         13Mbit
  target          5.0ms
  interval      100.0ms
  pk_delay        573us
  av_delay         14us
  sp_delay         14us
  backlog            0b
  pkts               42
  bytes            7852
  way_inds            0
  way_miss           11
  way_cols            0
  drops               0
  marks               0
  ack_drop            0
  sp_flows            1
  bk_flows            1
  un_flows            0
  max_len          1567
  quantum           396

Something seems odd here. The "after generating some traffic" stats have less bytes count.
@dlakelan @moeller0 @mk24 anything unusual in tc or the SQM debug message /usr/lib/sqm/run.sh: line 57: can't create : nonexistent directory ?

I re ran the last command for verification.

root@OpenWrt:~# tc -s qdisc
qdisc noqueue 0: dev lo root refcnt 2
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc fq_codel 0: dev eth0 root refcnt 2 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn
 Sent 422941392644 bytes 662843709 pkt (dropped 5, overlimits 0 requeues 11577)
 backlog 0b 0p requeues 11577
  maxpacket 1514 drop_overlimit 0 new_flow_count 28151 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc noqueue 0: dev br-lan root refcnt 2
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev eth0.1 root refcnt 2
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc cake 8040: dev eth0.2 root refcnt 2 bandwidth 13Mbit besteffort triple-isolate nonat nowash no-ack-filter split-gso rtt 100.0ms noatm overhead 44
 Sent 12768850 bytes 107245 pkt (dropped 7, overlimits 3702 requeues 0)
 backlog 0b 0p requeues 0
 memory used: 55520b of 4Mb
 capacity estimate: 13Mbit
 min/max network layer size:           28 /    1492
 min/max overhead-adjusted size:       72 /    1536
 average network hdr offset:           14

                  Tin 0
  thresh         13Mbit
  target          5.0ms
  interval      100.0ms
  pk_delay        3.0ms
  av_delay        181us
  sp_delay         15us
  backlog            0b
  pkts           107252
  bytes        12777112
  way_inds          726
  way_miss         1444
  way_cols            0
  drops               7
  marks               0
  ack_drop            0
  sp_flows            0
  bk_flows            1
  un_flows            0
  max_len          4362
  quantum           396

qdisc ingress ffff: dev eth0.2 parent ffff:fff1 ----------------
 Sent 115501441 bytes 147981 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev wlan0 root refcnt 2
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc cake 8041: dev ifb4eth0.2 root refcnt 2 bandwidth 13Mbit besteffort triple-isolate nonat wash no-ack-filter split-gso rtt 100.0ms noatm overhead 44
 Sent 116392638 bytes 147121 pkt (dropped 860, overlimits 134089 requeues 0)
 backlog 0b 0p requeues 0
 memory used: 161280b of 4Mb
 capacity estimate: 13Mbit
 min/max network layer size:           46 /    1492
 min/max overhead-adjusted size:       90 /    1536
 average network hdr offset:           14

                  Tin 0
  thresh         13Mbit
  target          5.0ms
  interval      100.0ms
  pk_delay        4.6ms
  av_delay        823us
  sp_delay         39us
  backlog            0b
  pkts           147981
  bytes       117641199
  way_inds          539
  way_miss         1459
  way_cols            0
  drops             860
  marks               0
  ack_drop            0
  sp_flows            0
  bk_flows            1
  un_flows            0
  max_len          4502
  quantum           396

After generating traffic:

root@OpenWrt:~# tc -s qdisc
qdisc noqueue 0: dev lo root refcnt 2
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc fq_codel 0: dev eth0 root refcnt 2 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn
 Sent 422976006877 bytes 662881353 pkt (dropped 5, overlimits 0 requeues 11577)
 backlog 0b 0p requeues 11577
  maxpacket 1514 drop_overlimit 0 new_flow_count 28151 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc noqueue 0: dev br-lan root refcnt 2
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev eth0.1 root refcnt 2
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc cake 8040: dev eth0.2 root refcnt 2 bandwidth 13Mbit besteffort triple-isolate nonat nowash no-ack-filter split-gso rtt 100.0ms noatm overhead 44
 Sent 30761973 bytes 126770 pkt (dropped 12, overlimits 22752 requeues 0)
 backlog 0b 0p requeues 0
 memory used: 116318b of 4Mb
 capacity estimate: 13Mbit
 min/max network layer size:           28 /    1492
 min/max overhead-adjusted size:       72 /    1536
 average network hdr offset:           14

                  Tin 0
  thresh         13Mbit
  target          5.0ms
  interval      100.0ms
  pk_delay        5.1ms
  av_delay        917us
  sp_delay         29us
  backlog            0b
  pkts           126782
  bytes        30777765
  way_inds          770
  way_miss         1530
  way_cols            0
  drops              12
  marks               0
  ack_drop            0
  sp_flows            1
  bk_flows            1
  un_flows            0
  max_len          4518
  quantum           396

qdisc ingress ffff: dev eth0.2 parent ffff:fff1 ----------------
 Sent 132166398 bytes 166312 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev wlan0 root refcnt 2
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc cake 8041: dev ifb4eth0.2 root refcnt 2 bandwidth 13Mbit besteffort triple-isolate nonat wash no-ack-filter split-gso rtt 100.0ms noatm overhead 44
 Sent 133096061 bytes 165304 pkt (dropped 1008, overlimits 155019 requeues 0)
 backlog 0b 0p requeues 0
 memory used: 161280b of 4Mb
 capacity estimate: 13Mbit
 min/max network layer size:           46 /    1492
 min/max overhead-adjusted size:       90 /    1536
 average network hdr offset:           14

                  Tin 0
  thresh         13Mbit
  target          5.0ms
  interval      100.0ms
  pk_delay         97us
  av_delay         19us
  sp_delay         11us
  backlog            0b
  pkts           166312
  bytes       134564990
  way_inds          539
  way_miss         1545
  way_cols            0
  drops            1008
  marks               0
  ack_drop            0
  sp_flows            1
  bk_flows            1
  un_flows            0
  max_len          4502
  quantum           396

this seems to be pretty good. Was this with the kind of wifi traffic you were having trouble with?

There may be more of a CPU limit here, but 13Mbps isn't that much.

1 Like

Unfortunately at that time there wasn't any significant Wi-Fi traffic. I will try to replicate the issue and report back. Thanks for your response.

Just for the info, what is the advantage of running SQM on LAN side as well (along with WAN)? should I enable it on WLAN interface to further limit the WIFI devices without affecting my LAN PC?

You can limit the wifi interface, but it's not necessarily the right option at this point. I think we need a test where you start up some streaming or something on several wifi clients, and run continuous pings from your wired device... see what happens.

1 Like

Will test it out.

Yes, please try. Typically the idea is that with OpenWrt's default fq_codel on an BQL enabled network interface (or an airtime fairness enabled wifi interface) things are well latency/bufferbloat wise, and that leaves the WAN interface which needs care, especially since BQL typically is either not implemented in the DSL or DOCSIS-modem or if using an ethernet based router, might be implemented, but does not trigger (either because the ISP side dies not use BQL/fq_codel, or because on egress the internet access speed is way below the ethernet link speed to the modem, so BQL never engages...

I see. But I am using the cake/piece of cake method if that matters.

On the wan side that is fine, the BQL+fq_codel combination is what ideally happens by default on any ethernet interface in OpenWrt (and AQL instead of BQL on more and ore wifi interfaces). I wonder whether in your case cake's per internal fairness modes, as described in the sing and dance section might not help remedy your issue, as this should limit your wifi users influence on your gaming (unless your router's CPU is already maxed out, in which case problems might persist).

Thanks for the technical heads up. I will try to recreate the jitters and report back with the results.