I'm trying to setup SQM on my Xiaomi Router Pro (mir3p) running latest LEDE snapshot.
- The router in question uses a MT7621A SoC (2x880 MHz MIPS 1004Kc V2.15, 4 logical processors total).
- My ISP provides 500 Mbps/500 Mbps connectivity directly via Ethernet.
Note that I'm not well versed in tc
internals, so I'm just a user here.
From what I've been able to gather about cake, it was intended as a fast and undemanding scheduler for just about any device out there. However, piece_of_cake.qos (and any other QoS script that makes use of cake) only yields ~200 Mbps/300 Mbps max, tested with speedtest-cli from a high-performance machine connected to the router via Gigabit Ethernet.
$ ssh root@router cat /etc/config/sqm
config queue 'eth1'
option interface 'eth0.2'
option download '500000'
option upload '500000'
option debug_logging '0'
option verbosity '5'
option enabled '1'
option qdisc 'cake'
option linklayer 'ethernet'
option overhead '38'
option qdisc_advanced '0'
option script 'piece_of_cake.qos'
$ ssh root@router tc 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 8024: dev eth0.2 root refcnt 2 bandwidth 500Mbit besteffort triple-isolate nonat nowash no-ack-filter split-gso rtt 100.0ms noatm overhead 38
qdisc ingress ffff: dev eth0.2 parent ffff:fff1 ----------------
qdisc noqueue 0: dev wlan1 root refcnt 2
qdisc cake 8025: dev ifb4eth0.2 root refcnt 2 bandwidth 500Mbit besteffort triple-isolate nonat wash no-ack-filter split-gso rtt 100.0ms noatm overhead 38
ssh operator@stratofortress speedtest-cli
Retrieving speedtest.net configuration...
Testing from Rostelecom (95.84.164.43)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by Megafon (Moscow) [0.12 km]: 3.856 ms
Testing download speed................................................................................
Download: 192.06 Mbit/s
Testing upload speed......................................................................................................
Upload: 293.70 Mbit/s
The only QoS script that can produce >400 Mbps is simplest_tbf.qos (which appears to use fq_codel exclusively as the leaf qdisc, despite help stating that it sets up a "TBF rate limiter with your qdisc attached":
$ ssh root@router cat /etc/config/sqm
config queue 'eth1'
option interface 'eth0.2'
option download '500000'
option upload '500000'
option debug_logging '0'
option verbosity '5'
option enabled '1'
option qdisc 'cake'
option linklayer 'ethernet'
option overhead '38'
option qdisc_advanced '0'
option script 'simplest_tbf.qos'
$ ssh root@router tc 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 tbf 1: dev eth0.2 root refcnt 2 rate 500Mbit burst 62500b lat 300.0ms
qdisc fq_codel 110: dev eth0.2 parent 1: limit 1001p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn
qdisc ingress ffff: dev eth0.2 parent ffff:fff1 ----------------
qdisc noqueue 0: dev wlan1 root refcnt 2
qdisc tbf 1: dev ifb4eth0.2 root refcnt 2 rate 500Mbit burst 62500b lat 300.0ms
qdisc fq_codel 110: dev ifb4eth0.2 parent 1: limit 1001p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn
$ ssh operator@stratofortress speedtest-cli
Retrieving speedtest.net configuration...
Testing from Rostelecom (95.84.164.43)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by Megafon (Moscow) [0.12 km]: 4.716 ms
Testing download speed................................................................................
Download: 432.92 Mbit/s
Testing upload speed......................................................................................................
Upload: 452.75 Mbit/s
Is this expected? If not, how can I improve throughput when using cake?
Also, why does simplest_tbf.qos force the use of fq_codel?