LEDE Luci QOS and SQM at same time

can we run these together at the same time? SQM doesn't offer bandwidth limiter per IP or MAC address, unless there an another way.

I hope this question doesn't sound impertinent, but why do you want to limit bandwidth per IP/MAC address? It may be that SQM solves your problem with out all the configuration hassle.

SQM provides fair sharing of the bottleneck bandwidth (typically, the link to the ISP) for all devices on the net.

If only one device is requesting data, it gets the full capacity. If multiple devices are downloading, they get an equal share. And all the time, the latency for all devices remains low.

I'll give a use-case. Suppose that you're concerned about a device whose OS you don't control being compromised and becoming part of a botnet. You put it on a separate network/vlan maybe with other IoT type devices, but you also know it doesn't have a legit reason to be producing more than X bandwidth, so you limit it to X, and if it is compromised, you limit the damage it can cause.

just a thought.

Sqm doesn't work for me that well when it comes to online gaming on xbox live, bufferbloat is also terrible for wifi as well, only it would give better bufferbloat through ethernet cable that is hooked to pc directly, only time I manage to get good results are when I switched to ddwrt kong mod where I limit all devices to not exceed say 20-50 mbps download speed, my upload seems to stay in green even at highest mbps, only download gives bad bufferbloat, I repeated this test several times on both firmware and kong mod seems to work better for bufferbloat and wifi as well, I really like the LEDE but due to lack of those options in sqm, I get these issues. I am fully aware of how sqm works and those options on sqm. I would get C grade if I set the download speed say 50 mbps vs 20 mbps in kong qos per device such as ipad, wifi gets A when I limit the download speed to 20 mbps, so what am saying is it would give bad bufferbloat grade if download speed is set too high especially for wifi devices that run on 2.4 ghz, where you usually get A on 5 ghz wifi.

use firewall rules to add DSCP = CS6 to your game packets, this will induce them to go over the VOICE queue on WMM enabled wifi, which will give you lower latency on wifi.

@Happi you didn't say what kind of router and what OpenWrt/LEDE version you're using.

I would want to check what versions (if any) of OpenWrt/LEDE use the fixes from the Make Wi-Fi Fast project. Specific results from that project include:

  • Reduction of latency in Wi-Fi by at least an order of magnitude, and
  • Airtime Fairness, where slow (802.11b) devices don't drag down the performance of faster devices

Both are summarized in:

These would decrease the latency in the Wi-Fi of your router so that it's usable for gaming.

DD-WRT v3.0-r33675M kongac (11/03/17)
I use netgear R8000
Linux 4.4.95 #472 SMP Fri Nov 3 23:27:37 CET 2017 armv7l

DD-WRT is not a part of OpenWrt/LEDE.

In that case I have to reinstall the LEDE and report back. Back to the original question, can we run both SQM and QOS at the same time?

Try it and see...

I think the answer is no. Both of them set up qdiscs on the interface using "tc" but the things they do would conflict with each other.

If you want a custom solution I suggest either fireqos or raw tc commands.

Fireqos is a high level language for configuring HTB usually with fq_codel. It requires bash and has to be installed by downloading a package from fireqos website rather than the lede repos.

Tc itself is pretty unfriendly but you might try modifying the scripts used by sqm, piece of cake, layer cake etc you might be able to just add a separate class and a separate extra matching rule... And be done.


installed LEDE and in the beginning, i was getting A on WIFI 2.4 and now it would only get C grade after testing several times, it seems over the few minutes after running the LEDE the grade would start dropping from A to C, Ethernet plugged into the PC also getting huge spikes on download speed while upload speed seems to be stable and stay in green. in comparison DDWRT Vs LEDE, both upload and download set on same levels, DDWRT still seems to work better in term of bufferbloat in my tests, however i still do get C grade on wifi with Both but i can get A with reducing the download speed and limiting it per MAC or IP address in DDWRT.

further more, i still get huge spikes even if i set the download speed to 50mbps in SQM, normal download speed i get is 170+ from my cable, now that is more than 50% reduced speed and still the same issue occurs.

You have a broadcom device and I think in general support for those is sketchy due to broadcom proprietary stuff.

how do i tell which device to get then and how do i know if the device is broadcom?

I recommend reading some of the hardware recommendation forum threads. And check the table of hardware and the wikidevi entry.

can you give me more detail on how i modify piece of cake? or better which scripted code should i use? if you could help me create a custom script, that would be nice. say i want to add 150 mbps download and 5mbps upload in SQM and use piece of cake. thanks

I can't really help you here, @moeller0 might have suggestions, I suspect he knows how the cake scripts work way better than I do.

As a general concept, I'd guess setting up HTB with a separate bucket for your devices you are limiting so they don't go over their ceiling then matching on MAC and putting the traffic into this bucket. I suspect layer cake would be the start point. Beyond that I don't have enough info on how existing scripts work

It depends, but in general not on the same interface. In theory running sqm on eth0 and qos on eth1 should work; assuming your router packs enough CPU to sustain enough cycles for both shapers....

Well, could you work your way through the Troubleshhoting sqm section in https://openwrt.org/docs/guide-user/network/traffic-shaping/sqm then we might be able to figure out where things go wrong...

While still on DD-WRT it would be interesting to look at the output of "top -d 1" and watch the "idle" value, if this gets to 0 you are out of CPU cycles, then repeat with lede/openwrt just to get a feel where things might get off-track.

P.S.: I am on holiday so my responses over the next 2 weeks will be intermittent....