Appropriate interface for SQM

So, I ran the test again with upto 3 WiFi devices streaming YouTube simultaneously at 1080p and here are the results (gathered from the LAN PC) :

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 436725061060 bytes 684749635 pkt (dropped 6, overlimits 0 requeues 12632)
 backlog 0b 0p requeues 12632
  maxpacket 1514 drop_overlimit 0 new_flow_count 31646 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 6040820931 bytes 14097205 pkt (dropped 23168, overlimits 8731121 requeues 0)
 backlog 0b 0p requeues 0
 memory used: 527900b 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         35us
  av_delay         21us
  sp_delay         14us
  backlog            0b
  pkts         14120373
  bytes      6072960212
  way_inds       182093
  way_miss        63887
  way_cols            0
  drops           23168
  marks               0
  ack_drop            0
  sp_flows            3
  bk_flows            1
  un_flows            0
  max_len         22944
  quantum           396

qdisc ingress ffff: dev eth0.2 parent ffff:fff1 ----------------
 Sent 16523775613 bytes 14938936 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 15995894073 bytes 14422200 pkt (dropped 516728, overlimits 22459345 requeues 0)
 backlog 11136b 8p requeues 0
 memory used: 405216b of 4Mb
 capacity estimate: 13Mbit
 min/max network layer size:           46 /    1500
 min/max overhead-adjusted size:       90 /    1544
 average network hdr offset:           14

                  Tin 0
  thresh         13Mbit
  target          5.0ms
  interval      100.0ms
  pk_delay        9.5ms
  av_delay        5.4ms
  sp_delay        1.5ms
  backlog        11136b
  pkts         14938936
  bytes     16738133445
  way_inds       194985
  way_miss        62784
  way_cols            0
  drops          516728
  marks               0
  ack_drop            0
  sp_flows            0
  bk_flows            4
  un_flows            0
  max_len         14596
  quantum           396

The CPU usage hovered around 50%.

Thanks, so

This still looks kind of decent, could you try playing a game concurrently to this load and let us know what results you get?

you could try adding/modify the following /etc/config/sqm to enable strict per-internal-IP-fairness:

        option ingress_ecn 'ECN'
        option egress_ecn 'NOECN'
        option itarget 'auto'
        option etarget 'auto'
        option verbosity '5'
        option qdisc 'cake'
        option script 'piece_of_cake.qos'
        option qdisc_advanced '1'
        option squash_dscp '0'
        option squash_ingress '0'
        option qdisc_really_really_advanced '1'
        option iqdisc_opts 'nat dual-dsthost ingress'
        option eqdisc_opts 'nat dual-srchost'
        option linklayer 'ethernet'
        option overhead '44'
        option linklayer_advanced '1'
        option tcMTU '2047'
        option tcTSIZE '128'
        option tcMPU '64'
        option linklayer_adaptation_mechanism 'default'
        option debug_logging '1'
        option enabled '1'
        option interface 'eth0.2'
        option download '13000'
        option upload '13000'

The "magic" is in the [i|e]qdisc_opts, the nat and dual-xxxhost keywords in that combination will instruct cake to distribute bandwidth first equally among all concurrently active internal hosts, and then for each host it will treat each flow equally; the ingress keyword will help the shaper for the ingress to better deal with the fact that the true bottleneck is on the wrong side of the shaper and will make it more resilient against higher numbers of incoming flows.
I am not 100% sure about the applicable overhead, but I am quite confident that the true overhead is smaller than 44 bytes, and accounting for a bit more overhead than truly exists has benign/negligible effects on latency under load (unlike specifying less overhead than truly exists, in that case bufferbloat will flare up if enough small packets are being transmitted, but I digress).

Good luck!

2 Likes

Will add it for sure and let you know how it goes in gaming. The jitters I experienced the other day might be due to the game server itself (FIFA 20 to be specific) but I will test it out again to be sure.

Update:
I have tried some games while streaming on couple of other devices and it was all smooth. Thanks for the help mate.

3 Likes

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.