(Question) SQM Setup Question

If I have a main router and a bridged AP to provide wifi, do I need SQM on both the main router and the AP?

Or do I just need it on the main router and it has to be at the limits of the Wi-Fi's bandwidth limitations?

Example I have a 1 Gbps connection but obviously my wireless bandwidth isn't going to be that high. In this case I am limited to about 650mbps on wifi. Does that mean I need to take that 650 mbps measurement and get my 85% from that, and set that as my SQM value on my WAN connection on the main router?

Bridge means you're not doing routing which means unless you're doing fancy stuff that happens at line rate. I'd say unless your LAN is the same speed as your WAN you're not talking LAN congestion unless your aggregation (presuably at the main router) the switch/CPU there can't handle it.

SQM instructions are about setting it to ~85-95% of the wan bandwidth. We're mostly talking QoS on download /upload not wifi anyway? If we want WiFi QoS i think we're talking equal airtime stuff?

If I'm understanding correctly. You are doing SQM so more than one device plays nicely. As well as playing nicely when there's multiple streams/users so your latency doesn't go up when loading up with connections.

If you need to do per device download / upload speed limiting you need different setup.

So you set for WAN bandwidth so your wifi device and any other wired devices won't mess with each other in terms of latency.

Yes.

How do I reduce latency on my Wi-Fi Connections so I can reduce buffer bloat on wi-fi connections? I know it can be done I just forgot how.

ISP Fiber to home.
ISP Fiber to Fiber Modem.
Fiber Modem to Main Router.
Main router is connected to 'Dumb' Wi-Fi AP.
Wi-Fi AP provides wireless access to the network for wireless clients.

https://openwrt.org/docs/guide-user/network/wifi/wifiextenders/bridgedap

That's my setup right now.

I'd test with wired first. If your wired bufferbloat performance is OK now we're talking how to improve wireless latency.

Wireless latency is a whole different ballgame. You need to look at what's happening over the air. We're talking a half duplex shared medium. Other clients and other AP's on same channels will cause latency spikes.

I basically run multiple AP's and only run 20MHz/40MHz band plan. i.e. no 80mhz/160mhz as I don't have enough clear spectrum here.
Brute force is "just go wifi 6e/7", "just move closer to the AP, "just add more AP's" , or "just use a cable" =P. (assuming you can't do directional antennas)
Also lower transmit powers and do channel surveys, band steering, ap steering with usteer etc? "talk to your neigbours"

I'm really new to usteer and DAWN crippled my network with broadcast traffic. But I was fine with 802.11r and manual tuning except for some finicky apple clients some of the time. So IMO it's better to start with the basics like site survey, power reductions etc.

I haven't looked into equal airtime stuff but I know that's a thing.

1 Like

OK so more thoughts are you should do local tests and see what your latency is to something on your wired network. Those latency increases over wifi are similar to what I have. Speeds are less as I'm on 40mhz channel width.

i.e. iperf3 and ping should be enough to do some local latency tests. i.e. separate the LAN part from the rest?

In my example. Doing a bidirectional iperf3 test latency goes to 20-35ms with peaks of 95ms when doing a simultaneous ping.

Doing an iperf3 test one way or the other latency goes to ~15-20ms.

Unloaded latency to is 1.5-3ms and I have a bunch of other devices connected but they're all idle.

1 Like
  1. measuring latency under load within the internal network can be done with Crusader (straight forward application) or Flent (has more options but is also more difficult to use)

  2. On access points you can experiment with codel target and aql to get latency down - see also GL.iNet GL-MT6000 - AQL and WiFi Latency (see post 71 for my results) and Reducing multiplexing latencies still further in wifi
    What I noticed is that using a DFS channel (i.e. 100) reduces latency as well

  3. the custom build from peas1234 has already several optimizations built-in for latency reduction - see MT6000 custom build with LuCi and some optimization - kernel 6.6.x
    (when flashing, make sure to not keep settings)

  4. for SQM on the main router you can compare between fq_codel + simple.qos vs cake+piece_of_cake.qos (set interface on the wan port)

2 Likes

Is it just "DFS" or is it just finding a clear channel? =P

Most likely a clear channel indeed (I have several neighbors using ch36 - 64, while ch100 is used by only one)

2 Likes

My wired buffer-bloat performance is stellar. A+ using Waveform's test.

1 Like

Thank you for the suggestions and input guys. I am working on it. Thanks again.

1 Like

Why would the router choose a channel that is congested over an empty channel?

For example, channel 9 2.4 GHz range for me is empty, but my AP keeps defaulting to 11 when set to auto. Why would it choose 11 over 9, which again is empty?

What's your regulatory domain? How many channels do you have?
edit: You're not trying to run 40MHz channels on 2.4ghz?

If your channel plan includes channel 13. A split of 1,5,9,13 is best.

If you're only channels 1-11 you pick 1,6,11 so you have three channels that don't interfere with each other.

But yeah one would need to investigate further by looking at the survey data.
For example in my area because of a lot of 2.45GHz radiation because of consumer microwaves my equipment will avoid anything near the middle channels unless forced.

One would have to reverse engineer/have a look at the channel selection algorithm.

I would say the solution is use the 'channels' option and restrict the acs channel selection. But that's an option you need to set on command line or by text editor.
https://openwrt.org/docs/guide-user/network/wifi/basic

But in general, i'd give up on getting clean / clear channels on 2.4ghz. Just try real world performance. You're usually better off on the exact same channel as the other AP's rather than being off a little (in the case of not having a clear channel) so then your AP knows it's 802.11 data (co channel interference) rather than being interference it can't decode (adjacent channel interference?

I am in the US.

1 Like

No. 2.4 GHz Channel 9, since it was empty, and at 20 Mhz width.


I screwed up with the 11/12 so edited my post above.

But 1,6,11 are non overlapping channels. Channel 9 is "clear" in that noone has selected channel 9. But channel 9 overlaps with channels 6,7,8 and 10/11.

"Channel 11 will interfere with and receive interference from 2.4 GHz channels 7-11."

Hence the talk above about co channel interference and adjacent channel interference.

https://www.intel.com/content/www/us/en/support/articles/000058989/wireless/intel-killer-wi-fi-products.html

https://upload.wikimedia.org/wikipedia/commons/4/4a/NonOverlappingChannels2.4GHz802.11-en.svg

1 Like

Ah. That makes sense now. So they reach into other channels but the channel itself is just the center point from where it reaches over into other channels. Ok. I guess I will just leave it auto for now. I need to do some reading. Thank you.

1 Like

With 5ghz if all your devices can handle DFS channels and you're indoors. (Plus can handle and/or don't have radar nearby) you look like you have a lot of options? i.e. move out of 36-48 and 149-165?

I have some devices that can't use 149-165 so I am stuck on 36-48.

I also noticed that since I've been switching channels and rebooting the wifi antenna, now my wifi latency is unusually high, is that normal? Before I started playing around with this stuff I was getting +9ms max now I am at +80ms.

EDIT: To fix the issue I simply added SQM to the WiFI radios and it has cleaned up the latency. A+ waveform bufferbloat. I lost some bandwidth but honestly, it's fine for me.

1 Like

Too many unknowns. Would have to see what's happening over the air.
Need to be careful it's not just something else taking the channel and everything else backing off.

Yeah IDK about the active methods to reduce wireless latency. The stuff above by ed8 sounds good.

But yeah if sqm on wifi fixes it I guess that's fine?