I recently upgraded my Wifi router to a TP-Link Archer C7 V2. I'm on a Comcast Xfinity cable connection, about 17Mbit down and 2.5Mbit up. I'm having a lot of trouble getting SQM to work properly, in terms of having bad download latency and jitter.
With SQM download set to 16000 and upload to 2000, here are some speedtest results:
root@OpenWrt:~# speedtest-netperf.sh -H netperf-west.bufferbloat.net -t 20
Download: 14.89 Mbps
Latency: [in msec, 21 pings, 0.00% packet loss]
Min: 65.581
10pct: 71.767
Median: 154.813
Avg: 167.915
90pct: 268.883
Max: 400.116
CPU Load: [in % busy (avg +/- std dev), 18 samples]
cpu0: 51.0 +/- 23.4
Overhead: [in % used of total CPU available]
netperf: 17.3
To me this seems terrible, high average and huge variance. They are comparable (sometimes worse) than without SQM at all. Upload latency and jitter is fine (~60ms very stable).
I have to decrease the download speed dramatically, to almost 50% of the maximum, in order to get acceptable average latency and jitter. Here are the results with download set to 9000:
Download: 8.32 Mbps
Latency: [in msec, 21 pings, 0.00% packet loss]
Min: 62.342
10pct: 62.495
Median: 66.599
Avg: 70.290
90pct: 72.625
Max: 115.823
CPU Load: [in % busy (avg +/- std dev), 19 samples]
cpu0: 37.3 +/- 21.2
Overhead: [in % used of total CPU available]
netperf: 9.7
Here is my /etc/config/sqm:
config queue 'sqmqueue1'
option qdisc_advanced '0'
option linklayer 'none'
option enabled '1'
option interface 'eth0'
option download '16000'
option upload '2000'
option debug_logging '0'
option verbosity '5'
option qdisc 'cake'
option script 'layer_cake.qos'
It is quite barebones. However, I have tried a huge number of variations, with different overhead values, different ECN/NOECN options, different qdisc (e.g., fq_codel), different scripts. None of it seems to make much of a difference.
Right now I'm running the optimized OpenWrt from https://github.com/infinitnet/lede-ar71xx-optimized-archer-c7-v2
. However, I also tried it with the standard OpenWrt 19.07.4 and got similar results.
I'm at my wits end. Could it be possible that my router is faulty? I got it used from Amazon, but it seems functional in every way....
Here is a sample tc -s qdisc
output (this is with download set to 11000):
qdisc noqueue 0: dev lo root refcnt 2
Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
qdisc cake 803e: dev eth0 root refcnt 2 bandwidth 2Mbit diffserv3 triple-isolate split-gso rtt 100.0ms raw overhead 0
Sent 12492999 bytes 64050 pkt (dropped 3109, overlimits 75250 requeues 0)
backlog 0b 0p requeues 0
memory used: 252000b of 4Mb
capacity estimate: 2Mbit
min/max network layer size: 42 / 1514
min/max overhead-adjusted size: 42 / 1514
average network hdr offset: 14
Bulk Best Effort Voice
thresh 125Kbit 2Mbit 500Kbit
target 145.3ms 9.1ms 36.3ms
interval 290.7ms 104.1ms 131.3ms
pk_delay 0us 6.1ms 244us
av_delay 0us 405us 5us
sp_delay 0us 14us 5us
pkts 0 67132 27
bytes 0 17192679 2695
way_inds 0 1356 0
way_miss 0 614 7
way_cols 0 0 0
drops 0 3109 0
marks 0 0 0
ack_drop 0 0 0
sp_flows 0 3 1
bk_flows 0 2 0
un_flows 0 0 0
max_len 0 1514 160
quantum 300 300 300
qdisc ingress ffff: dev eth0 parent ffff:fff1 ----------------
Sent 98309051 bytes 83388 pkt (dropped 0, overlimits 0 requeues 0)
backlog 0b 0p requeues 0
qdisc fq_codel 0: dev eth1 root refcnt 2 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn
Sent 661610 bytes 5548 pkts (dropped 0, overlimits 0)
maxpacket 425 drop_overlimit 0 new_flow_count 9 ecn_mark 0
new_flows_len 0 old_flows_len 0
qdisc noqueue 0: dev br-lan root refcnt 2
Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
qdisc noqueue 0: dev eth1.1 root refcnt 2
Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
qdisc noqueue 0: dev eth0.2 root refcnt 2
Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
qdisc noqueue 0: dev wlan1 root refcnt 2
Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
qdisc noqueue 0: dev wlan0 root refcnt 2
Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
qdisc cake 803f: dev ifb4eth0 root refcnt 2 bandwidth 11Mbit besteffort triple-isolate wash split-gso rtt 100.0ms raw overhead 0
Sent 97896894 bytes 82261 pkt (dropped 1127, overlimits 137742 requeues 0)
backlog 0b 0p requeues 0
memory used: 287680b of 4Mb
capacity estimate: 11Mbit
min/max network layer size: 60 / 1514
min/max overhead-adjusted size: 60 / 1514
average network hdr offset: 14
Tin 0
thresh 11Mbit
target 5.0ms
interval 100.0ms
pk_delay 15.2ms
av_delay 11.0ms
sp_delay 10us
pkts 83388
bytes 99476483
way_inds 1235
way_miss 698
way_cols 0
drops 1127
marks 0
ack_drop 0
sp_flows 6
bk_flows 1
un_flows 0
max_len 1514
quantum 335