Huge SQM difference in 23.05.0

Over the weekend I upgraded my 4040 to 23.05.0 and cleaned up a bit of the config; however, the settings for SQM have been preserved, both the speed and the discipline.

Which is why I cannot really understand how my Samknows Whitebox is reporting such a huge improvement:

Any idea what could be behind that?

Maybe post the output of cat /etc/config/sqm, tc -s qdisc, and tc -d qdisc` so we can see whether the old rate was too low or whether the new rate is too high?

/etc/config/sqm (after the upgrade)

config queue 'eth1'
        option debug_logging '0'
        option download '111000'
        option enabled '1'
        option interface 'pppoe-wan'
        option linklayer 'ethernet'
        option overhead '38'
        option qdisc 'cake'
        option script 'piece_of_cake.qos'
        option upload '27500'
        option verbosity '5'

and before the upgrade (different sorting):

config queue 'eth1'
        option debug_logging '0'
        option verbosity '5'
        option qdisc 'cake'
        option script 'piece_of_cake.qos'
        option linklayer 'ethernet'
        option overhead '38'
        option interface 'pppoe-wan'
        option upload '27500'
        option enabled '1'
        option download '111000'

Apart from the sorting, it is unchanged.... one possibly relevant change is that I removed the vlans in my setup, since I was using them just to split the bridge and apparentl with DSA you can do that without vlans.

tc -s qdisc output:

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 mq 0: dev eth0 root 
 Sent 4897042196 bytes 6493382 pkt (dropped 0, overlimits 0 requeues 49) 
 backlog 0b 0p requeues 49
qdisc fq_codel 0: dev eth0 parent :4 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64 
 Sent 1169641025 bytes 1685969 pkt (dropped 0, overlimits 0 requeues 15) 
 backlog 0b 0p requeues 15
  maxpacket 1506 drop_overlimit 0 new_flow_count 5032 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth0 parent :3 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64 
 Sent 1290260353 bytes 1491602 pkt (dropped 0, overlimits 0 requeues 10) 
 backlog 0b 0p requeues 10
  maxpacket 1506 drop_overlimit 0 new_flow_count 3599 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth0 parent :2 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64 
 Sent 1352906264 bytes 1783223 pkt (dropped 0, overlimits 0 requeues 16) 
 backlog 0b 0p requeues 16
  maxpacket 1506 drop_overlimit 0 new_flow_count 3441 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth0 parent :1 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64 
 Sent 1084234554 bytes 1532588 pkt (dropped 0, overlimits 0 requeues 8) 
 backlog 0b 0p requeues 8
  maxpacket 1506 drop_overlimit 0 new_flow_count 4305 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc noqueue 0: dev lan1 root refcnt 2 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev lan2 root refcnt 2 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev lan3 root refcnt 2 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev lan4 root refcnt 2 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev wan root refcnt 2 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev phy0-ap0 root refcnt 2 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev phy1-ap0 root refcnt 2 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev phy0-ap1 root refcnt 2 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev phy1-ap1 root refcnt 2 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
qdisc cake 800d: dev pppoe-wan root refcnt 2 bandwidth 27500Kbit besteffort triple-isolate nonat nowash no-ack-filter split-gso rtt 100ms noatm overhead 38 
 Sent 433845324 bytes 1434478 pkt (dropped 4504, overlimits 315395 requeues 0) 
 backlog 0b 0p requeues 0
 memory used: 403136b of 4Mb
 capacity estimate: 27500Kbit
 min/max network layer size:           21 /    1492
 min/max overhead-adjusted size:       59 /    1530
 average network hdr offset:            0

                  Tin 0
  thresh      27500Kbit
  target            5ms
  interval        100ms
  pk_delay        499us
  av_delay        109us
  sp_delay         44us
  backlog            0b
  pkts          1438982
  bytes       440371100
  way_inds       103649
  way_miss        55250
  way_cols            0
  drops            4504
  marks               0
  ack_drop            0
  sp_flows            1
  bk_flows            1
  un_flows            0
  max_len         17280
  quantum           839

qdisc ingress ffff: dev pppoe-wan parent ffff:fff1 ---------------- 
 Sent 2737999934 bytes 2482049 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev 6in4-he_2_fra root refcnt 2 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
qdisc cake 800e: dev ifb4pppoe-wan root refcnt 2 bandwidth 111Mbit besteffort triple-isolate nonat wash no-ack-filter split-gso rtt 100ms noatm overhead 38 
 Sent 2732251571 bytes 2478179 pkt (dropped 3870, overlimits 2184307 requeues 0) 
 backlog 0b 0p requeues 0
 memory used: 1031424b of 5550000b
 capacity estimate: 111Mbit
 min/max network layer size:           28 /    1492
 min/max overhead-adjusted size:       66 /    1530
 average network hdr offset:            0

                  Tin 0
  thresh        111Mbit
  target            5ms
  interval        100ms
  pk_delay        193us
  av_delay        100us
  sp_delay         38us
  backlog            0b
  pkts          2482049
  bytes      2737999934
  way_inds        97506
  way_miss        51006
  way_cols            0
  drops            3870
  marks               0
  ack_drop            0
  sp_flows            2
  bk_flows            1
  un_flows            0
  max_len          1492
  quantum          1514

qdisc fq_codel 0: dev tun0 root refcnt 2 limit 10240p flows 1024 quantum 1500 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64 
 Sent 9538765 bytes 11998 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
  maxpacket 1403 drop_overlimit 0 new_flow_count 22 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc noqueue 0: dev br-guest root refcnt 2 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev br-casa root refcnt 2 
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0

tc -d qdisc output:

qdisc noqueue 0: dev lo root refcnt 2 
qdisc mq 0: dev eth0 root 
qdisc fq_codel 0: dev eth0 parent :4 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64 
qdisc fq_codel 0: dev eth0 parent :3 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64 
qdisc fq_codel 0: dev eth0 parent :2 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64 
qdisc fq_codel 0: dev eth0 parent :1 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64 
qdisc noqueue 0: dev lan1 root refcnt 2 
qdisc noqueue 0: dev lan2 root refcnt 2 
qdisc noqueue 0: dev lan3 root refcnt 2 
qdisc noqueue 0: dev lan4 root refcnt 2 
qdisc noqueue 0: dev wan root refcnt 2 
qdisc noqueue 0: dev phy0-ap0 root refcnt 2 
qdisc noqueue 0: dev phy1-ap0 root refcnt 2 
qdisc noqueue 0: dev phy0-ap1 root refcnt 2 
qdisc noqueue 0: dev phy1-ap1 root refcnt 2 
qdisc cake 800d: dev pppoe-wan root refcnt 2 bandwidth 27500Kbit besteffort triple-isolate nonat nowash no-ack-filter split-gso rtt 100ms noatm overhead 38 
qdisc ingress ffff: dev pppoe-wan parent ffff:fff1 ---------------- 
qdisc noqueue 0: dev 6in4-he_2_fra root refcnt 2 
qdisc cake 800e: dev ifb4pppoe-wan root refcnt 2 bandwidth 111Mbit besteffort triple-isolate nonat wash no-ack-filter split-gso rtt 100ms noatm overhead 38 
qdisc fq_codel 0: dev tun0 root refcnt 2 limit 10240p flows 1024 quantum 1500 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64 
qdisc noqueue 0: dev br-guest root refcnt 2 
qdisc noqueue 0: dev br-casa root refcnt 2
1 Like

Thanks!

With 111Mbps 38bytes overhead PPPoE, IPv4 TCP the theoretical upper limit would be around:

111 * ((1500-8-20-20)/(1500-8+38)) = 105.34 Mbps

so it seems your router freed up some CPU cycles somewhere (maybe by offloading some software VLAN handling?) and can invest them into cake?

2 Likes

thank you for the check, I guess the router is running at capacity, CPU-wise, if an update brings the speed close to the theoretical limit.

I think this frequent calculation of expected goodput should be built into luci-app-sqm so people know what to expect when they enter their bandwidth numbers.

The calculation is not all that complicated, but you need to know a few things that are generally not easy to deduce. But I will mull your proposal...

1 Like

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