Best practice for SQM 2.5Gigabit on WAN and 1GB on LAN?

Would these Link Layer advanced options possibly benefit ?
(per https://forum.openwrt.org/t/sqm-cable-docsis-3-1-settings-packet-prioritization/)

	option overhead '22'
	option linklayer_advanced '1'
	option tcMTU '2047'
	option tcTSIZE '128'
	option tcMPU '64'

Please explain what this is supposed to achieve? Why change target and why 20ms?

No, please stick to sqm, if you wanr tbf and fq_codel uses simplest_TBF.qos.

@brada4 please explain why you advised to 'do it manually'. You might well have a point, but please explain that point.

change qdiscs by command?

That is not all that helpful a response, why should the OP desire to change qdiscs by command (and what to do about reboots)?

And again, why should he change the fq_codel target from 5 to 20ms? That will certainly not help with upstream latency under load but make it worse. Now, again, you might have a valuable point, but please explain.

Obviously delaying packets 5ms does not approach expected latency, So we delay them more to see if it fits in cable.
If "simple" qdisc wins then it can be dropped in a hotplug script, if the composite one then we can find sqm parameter combo to replicate.

Sorry this makes no sense what so ever. Again please elaborate. fq_codel does not delay packets for 5ms by default, target is simply the maximal duration of the standing queue codel will tolerate before entering dropping mode.

Sorry again, this is not helpful. sqm-scripts learned quite a few tricks of how to configure fq_codel and HTB and TBF decently, why ignore all that acquired knowledge and start from scratch?

2 Likes

why do you set the Upload that low, even though you apparently can achieve a lot more?

Rationale to start from roots is because normally asymmetrical links are 1:20 or better, this is quite on the unseen corner.
50ms idle latency is wildly over board.

https://www.bufferbloat.net/projects/codel/wiki/Best_practices_for_benchmarking_Codel_and_FQ_Codel/

Look, I am trying to stay nice here, but we have very little evidence that the OP's issues are caused by his upload. If that is our working hypothesis, the next step is to take packet captures during capacity tests to check what is happening there. Throwing out everything and starting from scratch, while educational, does not strike me as the most efficient/fastest way to improve the OP's link (assuming improvement is possible).

Look at the map, the cloudflare servers are simply too far away, and that is from simply looking at the map, I guess a traceroute/mtr would be helpful. BUT that is a different issue, than the one we are trying to debug. Let's not intermix too many things at once.

What exactly is your point?

2 Likes

Last time i checked there was at least one server in Canada. Maybe already two.

One has to start with default codel, find bad latency, like pinging providers website or own gateway, then install SQM to solve problem it is designed to solve i.e increased latency under load.

In the OP's cloudflare tests the servers were located in Newark... these are clearly not near to his location and/or ISP's network...

That is not what I would recommend. sqm-scripts really is just a set of scripts to help beginners to configure fq_codel/cake decently and quickly. Starting with single queue codel is not a good idea in 2024, as the fq scheduling in fq_codel and cake is a big part of what makes them great.

Respectfully, please try to focus on what gets the OP quickest to better results and not what might have the biggest educational impact/learning potential...

But, that said, this is a public forum and everybody's help and ideas are appreciated, so I will refrain from further comments in this direction, and focus on the OP's issue.

Network topology:

WITHOUT SQM
1. tc -s qdisc (No SQM)

root@homerouter:~# 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 mq 0: dev eth0 root
 Sent 112009746440 bytes 84305718 pkt (dropped 126619, overlimits 0 requeues 173192)
 backlog 0b 0p requeues 173192
qdisc fq_codel 0: dev eth0 parent :4 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
 Sent 25159989623 bytes 19949979 pkt (dropped 1377, overlimits 0 requeues 51972)
 backlog 0b 0p requeues 51972
  maxpacket 25738 drop_overlimit 0 new_flow_count 95053 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 32Mb ecn drop_batch 64
 Sent 48523888458 bytes 35449569 pkt (dropped 123453, overlimits 0 requeues 53898)
 backlog 0b 0p requeues 53898
  maxpacket 45420 drop_overlimit 70656 new_flow_count 83381 ecn_mark 0 drop_overmemory 70656
  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 32Mb ecn drop_batch 64
 Sent 20774305939 bytes 15818519 pkt (dropped 839, overlimits 0 requeues 31902)
 backlog 0b 0p requeues 31902
  maxpacket 25738 drop_overlimit 0 new_flow_count 73079 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 32Mb ecn drop_batch 64
 Sent 17551562420 bytes 13087651 pkt (dropped 950, overlimits 0 requeues 35420)
 backlog 0b 0p requeues 35420
  maxpacket 66616 drop_overlimit 0 new_flow_count 65753 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc mq 0: dev eth1 root
 Sent 3596504251 bytes 15822157 pkt (dropped 0, overlimits 0 requeues 11984)
 backlog 0b 0p requeues 11984
qdisc fq_codel 0: dev eth1 parent :4 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
 Sent 929415704 bytes 4342065 pkt (dropped 0, overlimits 0 requeues 3413)
 backlog 0b 0p requeues 3413
  maxpacket 31374 drop_overlimit 0 new_flow_count 1795 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth1 parent :3 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
 Sent 799376095 bytes 2983813 pkt (dropped 0, overlimits 0 requeues 2290)
 backlog 0b 0p requeues 2290
  maxpacket 33902 drop_overlimit 0 new_flow_count 1364 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth1 parent :2 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
 Sent 895882188 bytes 3015079 pkt (dropped 0, overlimits 0 requeues 2740)
 backlog 0b 0p requeues 2740
  maxpacket 17272 drop_overlimit 0 new_flow_count 1526 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth1 parent :1 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
 Sent 971830264 bytes 5481200 pkt (dropped 0, overlimits 0 requeues 3541)
 backlog 0b 0p requeues 3541
  maxpacket 17176 drop_overlimit 0 new_flow_count 1887 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc mq 0: dev eth2 root
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc fq_codel 0: dev eth2 parent :4 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth2 parent :3 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth2 parent :2 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth2 parent :1 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc mq 0: dev eth3 root
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc fq_codel 0: dev eth3 parent :4 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth3 parent :3 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth3 parent :2 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth3 parent :1 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 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

1.1 iftop During Download Test (No SQM)
image

1.2 iftop During Upload Test (No SQM)
image

2. tc -s qdisc Right after test(No SQM)

root@homerouter:~# 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 mq 0: dev eth0 root
 Sent 123092060726 bytes 91925323 pkt (dropped 131132, overlimits 0 requeues 200725)
 backlog 0b 0p requeues 200725
qdisc fq_codel 0: dev eth0 parent :4 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
 Sent 27941280462 bytes 21854623 pkt (dropped 1891, overlimits 0 requeues 59220)
 backlog 0b 0p requeues 59220
  maxpacket 25738 drop_overlimit 0 new_flow_count 140495 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 32Mb ecn drop_batch 64
 Sent 51176038189 bytes 37260997 pkt (dropped 123640, overlimits 0 requeues 66669)
 backlog 0b 0p requeues 66669
  maxpacket 45420 drop_overlimit 70656 new_flow_count 134775 ecn_mark 22 drop_overmemory 70656
  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 32Mb ecn drop_batch 64
 Sent 23662699921 bytes 17825191 pkt (dropped 3312, overlimits 0 requeues 33822)
 backlog 0b 0p requeues 33822
  maxpacket 25738 drop_overlimit 0 new_flow_count 102226 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 32Mb ecn drop_batch 64
 Sent 20312042154 bytes 14984512 pkt (dropped 2289, overlimits 0 requeues 41014)
 backlog 0b 0p requeues 41014
  maxpacket 66616 drop_overlimit 0 new_flow_count 105636 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc mq 0: dev eth1 root
 Sent 4566581441 bytes 19936092 pkt (dropped 0, overlimits 0 requeues 12492)
 backlog 0b 0p requeues 12492
qdisc fq_codel 0: dev eth1 parent :4 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
 Sent 1138114991 bytes 5311415 pkt (dropped 0, overlimits 0 requeues 3536)
 backlog 0b 0p requeues 3536
  maxpacket 31374 drop_overlimit 0 new_flow_count 1965 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth1 parent :3 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
 Sent 971454964 bytes 3881977 pkt (dropped 0, overlimits 0 requeues 2408)
 backlog 0b 0p requeues 2408
  maxpacket 33902 drop_overlimit 0 new_flow_count 1499 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth1 parent :2 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
 Sent 1281255260 bytes 4088393 pkt (dropped 0, overlimits 0 requeues 2879)
 backlog 0b 0p requeues 2879
  maxpacket 17272 drop_overlimit 0 new_flow_count 1677 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth1 parent :1 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
 Sent 1175756226 bytes 6654307 pkt (dropped 0, overlimits 0 requeues 3669)
 backlog 0b 0p requeues 3669
  maxpacket 17176 drop_overlimit 0 new_flow_count 2064 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc mq 0: dev eth2 root
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc fq_codel 0: dev eth2 parent :4 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth2 parent :3 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth2 parent :2 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth2 parent :1 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc mq 0: dev eth3 root
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc fq_codel 0: dev eth3 parent :4 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth3 parent :3 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth3 parent :2 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth3 parent :1 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 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

3. Results (no SQM) - 30 parallel streams, 70 secs lenght

WITH SQM
0. SQM Config

config queue 'eth1'
	option enabled '1'
	option interface 'eth1'
	option download '1933040'
	option upload '46480'
	option qdisc 'cake'
	option script 'piece_of_cake.qos'
	option linklayer 'ethernet'
	option debug_logging '0'
	option verbosity '5'
	option overhead '42'
	option qdisc_advanced '1'
	option squash_dscp '1'
	option squash_ingress '1'
	option ingress_ecn 'ECN'
	option egress_ecn 'NOECN'
	option qdisc_really_really_advanced '1'
	option iqdisc_opts 'mpu 84 nat dual-dsthost ingress'
	option eqdisc_opts 'mpu 84 nat dual-srchost'

1. tc -s qdisc (SQM)

root@homerouter:~# 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 mq 0: dev eth0 root
 Sent 123338887311 bytes 92110940 pkt (dropped 131132, overlimits 0 requeues 201080)
 backlog 0b 0p requeues 201080
qdisc fq_codel 0: dev eth0 parent :4 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
 Sent 28039837173 bytes 21924870 pkt (dropped 1891, overlimits 0 requeues 59282)
 backlog 0b 0p requeues 59282
  maxpacket 25738 drop_overlimit 0 new_flow_count 140570 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 32Mb ecn drop_batch 64
 Sent 51216202652 bytes 37292722 pkt (dropped 123640, overlimits 0 requeues 66778)
 backlog 0b 0p requeues 66778
  maxpacket 45420 drop_overlimit 70656 new_flow_count 134869 ecn_mark 22 drop_overmemory 70656
  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 32Mb ecn drop_batch 64
 Sent 23718653713 bytes 17868964 pkt (dropped 3312, overlimits 0 requeues 33910)
 backlog 0b 0p requeues 33910
  maxpacket 25738 drop_overlimit 0 new_flow_count 102299 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 32Mb ecn drop_batch 64
 Sent 20364193773 bytes 15024384 pkt (dropped 2289, overlimits 0 requeues 41110)
 backlog 0b 0p requeues 41110
  maxpacket 66616 drop_overlimit 0 new_flow_count 105710 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc cake 808b: dev eth1 root refcnt 5 bandwidth 46480Kbit besteffort dual-srchost nat nowash no-ack-filter split-gso rtt 100ms noatm overhead 42 mpu 84
 Sent 822530 bytes 4286 pkt (dropped 0, overlimits 2701 requeues 3)
 backlog 0b 0p requeues 3
 memory used: 46168b of 4Mb
 capacity estimate: 46480Kbit
 min/max network layer size:           40 /    1500
 min/max overhead-adjusted size:       84 /    1542
 average network hdr offset:           14

                  Tin 0
  thresh      46480Kbit
  target            5ms
  interval        100ms
  pk_delay        219us
  av_delay         31us
  sp_delay          2us
  backlog            0b
  pkts             4286
  bytes          822530
  way_inds          136
  way_miss          258
  way_cols            0
  drops               0
  marks               0
  ack_drop            0
  sp_flows            1
  bk_flows            1
  un_flows            0
  max_len          5754
  quantum          1418

qdisc ingress ffff: dev eth1 parent ffff:fff1 ----------------
 Sent 40776191 bytes 35086 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc mq 0: dev eth2 root
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc fq_codel 0: dev eth2 parent :4 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth2 parent :3 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth2 parent :2 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth2 parent :1 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc mq 0: dev eth3 root
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc fq_codel 0: dev eth3 parent :4 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth3 parent :3 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth3 parent :2 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth3 parent :1 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 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 cake 808c: dev ifb4eth1 root refcnt 2 bandwidth 1933Mbit besteffort dual-dsthost nat wash ingress no-ack-filter split-gso rtt 100ms noatm overhead 42 mpu 84
 Sent 42435879 bytes 35086 pkt (dropped 0, overlimits 6351 requeues 0)
 backlog 0b 0p requeues 0
 memory used: 122738b of 15140Kb
 capacity estimate: 1933Mbit
 min/max network layer size:           46 /    1500
 min/max overhead-adjusted size:       88 /    1542
 average network hdr offset:           14

                  Tin 0
  thresh       1933Mbit
  target            5ms
  interval        100ms
  pk_delay        233us
  av_delay         71us
  sp_delay          2us
  backlog            0b
  pkts            35086
  bytes        42435879
  way_inds          325
  way_miss          255
  way_cols            0
  drops               0
  marks               0
  ack_drop            0
  sp_flows            2
  bk_flows            1
  un_flows            0
  max_len         66616
  quantum          1514

1.2 iftop during download (SQM)
image

1.3 iftop furing upload (SQM)
image

2. tc -s qdisc right after test (SQM)

root@homerouter:~# 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 mq 0: dev eth0 root
 Sent 131465328847 bytes 97727300 pkt (dropped 134607, overlimits 0 requeues 229217)
 backlog 0b 0p requeues 229217
qdisc fq_codel 0: dev eth0 parent :4 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
 Sent 30306095390 bytes 23510771 pkt (dropped 3400, overlimits 0 requeues 61333)
 backlog 0b 0p requeues 61333
  maxpacket 25738 drop_overlimit 0 new_flow_count 169224 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 32Mb ecn drop_batch 64
 Sent 53478210077 bytes 38852889 pkt (dropped 125175, overlimits 0 requeues 69036)
 backlog 0b 0p requeues 69036
  maxpacket 45420 drop_overlimit 70656 new_flow_count 164784 ecn_mark 22 drop_overmemory 70656
  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 32Mb ecn drop_batch 64
 Sent 25130953407 bytes 18829344 pkt (dropped 3326, overlimits 0 requeues 50321)
 backlog 0b 0p requeues 50321
  maxpacket 25738 drop_overlimit 0 new_flow_count 136630 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 32Mb ecn drop_batch 64
 Sent 22550069973 bytes 16534296 pkt (dropped 2706, overlimits 0 requeues 48527)
 backlog 0b 0p requeues 48527
  maxpacket 66616 drop_overlimit 0 new_flow_count 161992 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc cake 808b: dev eth1 root refcnt 5 bandwidth 46480Kbit besteffort dual-srchost nat nowash no-ack-filter split-gso rtt 100ms noatm overhead 42 mpu 84
 Sent 566185958 bytes 3198614 pkt (dropped 54982, overlimits 6593932 requeues 241)
 backlog 89326b 59p requeues 241
 memory used: 1426692b of 4Mb
 capacity estimate: 46480Kbit
 min/max network layer size:           28 /    1500
 min/max overhead-adjusted size:       84 /    1542
 average network hdr offset:           14

                  Tin 0
  thresh      46480Kbit
  target            5ms
  interval        100ms
  pk_delay       19.4ms
  av_delay       6.66ms
  sp_delay        864us
  backlog        89326b
  pkts          3253655
  bytes       649440521
  way_inds       252097
  way_miss         1658
  way_cols            0
  drops           54982
  marks               0
  ack_drop            0
  sp_flows           17
  bk_flows           19
  un_flows            0
  max_len         19682
  quantum          1418

qdisc ingress ffff: dev eth1 parent ffff:fff1 ----------------
 Sent 7973666948 bytes 5692954 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc mq 0: dev eth2 root
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc fq_codel 0: dev eth2 parent :4 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth2 parent :3 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth2 parent :2 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth2 parent :1 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc mq 0: dev eth3 root
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc fq_codel 0: dev eth3 parent :4 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth3 parent :3 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth3 parent :2 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth3 parent :1 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 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 cake 808c: dev ifb4eth1 root refcnt 2 bandwidth 1933Mbit besteffort dual-dsthost nat wash ingress no-ack-filter split-gso rtt 100ms noatm overhead 42 mpu 84
 Sent 8176047812 bytes 5692954 pkt (dropped 0, overlimits 4122325 requeues 0)
 backlog 0b 0p requeues 0
 memory used: 542058b of 15140Kb
 capacity estimate: 1933Mbit
 min/max network layer size:           46 /    1500
 min/max overhead-adjusted size:       88 /    1542
 average network hdr offset:           14

                  Tin 0
  thresh       1933Mbit
  target            5ms
  interval        100ms
  pk_delay         37us
  av_delay          9us
  sp_delay          1us
  backlog            0b
  pkts          5692954
  bytes      8176047812
  way_inds       121745
  way_miss         1715
  way_cols            0
  drops               0
  marks               0
  ack_drop            0
  sp_flows           36
  bk_flows            1
  un_flows            0
  max_len         66616
  quantum          1514

3. Results (SQM) - 30 parallel streams, 70secs

As an experiment and considering that there are two bottlenecks, one at the openwrt router WAN side and one on the port in which I connect the main switch I added a second SQM instance to the switch port ETH0

sqm config

config queue 'eth1'
	option enabled '1'
	option interface 'eth1'
	option download '1933040'
	option upload '46480'
	option qdisc 'cake'
	option script 'piece_of_cake.qos'
	option linklayer 'ethernet'
	option debug_logging '0'
	option verbosity '5'
	option overhead '42'
	option qdisc_advanced '1'
	option squash_dscp '1'
	option squash_ingress '1'
	option ingress_ecn 'ECN'
	option egress_ecn 'NOECN'
	option qdisc_really_really_advanced '1'
	option iqdisc_opts 'mpu 84 nat dual-dsthost ingress'
	option eqdisc_opts 'mpu 84 nat dual-srchost'

config queue
	option enabled '1'
	option interface 'eth0'
	option download '900000'
	option upload '900000'
	option debug_logging '0'
	option verbosity '5'
	option qdisc 'fq_codel'
	option script 'simplest_tbf.qos'
	option linklayer 'ethernet'
	option overhead '22'

tc disc right after test

root@homerouter:~# 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 tbf 1: dev eth0 root refcnt 5 rate 900Mbit burst 112387b lat 300ms
 Sent 7708713792 bytes 5256314 pkt (dropped 26737, overlimits 8862222 requeues 5990)
 backlog 0b 0p requeues 5990
qdisc fq_codel 110: dev eth0 parent 1: limit 1001p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
 Sent 7708713792 bytes 5256314 pkt (dropped 26737, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 2996 drop_overlimit 16149 new_flow_count 494511 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc ingress ffff: dev eth0 parent ffff:fff1 ----------------
 Sent 595803337 bytes 3087596 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc cake 8095: dev eth1 root refcnt 5 bandwidth 46480Kbit besteffort dual-srchost nat nowash no-ack-filter split-gso rtt 100ms noatm overhead 42 mpu 84
 Sent 547446907 bytes 3034030 pkt (dropped 52638, overlimits 6396116 requeues 217)
 backlog 68130b 45p requeues 217
 memory used: 920304b of 4Mb
 capacity estimate: 46480Kbit
 min/max network layer size:           28 /    1500
 min/max overhead-adjusted size:       84 /    1542
 average network hdr offset:           14

                  Tin 0
  thresh      46480Kbit
  target            5ms
  interval        100ms
  pk_delay       21.2ms
  av_delay       5.82ms
  sp_delay       1.54ms
  backlog        68130b
  pkts          3086713
  bytes       627119584
  way_inds          966
  way_miss         1146
  way_cols            0
  drops           52638
  marks               0
  ack_drop            0
  sp_flows           24
  bk_flows           12
  un_flows            0
  max_len         17061
  quantum          1418

qdisc ingress ffff: dev eth1 parent ffff:fff1 ----------------
 Sent 7451308961 bytes 5311118 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc mq 0: dev eth2 root
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc fq_codel 0: dev eth2 parent :4 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth2 parent :3 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth2 parent :2 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth2 parent :1 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc mq 0: dev eth3 root
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc fq_codel 0: dev eth3 parent :4 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth3 parent :3 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth3 parent :2 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth3 parent :1 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 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 cake 8096: dev ifb4eth1 root refcnt 2 bandwidth 1933Mbit besteffort dual-dsthost nat wash ingress no-ack-filter split-gso rtt 100ms noatm overhead 42 mpu 84
 Sent 7634925613 bytes 5311118 pkt (dropped 0, overlimits 4165296 requeues 0)
 backlog 0b 0p requeues 0
 memory used: 471120b of 15140Kb
 capacity estimate: 1933Mbit
 min/max network layer size:           46 /    1500
 min/max overhead-adjusted size:       88 /    1542
 average network hdr offset:           14

                  Tin 0
  thresh       1933Mbit
  target            5ms
  interval        100ms
  pk_delay         38us
  av_delay          6us
  sp_delay          1us
  backlog            0b
  pkts          5311118
  bytes      7634925613
  way_inds          980
  way_miss         1175
  way_cols            0
  drops               0
  marks               0
  ack_drop            0
  sp_flows           34
  bk_flows            1
  un_flows            0
  max_len         60560
  quantum          1514

qdisc tbf 1: dev ifb4eth0 root refcnt 2 rate 800Mbit burst 100000b lat 300ms
 Sent 705624469 bytes 3087596 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc fq_codel 110: dev ifb4eth0 parent 1: limit 1001p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
 Sent 705624469 bytes 3087596 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 16489 drop_overlimit 0 new_flow_count 3048605 ecn_mark 0
  new_flows_len 0 old_flows_len 0

Results
1. Fast speedtest, 70secs, 30 threads

2. Waveform

I have several questions in my network aliterate mind...

  1. Could this be an approach on the right direction to solve this?
  2. Did I set the overhead right for the SQM for the switch port?
  3. Is fq_codel the best for this SQM instance (port connected to the switch) or should I change it to cake too?
  4. What should I change to fine tune it and try o achieve A+? should I change the SQM for the wan port first or the one for the switch port?

I will monitor load and cpu usage through the day.

1 Like

Happy I turned out right :nerd_face: about (actually not) tuning slow uplink only.

changing rx hash to in+out tcp/udp port may help balance input load across interrupts and cpu-s IF supported. i.e level out that one heavier core.

Now MAC-MAC pair selects CPU, ie gateway to openwrt always land on one, it can be tuned to place different connections on different CPUs.
Not mandatory, it looks under control.

Thanks, so here BQL and fq_codel on the LAN interface together with cake on the internet wan should actually deliver decent low working latency, but they do not so mystery time :wink:

This is a high setting for a nominally 1.5 Gbps contracted rate... how did you select that? Mind you in these test the download was throttled somewhere else (0 drops/marks reported for the download direction) so this dies not matter too much right now.

That is quite a lot of drops in the egress direction... however, even that only amounts to a drop rate of 100*54982/6593932 = 0.83% under sustained load and the worst case delay was around

Which under load is also okayish... as the average delay was only at 6.66 ms (for a codel type AQM under sustained load you expect an average delay of around the target value, and 6.66 is close enough to 5ms).

This is fine, but should have the same effect as setting the eth1 download shaper to 900 Mbps, which IIRC it did not?

Since the qdiscs retain their statistics it is safer to always collect the stats before and after a test to see the changes in numbers...

As @dlakelan proposed that is a way to address the issue, albeit then it should suffice to set the eth1 shaper to 900... unless there is something shitty going on with the switch (head of line queueing). And it might be the pragmatic way forward, or the final compromise, however it might help to better understand and diagnose the root cause (hopefully allowing to ameliorate it better).

Not really, as there the full effective ethernet overhead of 38* (or 42 if you use VLAN tags) bytes should apply, but that is a level of detail that will not affect your tests (it will only crop up if you saturate the link with very small packets, which I assume you are not doing).

*) 12 bytes of this overhead are the 12 octet interframe gap, so not really data, but still a dead transmit time worth 12 octets.

It depends on which feature set you want, but if this is your main internet access for almost all your devices, then probably cake's feature set will be more desirable, but that is a policy question that only you can answer for your network.

First stop obsessing about the test, yes that test is a great service of waveform for the community, but it still is a browser test and browsers are not ideal measurement environmemts especially at such high rates as your download. If working latency feels good in those applications you care about, why bother about an artificial test?

Great idea!

I have a practical answer, based on my own experience. I have a PC router like yours, with a 25% faster processor. Mine will go 2.5 GB bidirectional, with a VPN, and the CPU is at about 50%. So there are no CPU problems.

It makes no sense to enable SQM on download, since the cable company is already limiting download speed, you don't need to do so also. However on uploads, you do need to limit uploads to preserve latency. That's because if you send data to the modem faster than it can transmit it on the cable, the modem input queue fills up and that introduces delay. So you just need to set SQM on upload to limit the data sent to the modem to be a little less than the modem can send to the cable provider.

Here's how you do this.

  1. Enable SQM. Set the download speed to 0 to disable it on incoming data. Set the upload speed to 45,000 bps, significally less than your rated upload speed of 50,000 bps.
  2. Ping a fast site, for example: google.com, and note the round-trip time.
  3. Start a large upload to a site that can take it full speed, for example to a Google Drive or a Microsoft Onedrive.
  4. Start a continuous ping to google.com again. If your upload speed is really 50,000 bps, the ping time should have barely increased.
  5. While continuing the large upload and the continuous ping, slowly increase the SQM upload speed until the ping time increases. It increases as the modem input queue fills up.
  6. Now back down the SQM upload speed to the highest value where you have acceptable ping times. Only you can determine "acceptable" times.
  7. Crack open a beverage. You have the optimal setting.

I should have also mentioned that I use the Queing discipline "cake" with the Queue setup script: "piece_of_cake.qos". Experiment as you wish, but I know this one works great.

Now, I am the first to admit that whether to use sqm or not s a policy decision each network needs to make individually; BUT there is no magical access rate from which on sqm becomes futile... if your ISP delivers acceptable latency under full saturating loads, by all means do not use local AQM, but that is true independent of rate...
Say your ISP uses e.g. libreqos for your download traffic then in all likelihood you do not need to run a local sqm instance yourself for the download even on a 20 Mbps link, but there are enough links in the 1 Gbps class with atrocious latency under load, where SQM can really improve things...
And on a DOCSIS 3.1 link the mandatory PIE instance in the upload direction might also be good enough for an individual network's requirements.
Hence I always recommend to try bot egress and ingress shaping to figure out for each individual network which policy to select.

1 Like

I have tried lots of experiments, but setting SQM on download has never improved anything.

Can you suggest an experiement that proves your point?