Belkin RT3200/Linksys E8450 - AQL and WiFi Latency

root@OpenWrt:~# for ac in 0 1 2 3; do echo $ac 1500 1500 > /sys/kernel/debug/ieee80211/phy0/aql_txq_limit; done
root@OpenWrt:~#
root@OpenWrt:~# for ac in 0 1 2 3; do echo $ac 1500 1500 > /sys/kernel/debug/ieee80211/phy1/aql_txq_limit; done
root@OpenWrt:~# ls -la /sys/kernel/debug/ieee80211/
drwxr-xr-x    4 root     root             0 Mar 30 20:25 .
drwx------   28 root     root             0 Jan  1  1970 ..
drwxr-xr-x    7 root     root             0 Mar 31 18:54 phy0
drwxr-xr-x    6 root     root             0 Mar 31 18:54 phy1
root@OpenWrt:~#

sorry i make an error maybe delete for ac by ac no ?

Those seem to be the right commands for 22.03.x, then. You can confirm the settings applied by checking the following:

For 22.03.x: cat /sys/kernel/debug/ieee80211/phy*/aql_txq_limit
For Snapshot: cat /sys/kernel/debug/ieee80211/wl*/aql_txq_limit

It should look something like this:

root@AP:~# cat /sys/kernel/debug/ieee80211/wl*/aql_txq_limit
AC	AQL limit low	AQL limit high
VO	1500		1500
VI	1500		1500
BE	1500		1500
BK	1500		1500
AC	AQL limit low	AQL limit high
VO	1500		1500
VI	1500		1500
BE	1500		1500
BK	1500		1500
root@OpenWrt:~# cat /sys/kernel/debug/ieee80211/phy*/aql_txq_limit
AC      AQL limit low   AQL limit high
VO      1500            1500
VI      1500            1500
BE      1500            1500
BK      1500            1500
AC      AQL limit low   AQL limit high
VO      1500            1500
VI      1500            1500
BE      1500            1500
BK      1500            1500
root@OpenWrt:~#

maybe make phy10 and phy11 ? for 22.03

1 Like

That looks right now! So try another buffer bloat test over wifi and see if you notice an improvement :slight_smile:

1 Like

in 2.4 now https://www.waveform.com/tools/bufferbloat?test-id=1caad633-0d49-448c-a0b1-56b32d87ae34

in AX https://www.waveform.com/tools/bufferbloat?test-id=88dfdc50-d12b-499c-b9f0-caea6c80c67f now

before AX https://www.waveform.com/tools/bufferbloat?test-id=88dfdc50-d12b-499c-b9f0-caea6c80c67f

While still high on the upload side, especially, that did seem to have a significant positive effect on latency. What do you think?

yes it has greatly improved I see also very good work

1 Like

If you build your firmware yourself and add the patch I posted about earlier in this thread (linked below), it would be great to see your results with the patch applied AND the AQL settings you just added. You can add the AQL settings to your startup as well if/when you're happy with how it's working.

Patch:

yes I would like to but I only have windows and mac and vaguely an idea of how to build a firmware let alone apply a patch I succeeded once in the past though

I’m curious if anyone else has given this a try, and what results you see, if so. :face_with_monocle:

Currently running your tweaked parameters but no time to really look at the results.

Edit: it feels snappier but that could be the placebo effect.

Would this work on rt1800?

I'm not personally familiar with the RT1800, but the AQL TXq setting in theory can be tweaked on any device that supports and enables AQL.

The TXq limit of 1500 that works well on one device type might not be the right value for another type of device. But the point is, we should be tweaking it to find out the right settings for all devices that support it in order to strike the right some balance between lower latency and throughput. :dart:

Long story short:
If you have the settings to tweak, give it a whirl and see how it goes! It's not like it can't be reverted if for some reason you don't see an improvement (but I'm pretty confident you will :wink: )

Thanks for giving this a shot! You're not imagining things, but I would encourage you to run some quantitative tests of your own to confirm. Would love to see your feedback here when you have time!

@Bartvz && @d687r02j8g -- Did you get a chance to give these tweaks a test and run any quantitative tests you can share?

I have just set up my rt1800. I am getting 4ms download latency on waveform with a wired connection.

On a wireless connection on 2.4 GHz its 52ms, 5ghz its 8ms.

I'm on snapshot but the 22.03.x instructions seem to return the existing values

root@rt1800:~# cat /sys/kernel/debug/ieee80211/phy*/aql_txq_limit
AC	AQL limit low	AQL limit high
VO	5000		12000
VI	5000		12000
BE	5000		12000
BK	5000		12000
AC	AQL limit low	AQL limit high
VO	5000		12000
VI	5000		12000
BE	5000		12000
BK	5000		12000
root@rt1800:~# cat /sys/kernel/debug/ieee80211/wl*/aql_txq_limit
cat: can't open '/sys/kernel/debug/ieee80211/wl*/aql_txq_limit': No such file or directory

Would I just run the following to adjust the settings?

for ac in 0 1 2 3; do echo $ac 1500 1500 > /sys/kernel/debug/ieee80211/phy0/aql_txq_limit; done
for ac in 0 1 2 3; do echo $ac 1500 1500 > /sys/kernel/debug/ieee80211/phy1/aql_txq_limit; done

Can you confirm they'll revert back on reboot?

Thanks!

Okay, this might be due to the difference in hardware. My instructions were based on my RT3200 running snapshot builds.

Correct!

Yes, they should revert back on reboot. However, if you want to revert back for whatever reason without a reboot, you could just run this to get your original settings in place in real-time:

Revert Commands
for ac in 0 1 2 3; do echo $ac 5000 12000 > /sys/kernel/debug/ieee80211/phy0/aql_txq_limit; done
for ac in 0 1 2 3; do echo $ac 5000 12000 > /sys/kernel/debug/ieee80211/phy1/aql_txq_limit; done

If you reach a point where you like the results from the updated settings, you can add the commands from the instructions into your /etc/rc.local file so they're set on boot.

Thank you

With the new settings it's 25 unloaded and 12 active download.

With the default settings 25 unloaded and 9 active download.

Not much different it seems. Perhaps it's just the rt1800 being different. I'll have a play.

Interesting! Thanks for providing feedback! Do keep us posted on any tweaks you make and how they affect your tests :slight_smile:

If you get more adventurous and decide to try the patch for adjusting the codel target and interval for your build, I would love to know how that goes for you.

1 Like

Unloaded latency is the same (25/25 and 25/25 ms) but loaded latency is almost halved with your settings, from 190/250 ms to 100/125 ms on a LTE link.

This is based on two tests (2 x without and with your settings) so it should be taken with a grain of salt.