SQM QoS performance on MT7621

So, I have a D-Link DIR-882 router (MT7621AT + MT7615N x2) currently running "official" OpenWrt SNAPSHOT r13871 from a few days ago. It's operating in Access Point mode and is wired straight to the ISP Modem (DOCSIS 3.0, 240 Mbps download, 20 Mbps upload). The WAN connection is established through DHCP (both for IPv4 and IPv6).

I recently experimented SQM QoS on it and, no matter what combination of qdisc and script I pick, throughput never exceeds ~ 150 Mbps (all settings apart from the download/upload speed and qdisc/script combination were left to the default values -- SQM was set up on the wan interface only). No other CPU intensive software is installed or running (like Wireguard, OpenVPN, etc), it's essentially the snapshot firmware image + LuCI + SQM QoS. Enabling software offload alone or both software + hardware offload at the same time didn't yield any change to the throughput, either.

I know a dual core MIPS 1004Kc CPU running at just 880 MHz isn't exactly fast, especially when most routers have moved to multi core ARM CPUs nowadays, but SQM QoS yielding just 150 Mbps even with fq_codel + simplest_tbf.qos doesn't seem right, especially when I take in consideration an even older AR9344 CPU from TP-Link WDR4300 I had earlier (single core MIPS 74Kc at 560 MHz) was reaching around ~ 120 Mbps throughput with the same settings on OpenWrt 19.07 the last time I checked.

Looking at the system and kernel logs, I can't see anything wrong, there are no errors, crashes or warnings on it and I confirmed with some iperf3 benchmarks that this router is easily exceeding ~ 320 Mbps throughput on wireless and ~ 800 Mbps when wired, as long as SQM QoS isn't enabled (which actually are close to the results I got on the stock firmware -- 380 Mbps wireless, 780 Mbps wired).

So, is there something wrong and these numbers are indeed lower than expected or was I expecting too much and the numbers are right? If it's the former (I hope it is) what could I do to troubleshoot and fix whatever might be causing the low throughput with SQM?

I'm using DIR-882 with OpenWrt SNAPSHOT r13938-15f585afc5 / LuCI Master git-20.207.72166-135e7a4

Also tried SQM and my download speed got capped to 150Mbps.

My internet bandwidths are: 300Mbps download / 150Mbps upload.

I'm using PPPoE FTTH, tried different settings for SQM / overhead but no success.

I guess it's a CPU restrain and a script to force the dual core usage would fix it.

none of the actual shapers (HTB or cake's internal shaper) can take advantage of running on multiple CPUs so the best you can do is distribute IRQs between your CPUs and idealy move up- and downstream shaper on different CPUs, but ~150 sounds about right for a ~880MHz MIPS CPU. Sorry, traffic shaping is computationally expensive

I'm still confused. I digged a little deeper and found some reports of other MT7621 users getting double of that, some even here on the forums (like on this thread). The OP claimed ~200 to 300 Mbps with cake and over 400 Mbps with simplest_tbf.qos.

Another strange thing is, given simplest_tbf.qos is supposed to be lighter, it should achieve at least different results than piece_of_cake.qos, and yet I'm seeing the same ~150 Mbps throughput no matter what combination of qdisc and script I pick.

Given the inconsistent reports, I think I should investigate this further. With that in mind, what's the best way to monitor SQM QoS? I mean, how can I see the CPU usage and other technical info of an active SQM instance?

Not really a scientific approach, the easiest approach is to start top -d 1 on a router while running a speedtest with a shaper active and looking at the reported percent idle. With a multicore CPU like yours, htop might be better as that can give information per CPU. Once a CPU gets close enough to being pegged (or %idle gets close to 100/number_of_CPUs) you are in all likelihood CPU-bound.
The next step would be to look at how the IRQs are distributed among the CPUs and if/how receive side steering is configured, but the first step should be to confirm CPU exhaustion...


I did benchmarks on mine which are also MT7621AT. (never tried top -d 1 as moeller0 suggested though). But I pretty much got around 300Mbps with SQM on. I really don't know what i'm doing with benchmarks so it's probably a flawed test. Unfortunately, I don't have a 300Mbps connection to test this on as my internet is only 50Mbps Down and 5Mbps up.

I did have reports from one person with my router saying they only get up to 150Mbps when SQM is turned on. But if they run a speed test on both mobile (wifi) and on a computer (ethernet) together they did add up to be around 200 Mbps which is what they paid for.

IQRouter v3 also advertises about ~350 Mbps which I suspect has a MT7621AT because it looks exactly like my router pictured below:


I suspect something is up from what you said about your actual speeds being 300 down 150 up. Maybe your Uploads and Downloads are flipped? If you set upload limit to 270 Mbps does it cause your download speed to go up and close to 270Mbps?

If so you need to make sure you select your WAN interface not LAN interface. I've had this happen twice in my life and was stumped for days haha. Hope that was the issue.


Again I do want to know what max bandwidth the MT7621AT can do with SQM on in the real world. I just don't have a 300+ Mbps connection to test it on.

So, I ran a couple of tests while monitoring htop and, apart from a kernel thread named ksoftirqd/0 always maxing a single core when a data transfer is occurring (even when SQM is disabled), I didn't find anything relevant, and still was capped to ~150 Mbps with SQM, regardless of the settings.

Could this issue be related? My router uses dual MT7615N modules, although I'm not experiencing any of the connection instabilities and crashes reported on the issue, I do see a lot of interrupt errors when querying /proc/interrupts. Maybe it will improve if I try the proprietary drivers?

No changes even trying your suggestions.

I gotta say, I was expecting better performance, considering this:

Keep in mind the benchmark was done with the stock firmware and with the closed-source proprietary drivers from Mediatek, and the QoS settings available on the stock firmware are super simple compared to what you can do on OpenWrt.

Yes, you're right, but this benchmark serves to show that the hardware in this router is capable of handling more than 150mbps.

1 Like

Was that actually in question? I thought, but might have missed something, that we are talking about the throughput achievable with SQM traffic shaping. In that case, that we still are talking about SQM I am not sure whether the stock data is all that relevant, since I am confident that the stock firmware will not be defaulting to costly traffic shaping...


/\ This. From the brief time I spent with the stock firmware, the QoS settings were very very simple and you still had to manually assign the priority of each host. SQM QoS, on the other hand, is more of a set up and forget approach, while also offering way more customization...

For what it's worth, the MT7621AT-based Ubiquiti EdgeRouter X-SFP and the stock 1.0-series firmware only manages 140-150 Mbps download for me with SQM enabled, but can do at least 220 MBps (my ISP limit) with SQM disabled.


Is this still an issue with the MT7621? Do you recommend not to buy a system with that chip?

apparently, on my totolink x5000r with custom patch from here and builds from here I maxed out CPU and 150 Mbit with sqm on 300 Mbit available bandwith. That sucks, but router was cheap.

You might turn on software flow offloading which is compatible with SQM and will give you some extra CPU cycles.

So, I kinda forgot this topic. It seems MT7621 really can't do more than ~150 Mbps when using SQM QoS, not even with the current mt76 driver (which is way more stable now than when I opened this thread), software flow offloading doesn't help much either, delivering only about 5 to 10 Mbps more throughput.

In that meantime I also switched ISPs, finally leaving the old HFC behind and moving to FTTH (300 Mbps download, 150 Mbps upload). This new provider delivers surprisingly low bufferbloat out of the box, so I don't miss SQM too much, especially now that I must authenticate via PPPoE (that alone is another performance hit, albeit smaller than SQM).

Regardless, my D-Link DIR-882 with current OpenWrt snapshot and with both software + hardware flow offloading enabled still manages to max out the new ISP connection, even over Wi-Fi, so I'm satisfied for now. That seems to be pushing the router to its limits, though, so keep that in mind if you have a faster connection and are planning to get a MT7621-based router...


I can confirm that adding SW and HW offloading improved speed + 10 Mbps.

With hw offloading enabled the system interface counters do not count offloaded traffic going through these interfaces and don't show proper rx/tx bytes and packets counters.

Is there a way I can read proper stats off the system anywhere else?

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